[jboss-cvs] JBossAS SVN: r65403 - trunk/system-jmx/src/main/org/jboss/system.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Fri Sep 14 17:23:11 EDT 2007
Author: bstansberry at jboss.com
Date: 2007-09-14 17:23:11 -0400 (Fri, 14 Sep 2007)
New Revision: 65403
Modified:
trunk/system-jmx/src/main/org/jboss/system/ServiceMBeanSupport.java
Log:
[JBAS-4727] ServiceMBeanSupport should ignore duplicate create calls
Modified: trunk/system-jmx/src/main/org/jboss/system/ServiceMBeanSupport.java
===================================================================
--- trunk/system-jmx/src/main/org/jboss/system/ServiceMBeanSupport.java 2007-09-14 20:57:14 UTC (rev 65402)
+++ trunk/system-jmx/src/main/org/jboss/system/ServiceMBeanSupport.java 2007-09-14 21:23:11 UTC (rev 65403)
@@ -253,6 +253,13 @@
protected void jbossInternalCreate() throws Exception
{
+ if (state == CREATED || state == STARTING || state == STARTED
+ || state == STOPPING || state == STOPPED)
+ {
+ log.debug("Ignoring create call; current state is " + getStateString());
+ return;
+ }
+
log.debug("Creating " + jbossInternalDescription());
try
@@ -272,8 +279,11 @@
protected void jbossInternalStart() throws Exception
{
if (state == STARTING || state == STARTED || state == STOPPING)
+ {
+ log.debug("Ignoring start call; current state is " + getStateString());
return;
-
+ }
+
if (state != CREATED && state != STOPPED && state != FAILED)
{
log.debug("Start requested before create, calling create now");
@@ -304,7 +314,10 @@
protected void jbossInternalStop()
{
if (state != STARTED)
+ {
+ log.debug("Ignoring stop call; current state is " + getStateString());
return;
+ }
state = STOPPING;
sendStateChangeNotification(STARTED, STOPPING, getName() + " stopping", null);
@@ -330,7 +343,10 @@
protected void jbossInternalDestroy()
{
if (state == DESTROYED)
+ {
+ log.debug("Ignoring destroy call; current state is " + getStateString());
return;
+ }
if (state == STARTED)
{
More information about the jboss-cvs-commits
mailing list