• 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:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Two Connection pool in Single EJB transaction

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Ranch Hand
Posts: 73
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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()

}
 
Ranch Hand
Posts: 489
Eclipse IDE Tomcat Server Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Are both the datasources TX Datsources? And the drivers XA compliant? Do you use a global transaction?

ram.
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic