This week's book giveaway is in the Raspberry Pi forum.
We're giving away four copies of Getting started with Java on the Raspberry Pi and have Frank DelPorte on-line!
See this thread for details.
Win a copy of Getting started with Java on the Raspberry Pi this week in the Raspberry Pi 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Tim Cooke
  • Jeanne Boyarsky
Sheriffs:
  • Rob Spoor
  • Devaka Cooray
  • Liutauras Vilda
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Piet Souris

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
 
When it is used for evil, then watch out! When it is used for good, then things are much nicer. Like this tiny ad:
Low Tech Laboratory
https://www.kickstarter.com/projects/paulwheaton/low-tech-0
reply
    Bookmark Topic Watch Topic
  • New Topic