org.rutil.main
Class SpringMainProcess

java.lang.Object
  extended by org.rutil.main.SpringMainProcess
All Implemented Interfaces:
MainProcess

public class SpringMainProcess
extends java.lang.Object
implements MainProcess

A Main process implementation that can be used as-is to start/stop applications that are managed by the spring container. If using this process implementation, the startup command would look like this:

java -Dcom.sun.management.jmxremote.port=8085 -D... org.rutil.main.Main org.rutil.main.SpringMainProcess start

Author:
mohan
See Also:
Main, MainProcess

Constructor Summary
SpringMainProcess()
           
 
Method Summary
 boolean isRunning()
           
 void start(java.lang.String... args)
          Create a new ClassPathXmlApplicationContext with the supplied args.
 void stop()
          Invokes applicationContext.destroy.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SpringMainProcess

public SpringMainProcess()
Method Detail

start

public void start(java.lang.String... args)
Create a new ClassPathXmlApplicationContext with the supplied args.

Specified by:
start in interface MainProcess
Parameters:
args - spring xml files

stop

public void stop()
Invokes applicationContext.destroy.

Specified by:
stop in interface MainProcess

isRunning

public boolean isRunning()
Specified by:
isRunning in interface MainProcess