• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

InitialContext and Passivation

 
Ranch Hand
Posts: 59
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
yes
 
Sandeep Prabhakar
Ranch Hand
Posts: 59
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
reply
    Bookmark Topic Watch Topic
  • New Topic