-
1. Re: Passing flags into xaResource.start(..) for Oracle Loose
marklittle Feb 11, 2009 9:28 AM (in response to javajohnson)What makes you think something has changed around TS to prevent what you're doing working?
-
2. Re: Passing flags into xaResource.start(..) for Oracle Loose
javajohnson Feb 11, 2009 9:56 AM (in response to javajohnson)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 9.2.0.4.0 - Production JServer Release 9.2.0.4.0 - Production 09:44:27,441 INFO [SettingsFactory] JDBC driver: Oracle JDBC driver, version: 11.1.0.7.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 9.2.0.4.0 - Production JServer Release 9.2.0.4.0 - Production 09:49:39,410 INFO [SettingsFactory] JDBC driver: Oracle JDBC driver, version: 11.1.0.7.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! -
3. Re: Passing flags into xaResource.start(..) for Oracle Loose
marklittle Feb 11, 2009 11:52 AM (in response to javajohnson)Hmmm, not exactly sure what might have changed in the ts code to affect that. I'll check with the team.
-
4. Re: Passing flags into xaResource.start(..) for Oracle Loose
javajohnson Feb 11, 2009 11:54 AM (in response to javajohnson)I guess the underlying point is still, Can I pass additional flags to the Transaction Manager when a transaction was started?
-
5. Re: Passing flags into xaResource.start(..) for Oracle Loose
jhalliday Feb 11, 2009 12:25 PM (in response to javajohnson)> 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. -
6. Re: Passing flags into xaResource.start(..) for Oracle Loose
mauromol Feb 24, 2009 6:23 AM (in response to javajohnson)"JavaJohnson" wrote:
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.
Hi JavaJohnson!
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:
http://www.jboss.org/index.html?module=bb&op=viewtopic&t=151003
Mauro.