Win a copy of AWS Security this week in the Cloud/Virtualization forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Jeanne Boyarsky
  • Junilu Lacar
  • Henry Wong
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Frits Walraven
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • salvin francis
  • fred rosenberger

Question about conversational state

 
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?
 
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....
 
We noticed he had no friends. So we gave him this tiny ad:
Devious Experiments for a Truly Passive Greenhouse!
https://www.kickstarter.com/projects/paulwheaton/greenhouse-1
    Bookmark Topic Watch Topic
  • New Topic