-
1. Re: Launching JBoss from a java application rather than usin
peterj Jan 12, 2009 4:13 PM (in response to millerdl)A couple of possibilities:
a) System.exec("sh path-to-run.sh");
b) Include bin/run.jar in your classpath and then do: org.jboss.Main.main(command-line-arguments);
Option (a) has the benefit of running JBoss AS in a separate process.
Option (b) runs JBoss AS within the same JVM that started it. This would be suitable if, for instance, you use Groovy scripts.
If you want to write a C/C++ app to run it, read up on JNI. Or even better, get the JVM source and look at how the java executable is implemented. -
2. Re: Launching JBoss from a java application rather than usin
dickson1888 Feb 2, 2009 3:39 AM (in response to millerdl)Does it mean that JBoss cannot be remotely started up or shutdown?
Is JBoss server a single JVM? I mean that no other admin web server to manage the other JVM or web application. If yes, every time to shutdown JBoss server and all web application will also shutdown. Is it sure. Thanks. -
3. Re: Launching JBoss from a java application rather than usin
peterj Feb 2, 2009 11:30 AM (in response to millerdl)Remotely start - only if you have some kind of an agent on the remote system, or you remote shell into the system. Another possibility - is you are running on Windows and has JBoss AS set to start as a server you can use MMC to connect to the remote system and start the service. I think that Jopr comes with such agent.
Remotely stop - use JMX to call the shutdown() operation on the jboss.system:type=Server MBean. Several tools (twiddle, jmx console, embedded jopr, jopr) can do this for you.
Yes, JBoss AS runs in a single JVM. You can run multiple instances if you like. -
4. Re: Launching JBoss from a java application rather than usin
millerdl Feb 25, 2009 4:43 PM (in response to millerdl)What is the difference between using org.jboss.Main.main() and org.jboss.system.server.Server.start()?