Peacekeeping contexts ODCI sweep between sessions

Hello

I have a problem when implementing the interface for function ODCI pipeline in Java using 11.1.0.7. I have copy and paste the example code [url http://download.oracle.com/docs/cd/B28359_01/appdev.111/b28425/pipelined_example.htm#CHDHDHEE] from the documents, only adding an ODCITablePrepare function to take advantage of the knowledge of the columns that are covered by the request. Everything works fine the first time I run my function as you can see from the trace
SQL>exec insert_ab10_cat;
Entering ODCITablePrepare
setContext key=0
create hashtable
setContext new key=1
Created context with key = 0
Marking fields accessed by query: 3 - 13 - 14 - 15 ...
Leaving ODCITablePrepare with context = DWH.PARSEFILECAT

Entering ODCITableStart with context = DWH.PARSEFILECAT
Retrieving context with key = 0
getContext key=0 count=1
Calling list_files() with sysName = AB10, fileType = CAT
Leaving ODCITableStart

Entering ODCITableFetch with nrows = 1
Retrieving context with key = 0
getContext key=0 count=1
Opening file /mnt/cluster/xxxxxxxxx
Leaving ODCITableFetch with nrows = 276

Entering ODCITableFetch with nrows = 32766
Retrieving context with key = 0
getContext key=0 count=1
Leaving ODCITableFetch with nrows = 0

Entering ODCITableClose
Retrieving context with key = 0
getContext key=0 count=1
Leaving ODCITableClose

PL/SQL procedure successfully completed.
Also, things are ok, if I run the function again in the same session, given that I have does not clear the previous context. This time Oracle does not call ODCITablePrepare because the SQL query is stored in the shared area:
SQL>exec insert_ab10_cat;
Entering ODCITableStart with context = DWH.PARSEFILECAT
Retrieving context with key = 0
getContext key=0 count=1
Calling list_files() with sysName = AB10, fileType = CAT
Leaving ODCITableStart

Entering ODCITableFetch with nrows = 1
Retrieving context with key = 0
getContext key=0 count=1
Opening file /mnt/cluster/......
Leaving ODCITableFetch with nrows = 250

Entering ODCITableFetch with nrows = 32766
Retrieving context with key = 0
getContext key=0 count=1
Leaving ODCITableFetch with nrows = 0

Entering ODCITableClose
Retrieving context with key = 0
getContext key=0 count=1
Leaving ODCITableClose

PL/SQL procedure successfully completed.
But things go wrong if I connect and once again, or if I try a new session:
SQL>exec insert_ab10_cat;
Entering ODCITableStart with context = DWH.PARSEFILECAT
Retrieving context with key = 0
getContext key=0 count=0
Exception in thread "Root Thread" java.lang.NullPointerException
        at oracle.CartridgeServices.ContextManager.getContext(ContextManager.java:48)
        at myClass.ODCIstart(ParseFile.java:144)
        at myClass.ODCITableStart(ParseFileCAT.java:97)
BEGIN insert_ab10_cat; END;

*
ERROR at line 1:
ORA-29532: Java call terminated by uncaught Java exception: java.lang.NullPointerException
Note that the accident occurred inside the ContextManager Oracle class... Hmm... Of course, everything go back to normal if I drain the shared pool. The behavior (except of course for the part of crash) is somewhat understandable, given that different sessions are not supposed to share memory, so the context that was originally created by ODCITablePrepare is not available to the other sessions, even if the index of the object that is stored by the ContextManager CartigeServices is an attribute of the object type (in this case DWH.) PARSEFILECAT) and is shared by all sessions.

So what is the solution to this situation? I have the feeling that the right way to do would be to define and store all the objects that should be passed between sessions as attributes of the object type, instead of a pointer to integer unique to a ContextManager entry; However, the Java object representing the context is quite complex and I have no idea how to represent in PL/SQL, this coding by hand would be very difficult and prone to error, still less a maintenance nightmare. Does anyone know of a better way to do it?

Thanks for your help,
Chris

Hi Chris:
There is an inconsistency here between the docs and reality :(
Note This article (http://download.oracle.com/docs/cd/E11882_01/appdev.112/e10765/pipe_paral_tbl.htm#ADDCI4712):
>
Prepare, method

ODCITablePrepare() is called during query compilation. It generates and saves the information to reduce the runtime of the query.

If you do implement a ODCITablePrepare(), ODCITableStart() initializes the context whenever it is called. However, if you do not implement ODCITablePrepare(), it initializes the context of analysis, which is passed to the ODCITableStart () when the query is run, by reducing the startup time. In addition, when ODCITablePrepare() is implemented, ODCITableClose() is called only once during the query, rather than every time the table service is restarted. This offers the following advantages:

It reduces the execution time by reducing the number of calls to ODCITableClose().

It allows the context of scanning between the table function restarts.

ODCITablePrepare() also provides information of projection to the table function. If you do not ODCITablePrepare() implement for the table of functions that return collections of types defined by the user (UDT), your table function must define all the attributes of the UDT of each element, because there is no way to know which attributes are used. On the other hand, selection in an ordinary table retrieves only the required columns, which is naturally faster in most cases. However, if you do not implement ODCITablePrepare(), it can build a table of positions of the attribute, record the return type information in an argument of type ODCITabFuncInfo and save this information in the analysis, as described in example 13-14. >
But I'm sure that if you close a connection to the DB, the OJVM fade and all information stored in a hash table will disappear (remember that ContextManager.setContext (ctx); in-house is implemented by a hash table).
My recommendation is:
-Try to implement most of part of the pipeline in PLSQL, switch to Java implies a change in SQL in the Java context space. For example, you can implement Prepare and describe the method in PLSQL and only implemt start/extraction/close in Java.
-If you can not retrieve information from struct in another parallel to the Java session, try to use a temporary with instance field table and stores rated context, you can use the args as the key value, this value is passed into all the functions describe, prepare, start, is therefore a good candidate to work as a key and the temporary table will work as a shared memory area stored in the LMS.
Best regards, Marcelo.

Tags: Database

Similar Questions

  • User persistent between sessions variables

    I have read in a long thread and instructive to 4 and a half years ago that even if "resume data" or "data to suspend" was sent to the LMS between sessions (to keep my Captivate user variables), if my user variables are either set to an initial value in my Captivate file, they will be reset every time at the entrance to the initial value , and the persisted value will be lost.  My question: is this still true in Captivate 9?

    I ask because if a student leaves a lesson and returned it later, a problem that might be explained by the phenomenon above, we discovered a problem with the behavior of our modules.

    It is best if you use a js file included to do so. You can create the file and put the include in the index.html file

    The "moduleReadyEvent" fires only once, to create an initVariables function to get the localStorage form of vars or initialize the localStaorage if it does not yet exist.

    In the initializeEventListeners function, add you a "CPAPI_SLIDEENTER" listener, set the storage whenever you enter a slide.

    Add a window.onunload function to set it again when the page is unloaded.

    window.addEventListener ("moduleReadyEvent", function (e)

    {

    interfaceObj = e.Data;

    eventEmitterObj = interfaceObj.getEventEmitter ();

    initVariables();

    initializeEventListeners();

    });

    function initVariables()

    {

    implement the localStorage

    }

    function initializeEventListeners()
    {
    If (interfaceObj)
    {
    If (eventEmitterObj)
    {
    eventEmitterObj.addEventListener ("CPAPI_SLIDEENTER", function (e)
    {
    call a function to set the storage here.
    });
    }
    }
    }

    Window.OnUnload = function()
    {
    call a function to set the storage here.
    }

  • How to keep an eye between sessions

    Firefox used to close the browser without close tabs. About an hour ago, it prompted me to leave 'Refresh' to 'speed up' my session (I had not noticed any problems). Stupidly I leave 'Refresh', now when I try to close the browser session, he insists on closing all my tabs. How can I stop this?

    Refreshing restores your browser settings to their default values. The default value for this setting is to show your home page when you start Firefox. To make Firefox show your windows and tabs from last time when it starts, follow these instructions.

  • 28.0 Firefox does not save my tabs open between sessions - Mac OS x on MacBook Pro

    (I was intending to respond to another thread on this topic but Mozilla Support requires you to start a new thread to be able to register)

    Firefox starts: show my windows and tabs from last time.

    No setting change - either in the preferences or all: config - changes the behavior of Firefox to restore the tabs at previous sessions.

    Options I've seen suggested:

    • Create a new profile to test
    • To uninstall and reinstall Firefox
    • Delete the files in your profile sessionstore (?) folder

    Yes.

    I have reset default Firefox and which seems to have authorized.

  • How to save tabs between sessions with Panorama.Or inTabs is it not possible?

    Panorama is good BUT have yet to find a way to SAVE groups of tabs of sesion sesion. IE, if I have two groups named tony and other tools. If I close Firefox and then start a NEW session ther doesn't seem to be a way to reopen them. Or am I be thick?
    Tony

    (PIN) App tabs and groups of tabs (Panorama) are stored in session data [1] in the sessionstore.js file [2] in the Firefox profile folder [3].

    Make sure that you do not use "Clear recent history" to clear the 'browsing history' when Firefox is closed because who wins and prevent Firefox tabs from the previous session.

    It is also possible to use the "Show my windows and tabs from last time" parameter, which is generally a more reliable way to restore the session data.

    If you like CCleaner cleaning software, then make sure that the Session is disabled in the parameters of the Firefox application.

  • Passing parameters between sessions in openscript.

    Hello

    I currently have 4 scripts (test1, test2, test3 test4 - all are web database load scripts). I have 5 script (criterion 5) calling Run method of all 4 test scripts in the test1 sequence
    test2
    test3
    test4
    using the active script feature. In the stream, 1 test result should be gone to the 2 test, then test 2 uses data from test 1 and test result 2 should go to 3 and finally test 3 to test 4. Is there anyway to control the flow of data between scripts. (Basically, I want to know if test 5 the main script, anyway to control the flow of parameters among other scripts.) Any help would be really appreciated.

    Thank you
    John

    Hi John,.

    You define a variable with global scope in test5. If this variable will be available in all internal scripts. So update the value of the variable by the internal script will help you to transmit data between scripts.

    Thank you and best regards,
    Rajesh

  • PGA of DIVISION between sessions

    Hello
    I am forest inside the management of oracle (mainly PGA) memory get better understood on the PGA TOUR.
    With the help of:
    http://docs.Oracle.com/CD/E11882_01/server.112/e16508/memory.htm#i12483

    My question is how oracle divides the memory for the process (PGA)?
    Each process has get a fixed size of the PGA?
    Or the PGA divided equally between the process?
    For example if I have a PGA G 10 and that a user to connect to the DB.
    Can get up to 10G of the PGA to his operation, sql (like)?

    Hello

    Link below may be useful for you.

    http://www.DBA-Oracle.com/art_so_undocumented_pga_parameters.htm

    Kind regards
    Amit Golia

  • Favourite Add - ons disappear between sessions

    When I start my computer lately, about three of my favorite FF (ver. 33.1.1) modules are installed is no longer. It's Lazarus, X-notify and theme and size Changer.I fonts can reinstall them manually, but it becomes a pain to do. I find that when I reinstall the Add-ons seem to remember my previous settings, such as X-notify, who always has my Hotmail and password accounts when I reinstall. Please advise, thank you!

    After reading this article and all the comments, it ends with a message by Lukas (avast!, I guess) says:

    "Browser cleaning team is currently working on a fix, which will be delivered via a VPS update soon (tomorrow)."

    So, it looks very promising!

  • Screen refresh rate is not preserved between sessions

    I use a multi-screen configuration, and as I understand it, it is advisable to have all monitors to the same refresh rate (which makes sense). However, I have the main screen at 60 Hz, and after each reboot the secondary screen returns to 59hz. The screens are the same and I was able to reproduce the behavior on several graphics cards (Nvidia and ATI) with multiple monitors. Attributing to the display main 59Hz seems worth trying, but this option is not available. Someone has an idea?

    Hi Robert,.

    What is the brand and model of the secondary monitor?

    No action is necessary. This behavior is normal for monitors and TVs that are only 59,94 Hz but not 60 Hz. The 59Hz and 60 Hz are translated to 59,94 Hz until these values are sent to the driver. As a result, the screen is identical to 59Hz and 60 Hz.

    Some observers report a TV-compatibility of 59,94 Hz timing. Therefore, Windows 8 exposes the two frequencies, 59Hz and 60 Hz for each resolution supported at this time. The 59Hz parameter makes sure that a compatible TV timing is always available for an application such as Windows Media Center. The 60 Hz setting maintains compatibility for applications that expect to 60 Hz.

    Hope this information helps.

  • East - an invisible extension capable of persistence between sessions?

    If I have an extension that is invisible, I can keep running when the user selects the close project and there is nothing running?

    I want persistence to allow communication with an external application and won't close as do all the other extensions when the user closes the project or the proposed amendments.

    This is a question for the creation and the API because first farm extensions automatically.

    From our most recent 10.3 ("Adobe Premiere Pro CC 2015.3") version, organization called him setExtensionPersistent(); Does body to keep the responsible Panel, overall changes to workspace (what happens usually when the user closes a project).

    app.setExtensionPersistent ("com.extensionName", boolPersist);
  • How to keep records between sessions? [under Knoppix as VM win8]

    I am running Knoppix on VMware on win8.

    When I turn it off all the files I did disappeared and reset the settings.

    Is it possible to keep everything?

    Welcome to the community,

    How do you run Knoppix? Boot you from ISO / CD or do you have it installed on a virtual drive? If it is installed on a virtual disk, check the disk of the virtual machine settings to ensure that you do not have the option "Non-persistent" is enabled. If you dΘmarrez Knoppix from CD / ISO, you may consider adding a virtual drive on the virtual machine and store files there.

    André

  • Freeze the view save between sessions

    Is it possible to save a sort or filter on the data of the table grid after closing the application? It seems to record ok as long as I have the app open, but once I close SqlDeveloper and re - open, nothing is logged.

    Thank you

    Currently, there is no way to save existing filters by table, but you can always press ctrl-space inside the filter box and it will show a list of used filters recently.

    There has been lot of debate on this, because the economy sorts and filters on large tables could have a huge impact on recovery time, if you are looking for Exchange and in this forum you will find topics and applications functionality to this topic.

  • D8 forget FTP login between sessions

    For some reason, Dreamweaver 8 does not remember my login information and password required to access my remote server via ftp site, for example when I want to download a file. I have to type this information every time I restart Dreamweaver, even if I check the box 'Save' This has changed in the past months, as he used to work. I run ZoneAlarm and XP SP2 and Spyware Doctor. Any ideas? Thank you.

    MCM

    You have updated to the latest version of IE7 and Dreamweaver? 8.02
    Dave
    "user1900" wrote in message
    News:emouor$s0d$1@forums. Macromedia.com...
    > For some reason, Dreamweaver 8 does not remember my login and password
    > information required to access my remote server via ftp site, for example, when
    I have
    > to download a file. I have to type this information whenever I have
    Restart
    > Dreamweaver, even if I do not check the box to 'Save '. This has changed
    in
    > in recent months, as he used to work. I am running ZoneAlarm and XP SP2 and
    > Spyware Doctor. Any ideas? Thank you.
    >
    > MCM
    >

  • Session JDeveloper Database context variable

    Hi guys,.

    I have prepared a package SQL to set session contexts in my database session. Some of my opinions depend on these context variables and will not work if they are not defined.

    Where / how to actually run this SQL package in Jdeveloper for intiialize the logon session?

    I have no problem with Java code, because there are a lot of examples autour on how to call a PL/SQL stored procedure, but I don't know what I have to do to have this Java code to run automatically, when my page / application first opens.

    I thank in advance all those who can help.

    See you soon,.

    S

    Simon,

    If you are using adf business components, you can do this in an overridden prepareSession method in the module of your application.

    John

  • When I cannot connect to all my sites requiring a password, and then close browserand reopen browserand I open a session in the agianevenwhenIsay site remember me the facebook

    When I log on all my sites requiring a password and username for example Facebook and Gmail, then I close the browser with "remember me" selected it disconnects me Gmail and Facebook. So I log into these sites once again. This does not happen to me in Internet Explorer or Google Chrome.

    Firefox seems to save the password and username but disconnects me all my sites that requires a user name and a password after each session. This happen to me before an update of Firefox.

    The only way I found to get around this problem to keep Firefox open.

    Thank you

    The box ' remember me ' indicates the site to place a cookie in Firefox. Persistent means that the cookie is marked with a future expiration date to keep Firefox it between sessions.

    There are a lot of ways out of this. For example:

    • Visit the site in a private window
    • Change the default setting in Firefox to accept persistent cookies of all servers (first and third)
    • Set Firefox to clear the cookies at the stop
    • Install Add - ons that erase cookies
    • Use cleaning/security/privacy software external which clears the cookies from Firefox

    If you are not sure about your settings of cookies, see the Panel of the Privacy Options dialog box:

    the button Firefox orange (or the Tools menu) > Options > privacy

    If you have "conservation rules: don't forget history" then the cookies are accepted and stored.

    If you have a "conservation rules: use the custom settings for history" you can check your settings on cookies below this line.

    If you have "conservation rules: don't remember history" while you want to use full time private browsing and cookies are thrown between sessions.

    If the cookies settings are okay, and you would like some advice on your extensions, it would help if you could post a list of them. Open the troubleshooting information page by using either:

    • Help > troubleshooting information
    • type or paste everything: in the address bar and press Enter

    In the upper left corner, click the text of the copy to Clipboard button, then paste it into a response.

    After you have previewed, you will see there are additional information below the list of extensions that you can change them if you wish.

Maybe you are looking for

  • NB300-108 replacement circuit

    Hello I spilled a little liquid on my NB300 (only 6 months) and the circuit board needs to be replaced. I took it in a few places repair, but they could not locate the circuit board. Can someone suggest the most economical way to have repaired. Thank

  • Qosmio G20-108 Windows recovery problem.

    Hello I just purchased a Qosmio G20-108 of ebay and the seller said that the laptop is ok but I had a virus previously and it wiped the HARD drive. The DVD player has so replaced it by a new one, but he couldn't just load the recovery of Windows Medi

  • Satellite A65 - S1070 - question on Panel indicator system

    Hi all I wonder what controls the sign... I opened my laptop to clean the dust, put it back together and now none of my lights work. I have to have something out by accident. Can someone point me in the right direction as to what this control inside

  • Xbox 360 games Xbox 720 system

    I'll be able to play my Xbox 360 games on a Xbox 720 system?

  • Pavilion dv4 1040ee: unknown device 2

    Hi, I have a problem on my hardware. Device Manager, I have two unknown devices. Devices says: Unknown device, location: Port_ #0002.Hub_ #0001 Unknown device, location: on PCI Express Root Complex How would I be able to get a driver for it or maybe