Win a copy of Beginning Java 17 Fundamentals: Object-Oriented Programming in Java 17 this week in the Java in General forum!
  • 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:
  • Tim Cooke
  • Campbell Ritchie
  • Ron McLeod
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Junilu Lacar
  • Rob Spoor
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Tim Moores
  • Jesse Silverman
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Piet Souris
  • Frits Walraven

MDB calls EJB requires new transaction

 
Ranch Hand
Posts: 137
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 354
Eclipse IDE Oracle Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
it is indeed Oracle thin driver.
 
Abhinav Srivastava
Ranch Hand
Posts: 354
Eclipse IDE Oracle Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic