Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

MDB calls EJB requires new transaction

 
Yan Zhou
Ranch Hand
Posts: 137
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I am on WebLogic 8.1 SP3 running against Oracle 10g.

I noticed that if I have a message driven bean call another session bean that in turn makes JDBC calls, the session bean's transaction attribute must be "requiresNew", if it is "required", I got the following exception:

JDBC driver does not support XA, can not participate in a two-phase commit.

What does that mean?
Thanks.
Yan
 
Abhinav Srivastava
Ranch Hand
Posts: 354
Eclipse IDE Java Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The first thing to see is what driver you are using? It should work with oracle thin driver.
 
Yan Zhou
Ranch Hand
Posts: 137
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
it is indeed Oracle thin driver.
 
Abhinav Srivastava
Ranch Hand
Posts: 354
Eclipse IDE Java Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You won't believe that I ran into the same issue today.
My understanding is - in this case, two resources are involved :
The XAJMSConnectionFactory and your Datasource. This requires a 2PC protocol which is not supported by normal oracle thin driver. Probably oracle thin(XA) driver would work. However, there is an option of emulating 2PC even with non-XA drivers (Advanced prop of Datasource in Weblogic console).
And 'Required' tx attribute forces operations involving connections from two different sources to share the same tx context which is possible only by using 2PC. Hence the problem.
I would like to hear if you have found out something which makes more sense.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic