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

if variables not set to null before passivation?

 
Ranch Hand
Posts: 257
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
in stateful session beans non-transient and non-serializable fields have to be set to null before passivation.

if this statement is true then what happens if we wont set them to null?
 
Ranch Hand
Posts: 97
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
___________________________________________________________________________
in stateful session beans non-transient and non-serializable fields have to be set to null before passivation.

if this statement is true then what happens if we wont set them to null?
___________________________________________________________________________

The conversational state of stateful session bean is defined as the session bean instance's field values, plus the transitive closure of the objects from the instance's fileds reached by following Java object references.

In advanced cases, a session bean's conversational state may contain open resources, such as open sockets, and open database cursors.

A CONTAINER CAN NOT RETAIN SUCH RESOURCES WHEN A SESSION BEAN INSTANCE IS PASSIVATED.

A developer of such a session bean must close and open the resources in the ejbPassivate and ejbActivate notifications.
 
What are your superhero powers? Go ahead and try them on this tiny ad:
the value of filler advertising in 2021
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic