users@glassfish.java.net

Re: Naming environment in a startup module

From: Marina Vatkina <marina.vatkina_at_oracle.com>
Date: Wed, 29 Feb 2012 15:25:30 -0800

You can inject
com.sun.enterprise.transaction.api.JavaEETransactionManager using HK2
API. But you need to be very careful with accessing it on startup - it
shouldn't be started before all applications had been loaded if
transaction recovery is enabled on startup.

-marina

forums_at_java.net wrote:
> Hi all,
>
> I'm currently writing a Startup module for Glassfish v3.1 by
> implementing the
> org.glassfish.api.Startup interface.
>
> I just want to get the java:appserver/TransactionManager from the naming
> environment.
>
>
>
> Is there any way to get a reference to the current InitialContext as it
> exists in the old fashion LifecycleListener event context
> : http://docs.oracle.com/cd/E18930_01/html/821-2418/beans.html#beanw [1].
>
> Otherwise, any other way to do this ?
>
> Thanks
>
>
>
>
> [1] http://docs.oracle.com/cd/E18930_01/html/821-2418/beans.html#beanw
>
> --
>
> [Message sent by forum member 'brasseld']
>
> View Post: http://forums.java.net/node/883879
>
>