Just because a class has "XA" in its name doesn't mean it provides any xa functionality. If you need 2pc, get a real xa database. Firebird is one, and it's free.
The jdbc local wrapper replaces the 2.x XADataSourceImpl. I think there is an example config for sybase.
Just as in 2.4, you can include more than one resource manager in a transaction, and if everything goes well you will have no problems. Just as with 2.x, if something does go wrong while committing you are risking inconsistent data.
Migrating to another database is not a simple matter. There are a lot of triggers and stored procedures involved as well as end-user issues.
The problem with using a local datasource is that if you have 2 EJBs getting a connection in the same transaction, the local datasource can give you different connections, the XA datasource gives you the same connection.
This worked with org.jboss.pool.jdbc.xa.wrapper.XADataSourceImpl
Is there anyway to simulate this for JBoss 3.x?
> Migrating to another database is not a simple matter.
> There are a lot of triggers and stored procedures
> involved as well as end-user issues.
Who is talking about migrating to another database?
> The problem with using a local datasource is that if
> you have 2 EJBs getting a connection in the same
> transaction, the local datasource can give you
> different connections, the XA datasource gives you
> the same connection.
You are the first person in the year this code has been available to claim that the local tx connection manager doesn't work properly in regards to always supplying the same ManagedConnection within a transaction. Do you have any evidence to back this up?
> This worked with
> Is there anyway to simulate this for JBoss 3.x?
Use the local tx connection manager, as I stated before.
My statement in regards to the Local datasource not returning the same connection within a transaction is based on my experience with 2.4.x. That is why we needed to use the XA Wrapper, then.
I have not tested this in 3.x, I assumed the behavior would be the same. I will test this and let you know the results.
Thanks for your responses.
I am getting:
15:44:25,378 WARN [TxConnectionManager$LocalXAResource] Prepare called on a local tx. Use of local transactions on a jta transaction with more than one branch may result in inconsistent data in some cases of failure.
I am really going to experience any different behavior in 3.x using the local datasource as compared to 2.4.7 using the XADataSourceImpl or is it just that 2.4.7 didn't display a message to warn me of this?
Semantics are the same, I just provide a warning in case you don't know what you are doing.