geronimo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thierry Templier <>
Subject Integration of Geronimo modules (Tx / JCA) in Spring
Date Mon, 23 May 2005 19:15:25 GMT

We try to use the Geronimo Transaction Manager and JCA
Connection Manager in a standalone Spring application
in order to use JCA connectors and XA Transactions
without an application server or only in a web
container (for example Tomcat...).

Although the source code of these modules is really
great (congratulations for your work), we have had
some little problems when we try to make work the
application with them. We work with the 1.0-M3 version
of Geronimo.

1°) When we try to use the Geronimo transaction
manager, we have had a NullPointerException in the
newTransaction method of the
ConnectionTrackingCoordinator class. As a matter of
fact, the oldInstanceContext instance is null whereas
we do the following thing in the
TransactionContextManagerFactoryBean class:


So we modify the newTransaction method as following:
public void newTransaction() throws ResourceException
    InstanceContext oldInstanceContext =
(InstanceContext) currentInstanceContexts.get();
    if( oldInstanceContext!=null ) {

Perhaps have we not make a correct initialization of
the Transaction Manager module (TransactionManager and
TransactionContextManager). Here is the code to do

//Instanciate the Geronimo extended transaction
if( this.transactionManagerImpl==null ) {

//Select a recovery support
XidFactory xidFactory=new XidFactoryImpl();
if( this.transactionLog==null ) {
    this.transactionLog=new UnrecoverableLog();
Recovery recovery=new

//Instanciate the transaction context manager


2°) We have too an other problem. Geronimo seems to
work with the NamedXAResource interface (an interface
which extends the XAResource interface).
We make some tests with XAPool and we have a
ClassCastException if we don't wrap the XAResource we
use in a WrapperNamedXAResource class:

Transaction ntx = this.getTransaction();

Is it possible to use directly XAResource with the
Geronimo Transaction Manager?

I'll try to make our integration work with the latest
version of these modules.
Thanks for your help and your answers,

Take a look at my blog:

Le Yahoo! Messenger BETA est arrivé ! : Découvrez les appels audio illlimités et le partage
de photos facilité
Téléchargez cette version sur

View raw message