This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes EJB Certification (SCBCD/OCPJBCD) and the fly likes Transactions - JMS Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Certification » EJB Certification (SCBCD/OCPJBCD)
Bookmark "Transactions - JMS" Watch "Transactions - JMS" New topic
Author

Transactions - JMS

Sven Thor
Ranch Hand

Joined: Jan 31, 2004
Posts: 34
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

Joined: Jan 31, 2004
Posts: 34
There was an error in the code in the previous post.

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

 
Consider Paul's rocket mass heater.
 
subject: Transactions - JMS
 
Similar Threads
Session Beans and SessionBean interface.
ETS Question doubts
Local Interfaces
answer for this question
JNDI Lookup problem, WebSphere + Queue Connetion Factory