Win a copy of OCP Oracle Certified Professional Java SE 11 Developer Practice Tests this week in the OCP 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
  • Ron McLeod
  • Tim Cooke
Sheriffs:
  • Devaka Cooray
  • paul wheaton
  • Mark Herschberg
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Frits Walraven
  • Jj Roberts
Bartenders:
  • Carey Brown
  • salvin francis
  • Piet Souris

Passivation in Statefull Session Beans

 
Ranch Hand
Posts: 643
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 62
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks
 
Forget this weirdo. You guys wanna see something really neat? I just have to take off my shoe .... (hint: it's a tiny ad)
the value of filler advertising in 2021
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic