• 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

how to get multiple data sources in jboss

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi all,

i am using jboss 4.2 with oracle 10g.
my application needs connections to two different database.

I tried to configure database different datasources in ./server/default/deploy/oracle-ds.xml as follows


oracle-ds.xml
-------------


can you help me resolve the issue?
 
Sheriff
Posts: 10445
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

2008-06-17 18:53:35,049 WARN [com.arjuna.ats.jta.logging.loggerI18N] [com.arjuna.ats.internal.jta.transaction.arjunacore.lastResource.disallow] [com.arjuna.ats.internal.jta.transaction.arjunacore.lastResource.disallow] Adding multiple last resources is disallowed. Current resource is org.jboss.resource.connectionmanager.TxConnectionManager$LocalXAResource@12a801



You probably are using more than one non-XA resource in the same transaction. Are you using the 2 (non-XA) datasources as part of the same transaction?
 
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi All,
Even i am facing the same problem and found a solution on the net while googling to tackle this that put a property in the conf/jbossjta-properties.xml as follows:


This works wonder and problem vanishes but My problem is that, my application was working fine earlier with Jboss 4.0.03SP1 but why suddenly this is happening?

I did some Research (Well Almost! ) and i found that it generally happens when you try to access two DataSources simultaneously.
But in my application i am using it but one after another i.e. i am calling the first one taking the data closing the resultset and statement and then calling the second dataSource but still the error.

Can anyone please clarify on this and provide me a solution that i can include in my code.
Or is it okay to just supress the error by including the above property line in the properties file.

Thanks in advance.
 
reply
    Bookmark Topic Watch Topic
  • New Topic