-
1. Re: Start / stop of application
csaldanh Apr 16, 2008 11:06 AM (in response to mattias1)Hi Mattias,
You could try invoking operations of the MainDeployer MBean (jboss.system:service=MainDeployer) using JMX. This Mbean exposes operations to list all the applications deployed as well as to start/stop applications.
Clive -
2. Re: Start / stop of application
mattias1 Apr 16, 2008 1:39 PM (in response to mattias1)Hi Clive,
Thanks! I guess I can list all deployed applications with the listDeployed() method. However I cannot find any method to stop an application. There is the undeploy(DeploymentInfo) method, but I cannot find any method to just stop a specific application...
BR,
Mattias -
3. Re: Start / stop of application
csaldanh Apr 16, 2008 3:08 PM (in response to mattias1)Could you clear one thing for me. By stop application do you mean shutdown the application? Because undeploying it would actually shut it down ... right?
Clive -
4. Re: Start / stop of application
mattias1 Apr 16, 2008 4:53 PM (in response to mattias1)Yes, with stop I mean shutting down the application, without undeploying it.
/Mattias -
5. Re: Start / stop of application
csaldanh Apr 16, 2008 5:02 PM (in response to mattias1)Just a suggestion ... how about making an MBean to manage you application (start/stop). The polling of the licence servers could be moved to this MBean rather than in the application.
Clive -
6. Re: Start / stop of application
mattias1 Apr 16, 2008 5:28 PM (in response to mattias1)Yes, that is what I'm thinking about. But I do not know how to make the stop of the application from the MBean...
Lets say I have an MBean that schedules a task to poll the license server every hour, for example. When it discoveres that the license have expired, how can it stop (shutdown) the application?
/Mattias