views:

122

answers:

1

I may be barking up the wrong tree here -- it's relatively easy to wrap a vanilla Java app in a daemon/service -- but it'd be really helpful for deployment if we could push pure Java apps onto a Glassfish server and have them start up automatically.

We use JMS to connect this app to several other beans living on the Glassfish server. We are actually using glassfish to "deploy" it to the production machine, but it doesn't start automatically. Have been looking into JCA, but it doesn't seem like quite what I'm looking for.

Thanks!

+3  A: 

If your 'pure Java app' is packaged as .war you could add a ServletContextListner to your app that gets called when the application is loaded and that performs the starup of the application...

Fried Hoeben
+1 this is pretty simple, and will work perfectly well. We have used this method for starting up services like Lucene, in the instance where we build and use an in memory index.
Joel