You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@geronimo.apache.org by Aditya Gupta <ne...@gmail.com> on 2005/12/22 09:50:12 UTC

Does WASCE have a TransactionManager Lookup class ?

hi,

i was trying to use transactions in WASCE ,but could not locate a
TransactionManager lookup class .How do we specify how Hibernate should
obtain a reference to the TransactionManager class ?

regards
Aditya Gupta

Re: Does WASCE have a TransactionManager Lookup class ?

Posted by Guillaume Nodet <gu...@worldonline.fr>.
Hibernate can use the UserTransaction instead of the TransactionManager, 
but you won't be able
to suspend / resume transactions.   If you do not need suspend/resume, 
just set the
autodetectTransactionManager attribute of the JtaTransactionManager to 
false.

In any cases, afaik even if you can grab a reference to the 
TransactionManager,
you won't be able to suspend a user transaction, as they are unrelated.

I think the way to go would be to grab a reference on the 
o.a.g.TransactionContextManager
and create a a.o.g.GeronimoTransactionManager (you can find this class 
in the jencks.org project).
This one wraps the geronimo TransactionContextManager in a 
TransactionManager so that you will be able
to suspend / resume  user transactions.

Cheers,
Guillaume Nodet

Aditya Gupta wrote:

> hi,
>
> i was trying to use transactions in WASCE ,but could not locate a 
> TransactionManager lookup class .How do we specify how Hibernate 
> should obtain a reference to the TransactionManager class ?
>
> regards
> Aditya Gupta



Re: Does WASCE have a TransactionManager Lookup class ?

Posted by Guillaume Nodet <gn...@codehaus.org>.
Hibernate can use the UserTransaction instead of the TransactionManager, 
but you won't be able
to suspend / resume transactions.   If you do not need suspend/resume, 
just set the
autodetectTransactionManager attribute of the JtaTransactionManager to 
false.

In any cases, afaik even if you can grab a reference to the 
TransactionManager,
you won't be able to suspend a user transaction, as they are unrelated.

I think the way to go would be to grab a reference on the 
o.a.g.TransactionContextManager
and create a a.o.g.GeronimoTransactionManager (you can find this class 
in the jencks.org project).
This one wraps the geronimo TransactionContextManager in a 
TransactionManager so that you will be able
to suspend / resume  user transactions.

Cheers,
Guillaume Nodet

Aditya Gupta wrote:

> hi,
>
> i was trying to use transactions in WASCE ,but could not locate a 
> TransactionManager lookup class .How do we specify how Hibernate 
> should obtain a reference to the TransactionManager class ?
>
> regards
> Aditya Gupta