geronimo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hamilton Verissimo de Oliveira (Engenharia - SPO)" <hamilton.olive...@agenciaclick.com.br>
Subject Re: [jira] Commented: (GERONIMO-161) LocalXAResourceInsertionInte rceptor could use XAResource implementation
Date Tue, 06 Apr 2004 19:25:15 GMT
-----Mensagem original-----
De: David Jencks [mailto:david@coredevelopers.net]

> In other words,  if an adapter supports getXAResource it MUST support 
> getLocalTransaction.

Didn't know that. Thanks.

> I don't see why a jdbc LocalTransaction should use XAResource.  I would 
> think it would use java.sql.connection.setAutocommit for begin and the 
> connections commit/rollback methods.

Hey, no. In my case - for instance - I'm dealing with an OracleXADataSource,
I don't want to handle anything with commit in its name :-)  
No autocommit and things like this. I'll leave everything to Oracle.

> I think that, for an adapter that supports xa, if you want to use only 
> local transactions, you should explicitly say this by deploying it with 
> the useLocalTransactions flag set to true.  

Maybe the semantic of useLocalTransactions is missing. I think
useLocalTransactions means that one won't bother to pass transaction
contexts to remote machines. Thats it. On the other hand with or without
useLocalTransactions flag set, the transaction should use the XAResource
implemented by the datasource - when available. If its not available, no
problem to create a wrapper using setAutocommit/et al.


> I haven't looked very hard at your openejb patch yet, but I think that 
> supplying separate wrappers for non-xa and xa jdbc implementations is a 
> good idea.  


Non-XA: JdbcManagedConnectionFactory
XA: JdbcTransactionalManagedConnectionFactory

Thats what I tried to achieve, although the getLocalTransaction is returning
an exception if invoked :-(

> I think that trying to unify everything in one 
> implementation will be too hard to maintain.  

+1


Regards,
hammett


Mime
View raw message