Şöyle yaparız
try {
MBeanServer mBeanServer = ManagementFactory.getPlatformMBeanServer();
logger.info("Stopping server...");
ObjectName objectName = new ObjectName("jboss.as:management-root=server");
mBeanServer.invoke(objectName, "shutdown", new Object[] { false, 60, 60 },
new String[] { boolean.class.getName(), int.class.getName(), int.class.getName() });
} catch (...) {
...
}
Hiç yorum yok:
Yorum Gönder