[jboss-cvs] JBossAS SVN: r88970 - branches/Branch_5_x/profileservice/src/main/org/jboss/profileservice/management.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Fri May 15 20:52:44 EDT 2009


Author: jason.greene at jboss.com
Date: 2009-05-15 20:52:44 -0400 (Fri, 15 May 2009)
New Revision: 88970

Modified:
   branches/Branch_5_x/profileservice/src/main/org/jboss/profileservice/management/MBeanRuntimeComponentDispatcher.java
Log:
Fix status mapping


Modified: branches/Branch_5_x/profileservice/src/main/org/jboss/profileservice/management/MBeanRuntimeComponentDispatcher.java
===================================================================
--- branches/Branch_5_x/profileservice/src/main/org/jboss/profileservice/management/MBeanRuntimeComponentDispatcher.java	2009-05-16 00:14:23 UTC (rev 88969)
+++ branches/Branch_5_x/profileservice/src/main/org/jboss/profileservice/management/MBeanRuntimeComponentDispatcher.java	2009-05-16 00:52:44 UTC (rev 88970)
@@ -209,7 +209,18 @@
       if(mapper == null)
          throw new IllegalArgumentException("null mapper");
 
-
-      return mapper.map(ControllerState.INSTALLED, ControllerState.INSTALLED);
+      ControllerState current = ControllerState.NOT_INSTALLED;
+      
+      try
+      {
+         if (mbeanServer.isRegistered(new ObjectName(name.toString())))
+            current = ControllerState.INSTALLED;
+      }
+      catch (Exception e)
+      {
+         // Failure = Not installed
+      }
+      
+      return mapper.map(current, ControllerState.INSTALLED);
    }
 }




More information about the jboss-cvs-commits mailing list