Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Doubt regarding ejbPassivate()

 
shri mon
Ranch Hand
Posts: 63
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I wanted to know that whether a transient variable with either a null or a non null value will not cause a problem in the ejbPassivate method?

Thanks,
Shrimon
 
Ankit Doshi
Ranch Hand
Posts: 222
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I guess it should not cause any problems. Because the requirement for the ejbPassivate is to passivate the non-transient fields, so any value or null for a transient variable should not be a problem.
 
shri mon
Ranch Hand
Posts: 63
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you


Thanks,
Shrimon
 
Rahul Mishra
Ranch Hand
Posts: 211
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
But the spec also states that if there is a problem encountered while passivating, the container may choose to delete the bean instance
 
AmitKumar Jain
Ranch Hand
Posts: 95
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
HFEJB page205 clearly discusses above point. Having a transient field has no side effects on passivation. The only thing is that after activation of the previously passivated bean, the transient field can have any value and u'll have to reset the variables yourself in ejbActivate().
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic