users@glassfish.java.net

Inject Glassfish components in a lifecyle listener module

From: BRASSELY David <david.brassely_at_ineat-conseil.fr>
Date: Tue, 20 Dec 2011 16:54:08 +0000

Hi,

I'm trying to develop a Lifecycle Listener module<http://glassfish.java.net/nonav/docs/v3/api/com/sun/appserv/server/LifecycleListener.html> for which I need to get access to the com.sun.enterprise.transaction.api.RecoveryResourceRegistry singleton and many other things like Config (http-listener, https-listener, ...). But I encounter a problem because I don't know what is the best way to inject these components into my lifecyle listener class.
For now, my lifecycle is declared in the domain.xml file with the help of the corresponding asadmin command and is correctly loaded during the glassfish startup. I tried to add a simple @Inject in my class but it didn't work...

Please note that it's my first development under Glassfish v3...

Any suggestion ?

Thanks,

David BRASSELY