Page 1 of 1

Transaction Attributes Table Bean-Managed

Posted: Thu Feb 27, 2014 11:53 am
by IndoKnight
I'm referring this - 5.4.3 Transaction Attributes Table Bean-managed (page 55)
from Enterprise Java Beans 3.pdf by Frits.

I have understood if a client invokes Bean Managed Transaction method, the client's transaction is always suspended. I don't understand two things in this topic.
1. What is the difference between transaction associated with instance and with the method?
2. How and why transaction currently associated with the instance is only applicable for a Stateful SB?

May be I can remember if somebody hints me.

Cheers,
IndoKnight

Re: Transaction Attributes Table Bean-Managed

Posted: Thu Feb 27, 2014 12:55 pm
by admin
A stateful bean instance is locked to a particular client and so it is possible to span a transaction accross multiple method calls. Therefore, such a transaction is associated with the instance.

In case of other beans, a client's call can be routed to any instance of a bean. Therefore transaction cannot span more than a method. Hence, the transaction has to be associated with a method.

Re: Transaction Attributes Table Bean-Managed

Posted: Thu Feb 27, 2014 1:17 pm
by IndoKnight
Yes, that makes sense.

Thank you.

Cheers,
IndoKnight