-
1. Re: Using the JBoss shutdown mbean
seven Oct 23, 2001 11:56 AM (in response to pibakic)Try http://host_with_jboss:8082. There u'll find a mbean type=Shutdown. Go further in that page and u'll find a button named "shutdown". If u press that button, the browser will call the following URL (using GET method): http://host_with_jboss:8082/InvokeAction//DefaultDomain%3Atype%3DShutdown/action=shutdown. So if u can make this URL call using any other software u are done.
-
2. Re: Using the JBoss shutdown mbean
schaefera Oct 31, 2001 12:36 AM (in response to pibakic)You can also use the org.jboss.Shutdown class. This unix script will to the shutdown w/o exposing the HTML-Adaptor which is a little bit risky.
----------------- Start.sh -------------------------
#!/bin/sh
cd /opt/jboss/jboss-2.2/bin
PATH=/usr/lib/java2/bin:$PATH
# Minimal jar file to get JBoss stopped
CLASSPATH=$CLASSPATH:../lib/ext/jboss.jar
# Add all login modules for JAAS-based security
# and all libraries that are used by them here
CLASSPATH=$CLASSPATH
echo CLASSPATH=$CLASSPATH
java -cp $CLASSPATH org.jboss.Shutdown $@
--------------- End of Start.sh -------------------
Have fun - Andy -
3. Re: Using the JBoss shutdown mbean
amalter Mar 4, 2002 3:16 PM (in response to pibakic)Who the heck uses the JMX html adapter in a production environment?
Is it just me or does it seem crazy even to have this thing running. Do you guys trust your firewall enough to expose that much system functionality over a unauthenticated http port?
I was thinking about creating a shutdown service behind our own (trusted) authentication logic. Should I try to get a handle to the actual ShutdownMBean and call shutdown() or just do a System.exit(0); (Which is all the shutdown MBean does anyway)