• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

EJBs and XA transactions

 
Nathan Pruett
Bartender
Posts: 4121
IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I've run into a problem recently with XA transactions that's confusing me and I wondered if anyone else has dealt with it... I've changed some session EJBs to MDBs in an existing application - had to set up all the JMS resources for the first time to. I wanted to make my MDBs CMT - but when I tried to test them, I got an error saying that the MDB required a transaction, but the container was unable to provide one without an XA compatible driver. OK... so I switched my database driver in the datasource used by my application to the XA driver. Now my MDBs work - but existing CMT EJBs that are marked as NotSupported, Supports, etc. that don't use transactions bomb out with errors from the container stating 'Not in a transaction'... So does XA *require* that *everything* always be in a transaction? Or does it sound like I have something set up wrong?

I'm using Weblogic 8.1 and Oracle 8, if that's any help...
 
Roger Chung-Wee
Ranch Hand
Posts: 1683
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Have you by any chance changed your app so that a session EJB is sending a JMS message which must be processed in a transaction?
 
Nathan Pruett
Bartender
Posts: 4121
IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Nope, the JMS message is being sent directly from a servlet, and the EJBs that were throwing "Not in a transaction" were completely separate from the MDBs - they weren't calling the MBDs, and the MDBs weren't calling them.

Still haven't found out anything - so far the workaround is to make the MDBs BMT.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic