geronimo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Jencks <>
Subject Re: ContainerTransactionContext
Date Wed, 07 Apr 2004 04:02:08 GMT
I think if you want to use the geronimo jca framework with another 
transaction manager you will need to:

1. set up a (geronimo) TransactionManagerProxy that wraps the other jta 
tm.  It is designed to wrap an arbitrary jta tm.
2. use the geronimo UserTransactionImpl which knows how to manage the 
contents of TransactionContext
2.a replicate the TransactionContext interactions some other way
3. manage the InstanceContexts appropriately.  See for instance 
JettyWebApplicationContext for the simplest example of what  is needed. 
  If you have some kind of container managed transactions, look at the 
openejb interceptors.

I haven't studied the JOTM code extensively but it appears to me that 
it includes most of the connection management code that is in 
TransactionContext and InstanceContext directly in the tm.  If this is 
accurate, I think this is a questionable design in terms of component 

Does this make sense?

david jencks

On Tuesday, April 6, 2004, at 12:38 PM, Hamilton Verissimo de Oliveira 
(Engenharia - SPO) wrote:

> Sorry for the annoying messages :-)
> The ContainerTransactionContext holds an transaction manager and 
> stores the
> transaction created when begin() is invoked. If I'm using other TM
> implementation (I'm using JOTM) ContainerTransactionContext wouldn't be
> syncronized (except if I change all application code to use it, but 
> that
> won't be loosely-coupled, right?) ;-)
> First possibility is using TransactionManagerProxy, then a begin() in 
> my
> other TM implementation could tell ContainerTransactionContext that
> something happened.
> Thats 'cause ContainerTransactionContext is a rendezvous point for the 
> rest
> of geronimo code, but the rest of my application uses directly the
> UserTransaction/TransactionManager interfaces to begin/commit 
> transactions.
> Thoughts?
> Cheers,
> hammett

View raw message