• 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

HFEJB doubt

 
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi All,

I have a question about the "bean things" that can be done at various stages in a session bean life cycle.

Ref page 216 HFEJB- if you see, we can't force transaction rollbacks or find if a transaction has been set for a rollback but we can get transaction references and call methods on them in the ejbCreate() ejbActivate() ejbPassivate and ejbRemove() methods.

The question is why is it that we can perform transaction related operations for BMT beans and not for CMT beans in these methods?

cheers!
nik
 
Ranch Hand
Posts: 123
Hibernate Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Nick,


SPEC 7.5.7

A session bean�s newInstance, setSessionContext, ejbCreate, ejbRemove, ejbPassivate, ejbActivate, and afterCompletion methods are called with an unspecified transaction context.


So, you cannot use SessionContext methods to force transaction to complete, this is wit CMT only. In BMT you can definately get TransactionContext from SessionContext in these methods manage to your transaction programatically.

People,

Please correct me if I am wrong.

Thnks.
[ August 30, 2007: Message edited by: Neo Greet ]
 
reply
    Bookmark Topic Watch Topic
  • New Topic