Hi all, I am starting my jboss my own application which is monitoring jboss and starting and shutting down jboss. But I could not able to shutdown for problem as it is running in same JVM. The code is given below. We put the shutdown.jar in our classpath also. Then my application does not start. But if i run my program only with run.jar in the classpath . my problem starts the jboss. Please recommand me how should i do this. so that i can start and stop the jboss from my program . I willbe thankful to you.
public class JBossServer implements Runnable { int action = 0; JBossServer(int pAction) { action = pAction; } public void run() { if (action == START) { String[] args = new String[1]; args[0] = new String(""); try { System.out.println("Now starting the main and boot method second time"); SMSContext.getTraceService().trace(TraceLevel.TRACE,0,"AppManagedComponent.j ava","Jboss monitor thread", "Calling Main and Boot", traceContext); Main main = new Main(); main.boot(args); } catch (Exception e) { System.err.println("Failed to boot JBoss:"); e.printStackTrace(); } } /** try { org.jboss.Main main = new org.jboss.Main(); main.boot(args); //Runtime rt = Runtime.getRuntime(); //Process pr = rt.exec("/Baypackets/rsi8000/PPBUILD/RSI/RSIPro8000/appServer/jboss-3.2.0/bi n/run.sh"); } catch(Exception ex) { } **/ else if (action == STOP) { String[] args = new String[1]; args[0] = new String(""); try { org.jboss.Shutdown.main(args); } catch(Exception ex) { } } } } ------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf _______________________________________________ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user