• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Question about conversational state

 
Ricol Gu
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In page 72 of the ejb2.0 spec, it said "If the session bean instance stores in its conversational state an object reference to the java:comp/env JNDI context or its subcontext, the container must be able to save and restore the object reference across the instance�s passivation. The container can replace the original object with a different and functionally equivalent object during activation."
But in weblogic 7, I create a Context as a conversational state. After the bean has been passtivated and activated. When it make use of the context, it throws an exception. After I add "ctx = new InitialContext();" in the ejbActivate method. It's OK. Does the JNDI context need restore it manually?
 
Ko Ko Naing
Ranch Hand
Posts: 3178
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I guess it's vendor-specific implementation... If you do such things in WebLogic's EJB container, u have to restore it by yourself. But if you are usign WebSphere EJB container, then u might not need to restore it such way...

EJB Spec lets the vendors implement in their own way in dealing with the Context, I guess... So don't be afraid of the vendor-specific questions for the exam... There won't be any....
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic