users@glassfish.java.net

GF2.1 cluster & LifecycleListener

From: <glassfish_at_javadesktop.org>
Date: Tue, 11 May 2010 06:59:30 PDT

Hello,

I need to start some functionality on GlassFish 2.1 server's startup. I've played with a LifecycleListener implementation and have this working for my domain.

My application needs to run on a GlassFish cluster. The actual functionality the life cycle module kicks off is the registration of a GMS (Group Management Service) callback. I want to have this to run on each instance (each node agent) as the callback is used to inform an external application about the availability of the cluster members. The cluster has no load balancer in front and thus our internal application that consumes another deployed webservice on the cluster shall be aware of the cluster state.

Now it seems to me that only the domain start up on the DAS server fires the life cycle events. When I start up an node agent nothing seems to happen.

Sun's GF 2.1 Developer's Guide mentions in the chapter on "Developing Lifecycle Listeners" that the one or other event happens on "the server". I assume they point to the "application server environment" mentioned in the chapter's introduction. If i've got the point: doesn't a node agent - that seems to represent an EEInstance in GF - fire up these life cycle events? Or do I simply suffer from some wrong classpaths or misplaced jars?



Best regards
mdo
[Message sent by forum member 'mdo']

http://forums.java.net/jive/thread.jspa?messageID=469370