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
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 overridingHashtable userdata = getDBTransaction().getSession().getUserData();
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)
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 ?
Posted by jerome bosman | December 14, 2006 3:46 AM
Posted on December 14, 2006 03:46
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.
Posted by Didier Laurent | December 15, 2006 6:50 AM
Posted on December 15, 2006 06:50