What makes you think something has changed around TS to prevent what you're doing working?
I used the same oracle drivers, exact same ear, and the same data source configuration file between JBoss 4.2.0.GA and 5.0.0.GA
The error only manifests itself in JBoss 5.0.0
Jboss 4 startup:
09:44:09,613 INFO [TransactionManagerService] JBossTS Transaction Service (JTA version) - JBoss Inc. ... 09:44:27,441 INFO [SettingsFactory] RDBMS: Oracle, version: Oracle9i Release 220.127.116.11.0 - Production JServer Release 18.104.22.168.0 - Production 09:44:27,441 INFO [SettingsFactory] JDBC driver: Oracle JDBC driver, version: 22.214.171.124.0-Production
and Jboss 5 startup:
09:49:33,722 INFO [TransactionManagerService] JBossTS Transaction Service (JTA version) - JBoss Inc. ... 09:49:39,410 INFO [SettingsFactory] RDBMS: Oracle, version: Oracle9i Release 126.96.36.199.0 - Production JServer Release 188.8.131.52.0 - Production 09:49:39,410 INFO [SettingsFactory] JDBC driver: Oracle JDBC driver, version: 184.108.40.206.0-Production
Both of these are running under JDK 1.6_11 on a win XP machine.
The JBoss 4.2.0 instance has no problems connecting to both data sources, but the 5.0. version throws cryptic exceptions when the second datasource is queried against in the same transaction.
I am using the 'standard' config in JBoss 5, and the default config in JBoss 4.2.
But let me throw one more confusing wrench in there. If I use an Older Oracle driver version, 10.2.0.1.0, the JBoss 4.2 works fine, but 5.0 does not work, either via my wrapped implementation or standard.
Thanks for your help!
Hmmm, not exactly sure what might have changed in the ts code to affect that. I'll check with the team.
I guess the underlying point is still, Can I pass additional flags to the Transaction Manager when a transaction was started?
> Can I pass additional flags to the Transaction Manager when a transaction was started?
In JBossTS stanalone it is possible using modifier classes and an extended version of enlistResource(), but the app server does not and never has used that feature.
This is most likely down to a JCA behaviour change, perhaps related to the way transaction branches work. Try the JCA forum or send me a test case and I'll take a look when I have time.
After much debugging, I can across a problem with using the Oracle XA driver (v 11.1) in JbossAS 5.0 with JbossTS (both JTA and JTS configurations)
Our environment is a single Oracle 9i instance with multiple users. Each one of these users is configured using an XA datasource.
Something changed in the Transaction manager between JBossAS 4.2 and 5.0 where the transaction is started differently. When sharing an XA transaction across users in the same instance, the transaction has to be started with the xa_open parameter Loose_Coupling=true. The oracle JDBC driver has a way to do this by passing the flag: OracleXAResource.ORATRANSLOOSE into the xaresource.start method.
If the flag is not passed, Oracle will fail with an exception when a query is run on the second user in the transaction.
Is the exception you were receiving related to an XMER_NOTA XAException?
I am facing problems with a similar situation but I couldn't succeed to solve it even adding the flag OracleXAResource.ORATRANSLOOSE you mention :-( By the way, I also came to the conclusion of wrapping all those classes...
By the way, I found that another way of setting that flag without wrapping all those classes is to set a connection property in the OracleXADataSource:
// ds is my OracleXADataSource ds.getConnectionProperties().setProperty(OracleDriver.xa_trans_loose, Boolean.TRUE.toString();
However, by debugging I can't really understand whether the OracleXAResource is really setting the flag or not. You may try and see if it works for you.
By the way, I opened the following thread: