Does prepareSession() fire before activateState()?

Hi,
JDev/ADF 11.1.1.4
In an Application Module Impl class I have some session variables that I store in the getSession().getUserData() HashMap. I have written passivateState() and activateState() code to store/restore these values which seems to be working fine.
I have also overridden prepareSession in order to set some Oracle context values and to set some fields in v$session via dbms_application_info. This uses the variables stored in the session User Data.
I have set AM pooling to false in order to test passivation/activation as recommended by the documentation. On each request I get the activation and passivation as expected, however my problem is that the prepareSession call happens before the User Data variables have been restored by the activation phase.
Is this the order these are supposed to happen?
I can call the same code to prepare the session at the end of the activateState method but I just thought I'd check to see if there is any way to have prepareSession happen after state activation. Also, I'm implementing dynamic JDBC connections in case that might have affected things.
Many thanks,
Kevin.

Kevin,
if I remember correctly, prepareSession is called first and sets up the hash map containing userdata. Check http://download.oracle.com/docs/cd/E15051_01/apirefs.1111/e10653/oracle/jbo/server/ApplicationModuleImpl.html#activateConnectionState%28org.w3c.dom.Element%29 . There you find a description of the activation cycle, which might help you to solve your problem.
Timo

Similar Messages

  • ON-LOGON does not fire in Form B, called from Form A

    We have a situation like this. We are using Forms (Forms [32 Bit] Version 10.1.2.0.2 (Production)).
    We migrated this application to Forms 11.2.0.1.0. Problem is that the ON-LOGON trigger does not fire in the 2nd level forms. Our application work like this.
    (a.) User double-clicks URL icon.
    (b.) Form A is opened without asking for un/pwd. We put a NULL; in the ON-LOGON of A.fmb.
    (c.) This is the main form of the application. This has a canvas with 6 buttons. Each button will launch it's own separate application with it's own menu.
    (d.) Now user presses button in A. This launches Form B. We use
    Run_Product(FORMS, 'B', SYNCHRONOUS, RUNTIME,FILESYSTEM, pl_id, NULL);              (e.) Now, in Form B, in the ON-LOGON trigger we have put code to show the logon screen and login to the DB.
    Problem is, this works in 10g Forms. But we had to replace the RUN_PRODUCT with a CALL_FORM after migrating to 11g since RUN_PRODUCT is not supported in 11g.
    Problem is that when you use CALL_FORM to call Form B, the ON-LOGON of the Form B does not fire. We tried OPEN_FORM and NEW_FORM with different parameters, but the behavior is the same. i.e. ON-LOGON does not fire.
    What is the solution or workaround for this please.
    Edited by: user12240205 on Oct 15, 2012 4:50 AM
    Edited by: user12240205 on Oct 15, 2012 4:52 AM

    Michael Ferrante (Oracle) wrote:
    If you need to open another form you should use CALL_FORM, OPEN_FORM, or NEW_FORM. In these cases, ON-LOGON will not automatically fire because the connect info is passed from the calling form. If you need to login from the called form then you need to need to programatically cause that to occur. Refer to the LOGON and LOGON_SCREEN built-ins in the Builder help for more info. You can fire these from almost any trigger you like, for example in a WHEN-NEW-FORM-INSTANCE trigger or where ever is appropriate for you application.Michael, we tried using the CALL_FORM, OPEN_FORM & NEW_FORM.
    Also, there is NO connection to the DB, when B is called from A since we don't login to the DB in A (ON-LOGON has NULL;).
    So, if there is no DB connection when B is called, shouldn't the ON-LOGON in B fire?
    We tried firing the LOGON_SCREEN and LOGON in the WHEN-NEW-FORM-INSTANCE. But, for some reason, the we don't get the menu (we get a menu not found error). We tried correcting the paths and other things but still no solution.

  • Flash CS4 onPeerConnect does not fire

    Hi
    I tryed to do Flex example for simple chat (p2p) with Stratus at Flash CS4 IDE
    (adapted it of course) but onPeerConnect does not fire.
    Can you take a look at my code ?
    What's wrong with it ?
    package {
        import flash.events.*;
        import flash.net.*;
        import flash.display.*;
        import flash.media.*;
        public class stratusTest2 extends Sprite {
            private const SERVER_ADDRESS:String="rtmfp://stratus.adobe.com/";
            private const DEVELOPER_KEY:String="a9fb14e5b040800e8327ab51-37f33907d0c1/";
            private var nc:NetConnection;
            private var myPeerID:String;
            private var farPeerID:String;
            // streams
            private var sendStream:NetStream;
            private var recvStream:NetStream;
            private var VideoDisplay:MyVideoDisplay;
            private var FAR_PeerVideoDisplay:farPeerVideoDisplay;
            private var VidDisplay:Sprite;
            public function stratusTest2(){
                addEventListener("addedToStage",initThis);
            private function initThis(e:Event){
                VidDisplay=new Sprite();
                addChild(VidDisplay);
                connectToStratusBTN.addEventListener("mouseDown",initConnection);
                initSendStreamBTN.addEventListener("mouseDown",initSendStream);
                initReceiveStreamBTN.addEventListener("mouseDown",initRecvStream);
                sendDataBTN.addEventListener("mouseDown",sendDataBTNPressed);
            private function initConnection(e:MouseEvent){
                if (MY_peerIDText.text) {
                    farPeerID=MY_peerIDText.text;
                nc=new NetConnection();
                nc.addEventListener(NetStatusEvent.NET_STATUS,ncStatus);
                nc.connect(SERVER_ADDRESS+DEVELOPER_KEY);
            private function ncStatus(event:NetStatusEvent):void {
                INF.appendText("ncStatus: "+event.info.code+"\n");
                trace(event.info.code);
                myPeerID=nc.nearID;
                MY_peerIDText.text=myPeerID;
            private function initSendStream(e:MouseEvent){
                trace("initSendStream");
                INF.appendText("initSendStream\n");
                sendStream=new NetStream(nc,NetStream.DIRECT_CONNECTIONS);
                sendStream.addEventListener(NetStatusEvent.NET_STATUS,netStatusHandler);
                sendStream.publish("__media");
                var sendStreamClient:Object=new Object();
                sendStream.client=sendStreamClient;
                sendStreamClient.onPeerConnect=function(callerns:NetStream):Boolean{
                    farPeerID = callerns.farID;
                    trace("onPeerConnect "+farPeerID);
                    INF.appendText("onPeerConnect "+farPeerID+"\n");
                    return true;
                //VideoDisplay=new MyVideoDisplay(VidDisplay);
                //var camera:Camera=Camera.getCamera();
                //VideoDisplay.attachCamera(camera);
                //sendStream.attachCamera(camera);
            private function initRecvStream(e:MouseEvent){
                recvStream=new NetStream(nc,farPeerID);
                INF.appendText("start receiving from "+farPeerID+"\n");
                recvStream.addEventListener(NetStatusEvent.NET_STATUS,netStatusHandler);
                recvStream.play("__media");
                recvStream.client=this;
                //FAR_PeerVideoDisplay=new farPeerVideoDisplay(VidDisplay);
                //FAR_PeerVideoDisplay.attachStream(recvStream);
            public function receiveSomeData(str:String){
                txtReceiveData.text=str;
            private function sendDataBTNPressed(e:MouseEvent){
                sendStream.send("receiveSomeData",txtSendData.text);
            private function netStatusHandler(event:NetStatusEvent):void {
                trace("netStatusHandler: "+event.info.code);
                INF.appendText("netStatusHandler: "+event.info.code+"\n");
                trace(event.info.code);
    i have 3 input texts: MY_peerIDText, txtSendData, txtReceiveData
    When i press connectToStratusBTN i get ID after than i open another
    browser window with the same swf and paste this ID into MY_peerIDText
    After connection i press initSendStreamBTN in first swf (it is 1st browser page)
    and i press initReceiveStreamBTN in 2nd swf
    After that iwrite down some text in txtSendData TextField (in 1st browser page) and press sendDataBTN
    Nothing happens

    this function doesn't work correctly:
    private function sendDataBTNPressed(e:MouseEvent){
                sendStream.send("receiveSomeData",txtSendData.text);
    because you send not String, but link to the txtSendData.text, which is empty in another peer.
    So, solution is following (not the one, but for example):
    private function sendDataBTNPressed(e:MouseEvent){
             var sendString:String = "";
            sendString+=txtSendData.text;
            sendStream.send("receiveSomeData",sendString);

  • Reset does not fire NavigationEvent - is this intended behaviour?

    Hi
    I realized that the ViewObject.reset() method does not fire a NavigationEvent. I think that resetting a current row is some sort of navigation which has some effekt on dependent objects (eg. detail views will be cleared). So I'd have expected that reset() should file a NavigationEvent.
    Can anyone explain me: Is this intended behaviour? Why?
    Thanks
    Frank Brandstetter

    >System Preferences>Mission Control>Show Desktop...should be F11:
    If not, change it.

  • Accordion load event does not fire when accordion and load event created dynamically using actionsript

    I cannot get the accordion load event to fire when I have
    created the accordion and load event using actionscript . Here is
    some sample code:
    createClassObject(mx.containers.Accordion, "acc",
    getNextHighestDepth());
    acc.createSegment(mx.containers.ScrollPane, "sc1", "Number
    One");
    acc.createSegment(mx.containers.ScrollPane, "sc2", "Number
    Two");
    var accLis=new Object();
    accLis.load=function(evtObj) {
    trace("load");
    accLis.change=function(evtObj) {
    trace("change");
    acc.addEventListener("load", accLis);
    acc.addEventListener("change", accLis);
    I made sure to add the ScrollPane and Accordion components
    to my library. So the load event does not fire, but the change
    event does fire. And through further testing the other events do
    not fire, including the draw event. Can anyone help? The only time
    I can get the load event to fire on an accordion is if I put an
    accordion on stage, select it and add the actionscript to the
    objects actions like shown below:
    on(load) {
    trace("load");
    on(draw) {
    trace("draw");
    Can somebody help? Unfortunately I must create all my
    components dynamically. Thank you in advance.

    I'm having this issue also...but only apparently with Internet Explorer and only on some machines...ideas?

  • DidSelectRowAtIndexPath does not fire in SDK 3.0

    Hi everyone!
    I have iPhone application that works well in SDK 2.2.1 But in SDK 3.0 event didSelectRowAtIndexPath (as well as willSelectRowAtIndexPath) in MyTableViewController does not fire.
    I've downloaded "TheElements" sample application and it works fine on 3.0. I figured out that there is a difference in UITableViewCell initialization. So I removed old initWithFrame method and created new one initWithStyle. But no luck. I put breakpoint inside didSelectRowAtIndexPath event but debugger does not stop there.
    What other changes should I make to fire didSelectRowAtIndexPath event?
    Any help will be appreciated.

    romex wrote:
    Removing touchesBegan and touchesEnded methods from custom cell class resolved the problem.
    When we were working on this last June, do you remember if the methods you removed had been passing the events to super? I thought we covered that, but I don't see it anywhere in the thread. In other words, did the methods look like the example below?
    - (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event {
    [super touchesBegan:touches withEvent:event]; //<-- pass to UITableViewCell
    // cell does something else here
    Or, was anything like the following tried?:
    - (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event {
    [[self superview] touchesBegan:touches withEvent:event]; //<-- pass to super view
    // cell does something else here
    I still think something about the responder chain must have changed in 3.0, but it seems like one or both of the above methods should still work. If neither of them gets the touches where they need to go, maybe nextResponder isn't the same as superview(?). In that case you might try this:
    - (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event {
    [[self nextResponder] touchesBegan:touches withEvent:event]; //<-- pass to next responder
    // add extra sanity check
    NSLog(@"superview=%@ nextResponder=%@", [self superview], [self nextResponder]);
    // cell does something else here
    Hope the above sheds more light than confusion!
    - Ray

  • Setter/getter does not fire

    Hi,
    in a class CSampleEntity, the setter function
    public function set title( aValue:String ):void {
    this.setKV( CSampleEntity.PROP_TITLE, aValue );
    does not fire, while setKV() in CSampleEntity's super-class
    defined as
    protected function setKV( key:Object, value:Object ):void {
    _entityData[ key ] = value;
    _dirtyFlag = true;
    and _entityData is defined in CSampleEntity's super-class
    like this:
    // The values of this entity
    private var _entityData:Object = undefined;
    Could someone provide insights, why this call
    var sample:CSampleEntity = new CSampleEntity();
    sample.title = 'Hello World'; // << THIS does not fire
    the setter
    does not fire the 'set title' setter?
    Actually, the Flex AIR debugger show an object of class
    CSampleEntity with a property 'title' - but the setter does not set
    this property!

    "justria" <[email protected]> wrote in
    message
    news:gnkhoe$sk4$[email protected]..
    > Hi,
    >
    > in a class CSampleEntity, which gets instantaiated
    dynamically using
    >
    > public function createEntity( anObjClass:Class
    ):TAAbstractEntity {
    > var obj:TAAbstractEntity = null;
    > obj = new anObjClass();
    > return obj;
    > }
    >
    > the setter function
    >
    > public function set title( aValue:String ):void {
    > this.setKV( CSampleEntity.PROP_TITLE, aValue );
    > }
    >
    > does not fire.
    >
    > Could someone provide insights, why this call
    >
    > var sample:CSampleEntity = stm.createEntity(
    CSampleEntity ) as
    > CSampleEntity;
    > sample.title = 'Hello World'; // << THIS does not
    fire
    >
    > does not fire the 'set title' setter?
    >
    > Actually, the Flex AIR debugger show an object of class
    CSampleEntity with
    > a
    > property 'title' - but the setter does not set this
    property!
    So, if you have
    public function set title( aValue:String ):void {
    trace('aValue');
    You don't see the value traced out?

  • JComboBox does not fire Event

    JCombobox does not fire any event which should be send when typing on the keyboard. (Keypressed, keyReleased, keyTyped, caret-operations)
    Is there a known bug?
    I am using Netbeans 3.6 RC1 with Java 1.4.2_04 under WindowsXP.
    Thanks for your help
    Klaus

    myComboBox.getEditor().getEditorComponent().addKeyListener()

  • Why does the fire fox page change, sometimes it is just an orange fire fox button and othr times it says file, edit, view History, bookmarks, tools, help? I barely learn how to run one version of the page and then it changes

    Why does the fire fox page change, sometimes it is just an orange fire fox button on the top left that opens a panel with all the things listed in it and then it sometimes has a bar across the top that says File, Edit, View, History, bookmarks, tools, Help? I barely get used to using one type of set up and then it changes to the other without me doing anything??

    [[Menu bar is missing]] and [[Preferences are not saved]] may help to you

  • When-Mouse-Click does not fire if When-new-item-instance exists

    We are using Forms 6i Patch 12.
    The When-Mouse-Click trigger (at block level) is not getting fired when a When-new-item-instance trigger exists on a given item on which mouse is clicked.
    We need to synchronize keyboard and mouse events such that if the validation on certain key items fails, the cursor should go to one of the specified items as per the validation rules.
    The validation rules are different on leaving from different items. Complex validation rules require cursor to go to a different item than the current item on which the validation fires.
    Since go_item cannot be used in when-validate-item, we are using a combination of key-next-item and when-mouse-click.
    But, this strategy seems to fail if mouse is clicked over an item having a when-new-item-instance trigger.
    Also, we need the When-mouse-click trigger to fire before When-new-item-instance.
    Any pointers to solving the firing of trigger or strategy will be appreciated!
    Regards,
    Sanjiv

    This solution we have tried and it works also.
    However, we end up in another problem in the form. For overall picture, please see my latest post for "Forms Valid status" at Forms Valid status
    Regards,
    Sanjiv

  • APT - Does it run before code is compiled or after?

    If I build an annotation processor and include it in my eclipse project, does it run before the code is compiled by javac or after?
    Using the annotation processor, I wish to do a very basic code change on a method that is annotated.
    Thanks

    Boeing737 wrote:
    If I build an annotation processor and include it in my eclipse project, does it run before the code is compiled by javac or after?
    Using the annotation processor, I wish to do a very basic code change on a method that is annotated.
    ThanksI belive APT is processing during compile time, but you cannot change code with it, only add stuff.
    A good start could be AspectJ: http://www.eclipse.org/aspectj/
    edit: i just found this statement here: http://www.cooljeff.co.uk/2009/01/02/apt-v-aspectj
    As a general rule I’d break down APT and AspectJ usage as follows:
    Use AspectJ if you need to add a functional requirement to existing entities. Examples include: monitoring, architecture enforcement, transactional functionality.
    Use APT if you need to generate bye products for framework integration. Examples include: schema generation, source code generation tools (e.g. JAXB, JAXWS)
    APT is not designed to be updating code to meet a functional requirement, AspectJ is. Instead APT provides a compiler extension that allows you to generate bye products driven by meta data on a class.
    Edited by: ryan on 27.06.2011 07:34
    Edited by: ryan on 27.06.2011 07:35

  • Selectonechoice:validation fires before valueChangeListener

    Hi,
    is it normal event sequence for selectonechoice, that validation fires before valueChangeListener()?
    or something else causes that go awry?
    <af:selectOneChoice value="#{row.bindings.AddrTypeId.inputValue}"
    label="#{row.bindings.AddrTypeId.label}"
    shortDesc="#{bindings.CustomerAddrVView1.hints.AddrTypeId.tooltip}"
    disabled="#{!(row.bindings.Rid.inputValue==null)}"
    id="soc1" autoSubmit="false" immediate="false"
    binding="#{backingBeanScope.backing_editAddresses.soc1}"
    valueChangeListener="#{backingBeanScope.backing_editAddresses.addresstypeChangeListener}"
    validator="#{backingBeanScope.backing_editAddresses.soc1_validator}"
    >
    that order makes validation useless, i think in terms of oracle forms.

    Hi,
    According to this:
    http://docs.oracle.com/cd/E15523_01/web.1111/b31973/af_lifecycle.htm
    Validator should fire first unless you use immediate true where you skip *[edit: as the documentation says: delivery of valueChangeEvents events are done earlier in the lifecycle, during the Apply Request Values phase, instead of after the Process Validations phase. No lifecycle phases are skipped.*
    *Using the word skip, is misleading and I should rephrase to "execute ValueChangeEvent first" ]* the validation and process to ValueChangeEvent immediatelly.
    At least, this is my understanding..
    Regards,
    Dimitris.
    Edited by: Dimitris Stasinopoulos on Dec 13, 2011 12:36 PM

  • With both ApplyMRU and ApplyMRD, does one commit before the other runs?

    This is related to another thread at How to stop insert of new row in tabular form if it's also being deleted I wanted to ask this question separately, however, for broader understanding.
    I have a tabular form configured so that if a user clicks on "Delete Checked Rows", it fires the ApplyMRU process and then the ApplyMRD process. (This is mainly so that other edits are not lost when deleting some rows -- see the other thread for more on this use case.)
    Both processes run, as I can see edits and deletions happening when the page returns. But it appears as though the ApplyMRU process doesn't actually commit its changes to the session before ApplyMRD runs, because it won't operate on the same record. Is that true?
    Here's why I think that:
    1) User clicks "Add Another Row" to insert a new row.
    2) User enters some information in that row.
    3) User then checks that row (say they changed their mind and don't want to enter it after all), and clicks on "Delete Checked Names".
    The new row gets inserted (when ApplyMRU fires), but not deleted (when ApplyMRD fires). Other checked rows, however, do delete. This reproduces in both ApEx 3.2 and in ApEx 4.0, with the new, client-side addRow() replacing the old implementation.
    Is this expected behavior?

    Nicolette - ah, I think you nailed it. The PK is being created in the trigger. So it's not in the form when it is submitted, but is created after ApplyMRU runs. There doesn't appear to be any way to return that information back to the session state, since it could span multiple rows.
    It hadn't occurred to me that the delete would be using the PK, but of course, that now seems obvious in hindsight.
    I've found a fix for this -- it seems a bit circuitous, and if anyone knows of a better way, I'd be interested in hearing it.
    Here's what I did:
    1) Create a validation that looks for rows that are checked (marked for deletion) AND do not have a PK set (just added to form), and override the value of some other, non-PK field to some dummy value. You can't override the PK field, or it results in a "Current version of data in database has changed" error. This also handles the case where some non-nullable field is null.
    2) Add a process that runs after ApplyMRD (when MRD button is pressed), and deletes all records with this dummy value, as well as any auditing table entries with that dummy value, if applicable.
    Ironically, this solution is almost identical to the one I described in the other thread, and I might not have even run into this issue, had I not mistakenly coded my validation to fire when the request is MUTLIROWDELETE. Oops. :)
    Thanks for the help!

  • 2 Create bindings in 1 page, second Create event does not fire (ADF)

    I have an ADF, Struts, JSP master detail page and within that page there is a Create binding on the master view and this works fine.
    I added the detail list to the page and added a Create binding for this view underneath the list.
    The second create event does not seem to fire at all, when the button is clicked the page gets submitted and the request forwards to the correct page to display the input form but the contents of this form is the current selected detail row in the view and not a new row.
    I have created 2 new pages to test the detail view... I put a link in the original page to a test list page that displays the detail list and included a Create binding in this page which links to a test create page and this works fine.
    Has anyone else had this problem?
    Can there be only 1 Create event binding in a single page?
    Is there a way round this other than having to have my detail page on a seperate page?
    The Jdeveloper version I am using is as follows...
    JDeveloper Version 10.1.2.0.0 (Build 1811)
    Oracle IDE     10.1.2.17.84
    Business Components Version     10.1.2.17.96
    UML Modelers Version     10.1.2.16.71
    Versioning Support     10.1.2.16.71
    WebDAV Support Version     10.1.2.16.71
    Struts Modeler Version     10.1.2.6.15
    Designer Generators Framework     10.1.2.7.56
    ADF UIX     2.2.16
    java.version     1.4.2_04
    Thanks
    Al

    Can you do something like this?
    1. Look at the uimodel for your page and find the Create that is the action binding for the detail. Name it something like: CreateDetail
    2. Change the button on the page to create a detail to be named: event_CreateDetail.
    3. Change the forward from Master/Detail browser page to: CreateDetail
    Can you provide more details on:
    1. What are the names of the create bindings for master, then detail?
    2. What is the name of the forwards, that is the struts-config.xml action definition for this page?
    I hope this helps!

  • Bmp, does call ejbStore before ejbFind in weblogic?

    the message before said in weblogic 6.1
    you should set include-update tag of weblogic-cmp-rdbms-jar.xml, then ejb would call ejbFind() before ejbFindXXX,
    but this tag is for cmp, what about bmp,
    in spec, bmp also should flush state before ejbFind(), does weblogic implement the spec?

    In WL, I think you have to set the "delay writes to end of tx" option to
    false.
    Peace,
    Cameron Purdy
    Tangosol, Inc.
    http://www.tangosol.com/coherence.jsp
    Tangosol Coherence: Clustered Replicated Cache for Weblogic
    "patrick" <[email protected]> wrote in message
    news:3e523189$[email protected]..
    the message before said in weblogic 6.1
    you should set include-update tag of weblogic-cmp-rdbms-jar.xml, then ejbwould call ejbFind() before ejbFindXXX,
    but this tag is for cmp, what about bmp,
    in spec, bmp also should flush state before ejbFind(), does weblogicimplement the spec?
    >
    >

Maybe you are looking for

  • Queries regarding Single Sign On

    Hi Experts, I am new to Single Sign On and have few doubts 1)For OAM to implement single sign on across multiple applications , is it mandatory that the identity store of OAM and the application to be the same.Is it possible that the applications hav

  • One Apple ID, 2 iMacs...separate iTune accts?

    Our family has one Apple ID and 2 iMacs. Can we have 2 separate iTunes accts, one for each iMac, w separate ID's? .... or must we sign in on both iMacs using my apple ID to purchase & redeem?  Just trying to keep 'mine' and 'theirs' separate. 

  • How to put label name for a radiobutton

    how to label the radiobutton in abap code?

  • Aperature hanging up and won't open?

    Since the last software update my Aperature program hangs up and won't open, intermittently.  Who do I talk to about this?  I bought it through the App store on i Tunes.

  • Audionote says it is damaged when I open it

    Audionote opens a bunch of windows then crashes and stating that it is damaged. I deleted it then downloaded it again three or four times but it still does it. Any suggestions?