MBeanServer server = ManagementFactory.getPlatformMBeanServer();
ObjectName invocationsName = new ObjectName("openejb.management:J2EEServer=openejb,J2EEApplication=null,EJBModule=StatsInvocModule,StatelessSessionBean=CounterBean,j2eeType=Invocations,name=CounterBean");
// Grab the mbeanInfo and check the expected attributes exist and have the correct return types and parameters
MBeanInfo invocationsMBeanInfo = server.getMBeanInfo(invocationsName);
for (MBeanAttributeInfo info : invocationsMBeanInfo.getAttributes()) {
// System.out.println("//" + info.getName() + " " + server.getAttribute(invocationsName, info.getName()));
if (info.getName().equals("waitSecs().GeometricMean")
|| info.getName().equals("waitSecs().Max")
|| info.getName().equals("waitSecs().Mean")
|| info.getName().equals("waitSecs().Min")