Skip to main content

What can I use as a GF v2 startup trigger?

3 replies [Last post]
jameshr
Offline
Joined: 2008-01-31

Hi, I would like to invoke a custom Java class each time I restart Glassfish to perform some initialization tasks. What mechanism in GF v2 provides such a startup trigger that I could use for this purpose?

Thanks,
J

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
jthoennes
Offline
Joined: 2008-03-06

Hi,

I guess that a lifecycle module with a lifecycle listener will do the job.
For details, see this thread:

http://forums.java.net/jive/thread.jspa?messageID=381367&#381367

There is also a piece of example java code attached which stops the default HTTP listener on every server start.

Cheers, Jörg

jameshr
Offline
Joined: 2008-01-31

Thanks, I'll research this and follow-up. I was hoping someone in the community was currently using this technique in their v2 app and would share how they did it. Surely, this is a common requirement for many applications.

Martin, Ray

http://www.adam-bien.com/roller/abien/entry/simplest_possible_ejb_3_16

The above works in v3 - so, I have a v3 controller sending SOAP messages
to my v2 workers.

-----Original Message-----
From: glassfish@javadesktop.org [mailto:glassfish@javadesktop.org]
Sent: Wednesday, June 09, 2010 11:50 AM
To: users@glassfish.dev.java.net
Subject: Re: What can I use as a GF v2 startup trigger?

Thanks, I'll research this and follow-up. I was hoping someone in the
community was currently using this technique in their v2 app and would
share how they did it. Surely, this is a common requirement for many
applications.
[Message sent by forum member 'jameshr']

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

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@glassfish.dev.java.net
For additional commands, e-mail: users-help@glassfish.dev.java.net

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@glassfish.dev.java.net
For additional commands, e-mail: users-help@glassfish.dev.java.net