It's not a secret anymore!
The moose likes EJB Certification (SCBCD/OCPJBCD) and the fly likes Simple session bean question Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Certification » EJB Certification (SCBCD/OCPJBCD)
Bookmark "Simple session bean question" Watch "Simple session bean question" New topic

Simple session bean question

Bobby S Sidhu

Joined: Dec 13, 2003
Posts: 6
Can a stateful session bean instance can be passivated while it is associated with a transaction?

Brian Smith
Ranch Hand

Joined: Oct 26, 2002
Posts: 232
hi boby,
A bean(stateful session and entity) can't be passivated while they are in transaction. They must get out of their transaction context.
Nauman Khan
Ranch Hand

Joined: Aug 07, 2003
Posts: 49
A Stateful session bean will never be passivated when it is in a transaction.Because the condition of passivation is this that bean is wasting the resources and not service the client for long time then container decides to passivate the bean by using the serialization mechanism.
On the other hand if stateful bean is in transaction that means it is under process and doing some work.

Bobby S Sidhu

Joined: Dec 13, 2003
Posts: 6
Thx all...
subject: Simple session bean question
jQuery in Action, 3rd edition