« Set jbo.ampool.doampooling=false to Reproduce Problems Related to AM Passivation / Activation | Main | Defining the Tab Size in JDeveloper 10.1.3 »

oracle.jbo.Session User Data Hashtable Not Saved Across Passivation and Activation


I explained in a previous post how to simulate the AM (Application Module) passivation / activation.
I got some feedback from customers that it helped in determining the cause of a java.lang.NullPointerException end-users were complaining about from time to time.

We investigated further and found out that the problem was related to information stored in oracle.jbo.Session user data hashtable

Hashtable userdata = getDBTransaction().getSession().getUserData();
The problem is that ADF Business Components do not handle this user data itself during passivation.and it's up to you to write some code in your application if you want to preserve the information across passivation and activation. You can do this by overriding passivateState() and activateState() methods.

For more information, see the ADF Developer's Guide, topics "9.10 How to Store Information About the Current User Session" and  "28.5 Managing Custom User Specific Information"
You can find there an example of code to save User Data at passivation in :"Example 28-7 Passivating and Activating Custom Information in the State Snapshot XML Document"

Comments (2)

jerome bosman:

Hello,


I've overrided passivateState & activateState in MyApplicationModuleImpl.


Debug:

1. ejbActivate/Passivate are well called

2. ejbActavate create a new SessionImpl object with null as userData

3. passivate/activateState are never called
Could you possibly help ?

Didier Laurent:

Jerome,

sorry for the lateness in reply, but I'm at www.javapolis.com this week.

I see you have logged a SR in Metalink for this issue and we will handle it there.

Regards,

Didier.

Post a comment

(If you haven't left a comment here before, you may need to be approved by the site owner before your comment will appear. Until then, it won't appear on the entry. Thanks for waiting.)

About This Entry

This page contains a single entry from the blog posted on November 14, 2006 10:10 AM.

The previous post in this blog was Set jbo.ampool.doampooling=false to Reproduce Problems Related to AM Passivation / Activation.

The next post in this blog is Defining the Tab Size in JDeveloper 10.1.3.

Many more can be found on the main index page or by looking through the archives.

Powered by
Movable Type and Oracle