Hi Amit,
thanks for your answer.
amit punekar wrote:Hi,
AFAIK this condition would happen if the bean uses bean managed transactions. In this a method would start a transaction but leave it open to be committed by another method. Due to this the container will not passivate the SFSB instance as it would still be servicing the client.
Why should it only happen in a BMT (bean managed transaction)? The extended persistence context could be also used with a CMT (container managed transaction). Or, do I mix something?
amit punekar wrote:
As per the core Ejb specs a client to such bean should take care not to call remove method.
See 4.4.4 ejb core specs.
I guess you mean this paragraph:
If a session bean instance is participating in a transaction, it is an error for a client to invoke the
remove method on the session object’s home or component interface object. The container
must detect such an attempt and throw the javax.ejb.RemoveException to the client.
The container should not mark the client’s transaction for rollback, thus allowing the client to
recover.
Now you have me at a complete loss. I thought that an extended context maintains its managed objects between transactions and all objects accessed or created hang around until the bean goes away. Which means until the @Remove method is called. Now, that should result in an exception. I am confused
Cheers,
Bob