• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Passivation in Statefull Session Beans

 
Gowher Naik
Ranch Hand
Posts: 643
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In statefull session bean The objects that are assigned to the instance�s non-transient fields after the ejbPassivate method completes must be one of the following:

A null.
An enterprise bean�s remote interface reference.
An enterprise bean�s remote home interface reference.
An entity bean�s local interface reference.
An entity bean�s local home interface reference.
An reference to the SessionContext object.
An reference to the environment naming context (java:comp/env JNDI)
An reference to the UserTransaction interface.
An reference to a resource manager connection factory.
The Bean Provider must assume that the content of transient fields MAY be lost between the ejbPassivate and ejbActivate notifications.


Does it mean that all above will servive passivation?
That is we donot need to keep all above variables null(accept transient variable) in ejbActivation() method and then reassign same variables in ejbPassiavte() method

Thanks
 
Awishek sinha
Ranch Hand
Posts: 62
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
yes, refences in above state are not required to reassign in ejbActivate except the transient variable which might loss its state while activation
 
Gowher Naik
Ranch Hand
Posts: 643
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic