users@glassfish.java.net

Re: how to obtain a TransactionManager in a servlet?

From: Sanjeeb Kumar Sahoo <Sanjeeb.Sahoo_at_Sun.COM>
Date: Fri, 20 Apr 2007 20:43:23 +0530

Hi Legolas,

Instead of injecting TranactionManager, inject a UserTransaction object
like this:
@Resource private javax.transaction.UserTranaction utx;

Now you can use utx to control transaction boundaries.

Thanks,
Sahoo

legolas wood wrote:
> Hi
> Thank you for reading my post
> I have tried to obtain a transaction manager using
>
> @Resource TransactionManager txm;
>
> and it does not work, can you tell me how i can create a
> TranasactionManager object in my servlet?
>
> Thanks
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>