This week's book giveaway is in the Cloud/Virtualization forum.
We're giving away four copies of Learning OpenStack Networking: Build a solid foundation in virtual networking technologies for OpenStack-based clouds and have James Denton on-line!
See this thread for details.
Win a copy of Learning OpenStack Networking: Build a solid foundation in virtual networking technologies for OpenStack-based clouds 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:
  • Liutauras Vilda
  • Campbell Ritchie
  • Tim Cooke
  • Bear Bibeault
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Knute Snortum
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Ganesh Patekar
  • Stephan van Hulst
  • Pete Letkeman
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Ron McLeod
  • Vijitha Kumara

InitialContext and Passivation  RSS feed

 
Ranch Hand
Posts: 59
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey Ranchers,
Will the container be able to restore an instance variable that was previously stored with java.naming.InitialContext after passivation-activation?

Cheers,
Sandeep
 
Ranch Hand
Posts: 146
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
yes
 
Sandeep Prabhakar
Ranch Hand
Posts: 59
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey,
Can you explain me how? The InitialContext does not implement the Serializable Interface and the specs mentions only about SessionContext.

Cheers,
Sandeep
 
Ranch Hand
Posts: 58
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

It is not required for a class to definetly implement java.io.Serializable interface in order to get passivated.

According to the spec it is a container's responsiblity to retain the
state of context during the passivation stage.The container is free to
select any technics.

Hope this answer helps you.
 
Ranch Hand
Posts: 41
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sandeep

It is responsibility of the Container to restore the following during ejbPassivate / ejbActivate mechanism. Container is free to use any technique : (In case u have not patented them

Ref to home and component interfaces, a ref to session context, jndi, user transaction, resource manager connection factory reference.

Do take a look @ object substitution features of the Java Serialization protocol. This states how to serialize an object even though it does not implement java.io.Serializable.

Cheers
Nishant
 
Sandeep Prabhakar
Ranch Hand
Posts: 59
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey Ranchers,
Thanks for you help. I guess I now understand passivation better .
Nishant, regarding patenting, I will for sure inform you when I plan to have one .

Cheers,
Sandeep
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!