• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

transaction is suspended when a CMT bean joins?

 
Bartender
Posts: 2418
13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 ?

 
Creator of Enthuware JWS+ V6
Posts: 3411
320
Android Eclipse IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic