geronimo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joerg Heinicke <joerg.heini...@gmx.de>
Subject Re: TransactionCachingInterceptor is returning the same ManagedConnection despite different ConnectionRequestInfo
Date Wed, 19 Jul 2006 12:43:41 GMT
Joerg Heinicke <joerg.heinicke@...> writes:

> > I think in addition you may need to specify that the resource adapter  
> > is unshared.  I'm not sure how to do this in jencks: it ought to be a  
> > configuration option on the component that is using the connection  
> > factory.
> 
> I don't use the complete Geronimo J2EE server and so neither a deployed
> resource adapter. I just set this infrastructure up with Spring and some
> Geronimo jars like connector and transaction. I don't know where
> ConnectionInfo was instantiated atm, but how can I set the unshareable
> property there? Where is it normally set?

Back to code and debugging I found out that it is the GenericConnectionManager
or its super class, the AbstractConnectionManager, which instantiates the
ConnectionInfo. Furthermore there is a ConnectionTracker interface and
ConnectionTrackerCoordinator as implementation, which sets the environment and
so the unshareable property. So far, so good ...

Now it gets to Jencks and so might be a bit off topic ... Jencks allows to pass
the ConnectionTracker and if one is passed the ConnectionTrackerInterceptor gets
applied. This works and ConnectionTrackerCoordinator.setEnvironment() gets
called. Unfortunately at this point there is no InstanceContext stored in its
ThreadLocal field currentInstanceContexts, which lets the setEnvironment()
method exit without doing anything. Now I wonder how such a InstanceContext gets
injected into the coordinator. It implements TrackedConnectionAssociator and
with enter(InstanceContext) the InstanceContext is put into the ThreadLocal
field. Unfortunately I don't know how to register the
ConnectionTrackerCoordinator as TrackedConnectionAssociator, so that it gets
informed about an entered InstanceContext. I only found
TransactionContextInterceptor and TransactionContextInitializer, but don't know
how to use them.

Any ideas? Thanks in advance,

Joerg


Mime
View raw message