[jboss-cvs] JBossAS SVN: r90276 - branches/JBPAPP_5_0/server/src/main/org/jboss/ejb.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Tue Jun 16 23:13:49 EDT 2009


Author: jason.greene at jboss.com
Date: 2009-06-16 23:13:48 -0400 (Tue, 16 Jun 2009)
New Revision: 90276

Modified:
   branches/JBPAPP_5_0/server/src/main/org/jboss/ejb/Container.java
   branches/JBPAPP_5_0/server/src/main/org/jboss/ejb/ContainerMBean.java
Log:
Add EJB2 pool stats to container so that they can be exposed on the same MO


Modified: branches/JBPAPP_5_0/server/src/main/org/jboss/ejb/Container.java
===================================================================
--- branches/JBPAPP_5_0/server/src/main/org/jboss/ejb/Container.java	2009-06-17 00:08:42 UTC (rev 90275)
+++ branches/JBPAPP_5_0/server/src/main/org/jboss/ejb/Container.java	2009-06-17 03:13:48 UTC (rev 90276)
@@ -574,6 +574,39 @@
    }
 
    /**
+    * Return the current instance pool associate with this container if
+    * supported by the underlying container implementation.
+    *
+    * @return instance pool
+    * @throws UnsupportedOperationException if the container does not support an instance pool
+    */
+   protected InstancePool getInstancePool()
+   {
+      throw new UnsupportedOperationException();
+   }
+
+   /**
+    * Get current pool size of the pool associated with this container,
+    * also known as the method ready count
+    *
+    * @throws UnsupportedOperationException if the container type does not support an instance pool
+    */
+   public int getCurrentPoolSize()
+   {
+      return getInstancePool().getCurrentSize();
+   }
+
+   /**
+    * Get current pool size of the pool associated with this container.
+    *
+    * @throws UnsupportedOperationException if the container type does not support an instance pool
+    */
+   public int getMaxPoolSize()
+   {
+      return getInstancePool().getMaxSize();
+   }
+
+   /**
     * Resets the current invocation stats
     */
    public void resetInvocationStats()

Modified: branches/JBPAPP_5_0/server/src/main/org/jboss/ejb/ContainerMBean.java
===================================================================
--- branches/JBPAPP_5_0/server/src/main/org/jboss/ejb/ContainerMBean.java	2009-06-17 00:08:42 UTC (rev 90275)
+++ branches/JBPAPP_5_0/server/src/main/org/jboss/ejb/ContainerMBean.java	2009-06-17 03:13:48 UTC (rev 90276)
@@ -72,6 +72,21 @@
   Map<String, Map<String, Long>> getDetypedInvocationStatistics();
 
   /**
+   * Get current pool size of the pool associated with this container,
+   * also known as the method ready count
+   *
+   * @throws UnsupportedOperationException if the container type does not support an instance pool
+   */
+  int getCurrentPoolSize();
+
+  /**
+   * Gets the max pool size of the pool associated with this container
+   *
+   * @throws UnsupportedOperationException if the container type does not support an instance pool
+   */
+  int getMaxPoolSize();
+
+  /**
    * Resets the current invocation stats
    */
   void resetInvocationStats();




More information about the jboss-cvs-commits mailing list