• 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
  • Ron McLeod
  • Paul Clapham
  • Devaka Cooray
  • Tim Cooke
Sheriffs:
  • Rob Spoor
  • Liutauras Vilda
  • paul wheaton
Saloon Keepers:
  • Tim Holloway
  • Tim Moores
  • Mikalai Zaikin
  • Carey Brown
  • Piet Souris
Bartenders:
  • Stephan van Hulst

Transactions - JMS

 
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Does anybody know why the container throws a TransactionInProgressException when met1() in the following bean is called ? I am trying to define transaction demarcation within the bean using the JMS API.

I know that the problem can be avoided by using commit|rollback in JTA instead of using commit|rollback from JMS. I just don't understand where the transaction is started. The transaction-type element in the deployment descriptor is Bean, so the container should not start a transaction when met1() is invoked.

Perhaps one should best avoid using commit|rollback from JDBC and JMS alltogether when one writes code which executes inside an EJB container?

Br,
Sven T.

 
Sven Thor
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
There was an error in the code in the previous post.

utx.commit() was supposed to be commented out:

 
What I don't understand is how they changed the earth's orbit to fit the metric calendar. Tiny ad:
Smokeless wood heat with a rocket mass heater
https://woodheat.net
reply
    Bookmark Topic Watch Topic
  • New Topic