• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Two connections in one transaction?

 
alex seba
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I'm using a stateless Session Bean as a facade to some Entity Beans. All transactions are managed by the container. Within a business method of the Session Bean, is it possible to have access to two connection pools within on transaction? I'm getting a java.sql.SQLException that there cannot be two connections within one transaction, so I'm quite sure there is no way, at least with CMT. But as I don't have too much experience with J2EE I'm posting my question here.
Thanks in advance
Alex
 
Kyle Brown
author
Ranch Hand
Posts: 3892
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It should work so long as your Database driver supports XA. Which application server are you using? The way in which you set the database driver up depends on the application server.
Kyle
 
alex seba
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Kyle,
thank you for your answer!
Actually I'm using Weblogic, sometimes JBoss (unfortunately not Websphere...;-)).
And I'm using a DB2 with the COM.ibm.db2.jdbc.app.DB2Driver and an InstantDB with the org.enhydra.instantdb.jdbc.idbDriver.
Any hints how to set up my drivers?
Thanks
Alex
 
Kyle Brown
author
Ranch Hand
Posts: 3892
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Nope. You might want to post a more specific question about setting up JTA properties for DB2 drivers in WebLogic in the WebLogic forum.
Kyle
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic