• 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 ...
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
  • Mikalai Zaikin

Calling transactional business methods after marking for rollback

Ranch Hand
Posts: 342
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

given following situation:

A client runs in an active transaction that is marked for rollback. Now the client calls a business method of a CMT bean those transaction attribute is one of the following: REQUIRED, SUPPORTS, MANDATORY.

Does anyone know if / where the behavoir of the bean is specified in the specs ?

In the spec some times the term "valid transaction context" is used. Is the transaction context in the scenario above considered "valid" ?
Ranch Hand
Posts: 413
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Ralph,

I think finally I could able to find the spec explanation for your and mine doubt.

See 14.3.8 and

The javax.ejb.EJBTransactionRolledbackException and javax.ejb.TransactionRolledbackLocalException are subclasses of the javax.ejb.EJBException. The javax.transaction.TransactionRolledbackException is a subclass of the java.rmi.RemoteException. It is defined in the JTA standard extension.

If a client receives one of these exceptions, the client knows for certain that the transaction has been marked for rollback. It would be fruitless for the client to continue the transaction because the transaction can never commit.

Think of how dumb the average person is. Mathematically, half of them are EVEN DUMBER. Smart tiny ad:
a bit of art, as a gift, that will fit in a stocking
    Bookmark Topic Watch Topic
  • New Topic