Index: src/test/java/org/jboss/ejb3/core/test/ejbthree2146/AuroraBean.java
===================================================================
--- src/test/java/org/jboss/ejb3/core/test/ejbthree2146/AuroraBean.java	(revision 0)
+++ src/test/java/org/jboss/ejb3/core/test/ejbthree2146/AuroraBean.java	(revision 0)
@@ -0,0 +1,38 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright (c) 2010, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.ejb3.core.test.ejbthree2146;
+
+import javax.ejb.Stateless;
+import java.util.concurrent.TimeUnit;
+
+/**
+ * @author <a href="mailto:cdewolf@redhat.com">Carlo de Wolf</a>
+ */
+@Stateless
+public class AuroraBean implements AuroraLocal
+{
+   @Override
+   public void sleep(long timeout, TimeUnit unit) throws InterruptedException
+   {
+      Thread.sleep(unit.toMillis(timeout));
+   }
+}
Index: src/test/java/org/jboss/ejb3/core/test/ejbthree2146/unit/WaiterTestCase.java
===================================================================
--- src/test/java/org/jboss/ejb3/core/test/ejbthree2146/unit/WaiterTestCase.java	(revision 0)
+++ src/test/java/org/jboss/ejb3/core/test/ejbthree2146/unit/WaiterTestCase.java	(revision 0)
@@ -0,0 +1,84 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright (c) 2010, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.ejb3.core.test.ejbthree2146.unit;
+
+import org.jboss.ejb3.core.test.common.AbstractEJB3TestCase;
+import org.jboss.ejb3.core.test.ejbthree2146.AuroraBean;
+import org.jboss.ejb3.core.test.ejbthree2146.AuroraLocal;
+import org.jboss.ejb3.session.SessionContainer;
+import org.jboss.ejb3.statistics.InvocationStatistics;
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+import static java.util.concurrent.TimeUnit.MILLISECONDS;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+
+/**
+ * Test whether we can actually get some stats.
+ * This is to the contract with ejb3-metrics-deployer.
+ * 
+ * @author <a href="mailto:cdewolf@redhat.com">Carlo de Wolf</a>
+ */
+public class WaiterTestCase extends AbstractEJB3TestCase
+{
+   private static SessionContainer container;
+
+   @AfterClass
+   public static void afterClass() throws Exception
+   {
+      undeployEjb(container);
+
+      AbstractEJB3TestCase.afterClass();
+   }
+
+   @BeforeClass
+   public static void beforeClass() throws Exception
+   {
+      AbstractEJB3TestCase.beforeClass();
+      
+      container = deploySessionEjb(AuroraBean.class);
+   }
+
+   @Test
+   public void testStats() throws Exception
+   {
+      AuroraLocal bean = lookup("AuroraBean/local", AuroraLocal.class);
+
+      InvocationStatistics stats = container.getInvokeStats();
+
+      // Since we don't have a prince at hand, lets not sleep forever
+      bean.sleep(100, MILLISECONDS);
+      
+      InvocationStatistics.TimeStatistic methodStat = stats.getStats().get("sleep");
+      assertNotNull(methodStat);
+      long count = methodStat.getCount();
+      assertEquals(1, count);
+      long maxTime = methodStat.getMaxTime();
+      long minTime = methodStat.getMinTime();
+      long totalTime = methodStat.getTotalTime();
+      assertTrue(maxTime == minTime);
+      assertTrue(minTime == totalTime);
+   }
+}
Index: src/test/java/org/jboss/ejb3/core/test/ejbthree2146/AuroraLocal.java
===================================================================
--- src/test/java/org/jboss/ejb3/core/test/ejbthree2146/AuroraLocal.java	(revision 0)
+++ src/test/java/org/jboss/ejb3/core/test/ejbthree2146/AuroraLocal.java	(revision 0)
@@ -0,0 +1,32 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright (c) 2010, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.ejb3.core.test.ejbthree2146;
+
+import java.util.concurrent.TimeUnit;
+
+/**
+ * @author <a href="mailto:cdewolf@redhat.com">Carlo de Wolf</a>
+ */
+public interface AuroraLocal
+{
+   void sleep(long timeout, TimeUnit unit) throws InterruptedException;
+}
Index: src/main/java/org/jboss/ejb3/statistics/InvocationStatistics.java
===================================================================
--- src/main/java/org/jboss/ejb3/statistics/InvocationStatistics.java	(revision 107653)
+++ src/main/java/org/jboss/ejb3/statistics/InvocationStatistics.java	(working copy)
@@ -51,11 +51,31 @@
    {
       private static final long serialVersionUID = -3717837456831579570L;
       
-      public AtomicLong count = new AtomicLong();
-      public volatile long minTime = Long.MAX_VALUE;
-      public volatile long maxTime;
-      public AtomicLong totalTime = new AtomicLong();
+      private AtomicLong count = new AtomicLong();
+      private volatile long minTime = Long.MAX_VALUE;
+      private volatile long maxTime;
+      private AtomicLong totalTime = new AtomicLong();
 
+      public long getCount()
+      {
+         return count.get();
+      }
+
+      public long getMaxTime()
+      {
+         return maxTime;
+      }
+
+      public long getMinTime()
+      {
+         return minTime;
+      }
+
+      public long getTotalTime()
+      {
+         return totalTime.get();
+      }
+
       public void reset()
       {
          count.set(0);
