[jboss-user] [Beginners Corner] - Re: How to get the JBoss Start time

danielgalan do-not-reply at jboss.com
Wed Jan 3 04:42:22 EST 2007


Thanks Peter,


  | ObjectName mbeanId = new ObjectName("jboss.system:type=Server");
  | MBeanServer server = MBeanServerLocator.locateJBoss();
  | Date startDate = (Date)server.getAttribute(new ObjectName("jboss.system:type=Server"), "StartDate");
  | Date jbossStartupTime = new Date(System.currentTimeMillis() - startDate.getTime());
  | 

so thats the way I receive the Startuptime now.

Bye

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3997472#3997472

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3997472



More information about the jboss-user mailing list