[jboss-cvs] JBossAS SVN: r90280 - branches/Branch_5_x/server/src/main/org/jboss/ejb.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Tue Jun 16 23:47:38 EDT 2009
Author: jason.greene at jboss.com
Date: 2009-06-16 23:47:38 -0400 (Tue, 16 Jun 2009)
New Revision: 90280
Added:
branches/Branch_5_x/server/src/main/org/jboss/ejb/StatefulSessionContainerMBean.java
Modified:
branches/Branch_5_x/server/src/main/org/jboss/ejb/StatefulSessionContainer.java
Log:
Merge 90278
Modified: branches/Branch_5_x/server/src/main/org/jboss/ejb/StatefulSessionContainer.java
===================================================================
--- branches/Branch_5_x/server/src/main/org/jboss/ejb/StatefulSessionContainer.java 2009-06-17 03:46:51 UTC (rev 90279)
+++ branches/Branch_5_x/server/src/main/org/jboss/ejb/StatefulSessionContainer.java 2009-06-17 03:47:38 UTC (rev 90280)
@@ -38,6 +38,7 @@
import javax.ejb.Handle;
import javax.management.ObjectName;
+import org.jboss.ejb.plugins.StatefulSessionInstanceCache;
import org.jboss.invocation.Invocation;
import org.jboss.invocation.InvocationType;
import org.jboss.security.SimplePrincipal;
@@ -57,7 +58,7 @@
public class StatefulSessionContainer
extends SessionContainer
- implements EJBProxyFactoryContainer, InstancePoolContainer
+ implements EJBProxyFactoryContainer, InstancePoolContainer, StatefulSessionContainerMBean
{
/**
* This is the persistence manager for this container
@@ -82,6 +83,14 @@
return instanceCache;
}
+ public long getPassivatedCount()
+ {
+ if (! (instanceCache instanceof StatefulSessionInstanceCache))
+ throw new UnsupportedOperationException();
+
+ return ((StatefulSessionInstanceCache)instanceCache).getPassivatedCount();
+ }
+
public StatefulSessionPersistenceManager getPersistenceManager()
{
return persistenceManager;
Copied: branches/Branch_5_x/server/src/main/org/jboss/ejb/StatefulSessionContainerMBean.java (from rev 90278, branches/JBPAPP_5_0/server/src/main/org/jboss/ejb/StatefulSessionContainerMBean.java)
===================================================================
--- branches/Branch_5_x/server/src/main/org/jboss/ejb/StatefulSessionContainerMBean.java (rev 0)
+++ branches/Branch_5_x/server/src/main/org/jboss/ejb/StatefulSessionContainerMBean.java 2009-06-17 03:47:38 UTC (rev 90280)
@@ -0,0 +1,34 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file 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.ejb;
+
+public interface StatefulSessionContainerMBean extends ContainerMBean
+{
+
+ /**
+ * Get the number of instances in this container that are currently passivated.
+ *
+ * @return the number of passivated instances
+ */
+ public long getPassivatedCount();
+
+}
More information about the jboss-cvs-commits
mailing list