Win a copy of The Business Blockchain this week in the Cloud forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

transaction is suspended when a CMT bean joins?

 
Himai Minh
Ranch Hand
Posts: 1359
7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
On p. 56 of Frits' notes,
The BM session bean starts a transaction 1. by invoking the method UserTransaction.begin(). The transaction T1 is started and will be the client's transaction context. The BM session bean invokes a method . on a CM session bean. According to the table the Container Managed session bean will now run under the transaction context (T1) of the client (ie. Bean Managed session bean). Finally the BM session bean commits the transaction by invoking UserTransaction.commit().


I think if the CM session bean's transaction attribute is REQUIRE_NEW, T1 of the BM bean will be suspended.
And if the CM session bean's transaction attribute is REQUIRE, SUPPORTS or Mandatory, T1 of the BM bean is used by this CM.

Any comments ?

 
Frits Walraven
Creator of Enthuware JWS+ V6
Saloon Keeper
Pie
Posts: 2531
112
Android Chrome Eclipse IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think if the CM session bean's transaction attribute is REQUIRE_NEW, T1 of the BM bean will be suspended.

Yes, that is correct (by the way be careful with your transaction attribute values, the correct values are REQUIRES_NEW, and REQUIRED)

And if the CM session bean's transaction attribute is REQUIRE, SUPPORTS or Mandatory, T1 of the BM bean is used by this CM.

Correct.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic