|
From: Leif M. <lei...@ta...> - 2010-09-27 07:50:04
|
Kapila, You can do this in one of a number of ways. 1) The simplest is to write a simple class which does this check in its main method then calls the application's main class's main method if you really want to start the application. Call System.exit with an appropriate error code otherwise. You can then use the standard Integration Method #1 and make use of the WrapperSimpleApp helper class as usual: http://wrapper.tanukisoftware.com/doc/english/integrate.html#method1 2) A more advanced option is to use Integration Method #3, and write your own WrapperListener implementation. In this case, you would do your initialization checks in the WrapperListener.start method and then return an error or call your main class start method as above. This method has the benefit of giving you more control over when the Wrapper things the application is "started": http://wrapper.tanukisoftware.com/doc/english/integrate.html#method3 Cheers, Leif On Mon, Sep 27, 2010 at 4:39 PM, kapilashantha rajapaksha <kap...@gm...> wrote: > hi All, > > I'm using int JSW for my application. One thing I want to know. > > I want to run my init() method (There is an init() method in my application > which used for checking initializing modules like dbconnection, some > hardware status (HSM), remote socket connection status etc... ). If it is > returning TRUE, the all modules are successfully loaded. If it is retuning > FALSE, some failure has detected. > > What I want to know, > > Can I call my init() method before loading JSW ? > > If only TRUE returns , Then my application should be get started on JSW > > > Regards > -Kapila |