• Post Reply Bookmark Topic Watch Topic
  • New Topic

Two Connection pool in Single EJB transaction

 
sravani karicheti
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,
I am in the position to use two connection pool in single EJB XA.If I run the method weblogic is giving following exception message

com.fortressit.ejb.PortableContextException: java.sql.SQLException:Connection has already been created in this TX context for pool named CONNPOOL_A. Illegal attempt to create connection from another pool: CONNPOOL_B.Please help me in this problem.
Thanks for any help.
 
Pallav Bora
Ranch Hand
Posts: 73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In the absence of details I would suggest you do the following. This way one will not be stepping on the toe of the other

create two methods :

method1() for datasource 1
method2() for datasource 2

now call method1() and method2() from your business method:

businessMethod()
{
method1()
method2()

}
 
ramprasad madathil
Ranch Hand
Posts: 489
Eclipse IDE Java Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Are both the datasources TX Datsources? And the drivers XA compliant? Do you use a global transaction?

ram.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!