[jboss-cvs] JBoss Messaging SVN: r5464 - trunk/src/main/org/jboss/messaging/core/management/impl.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Fri Dec 5 10:11:25 EST 2008


Author: jmesnil
Date: 2008-12-05 10:11:25 -0500 (Fri, 05 Dec 2008)
New Revision: 5464

Modified:
   trunk/src/main/org/jboss/messaging/core/management/impl/AddressControl.java
   trunk/src/main/org/jboss/messaging/core/management/impl/QueueControl.java
Log:
resource controls no longer extends StandardMBean

Modified: trunk/src/main/org/jboss/messaging/core/management/impl/AddressControl.java
===================================================================
--- trunk/src/main/org/jboss/messaging/core/management/impl/AddressControl.java	2008-12-05 14:15:42 UTC (rev 5463)
+++ trunk/src/main/org/jboss/messaging/core/management/impl/AddressControl.java	2008-12-05 15:11:25 UTC (rev 5464)
@@ -26,9 +26,6 @@
 import java.util.List;
 import java.util.Set;
 
-import javax.management.MBeanInfo;
-import javax.management.NotCompliantMBeanException;
-import javax.management.StandardMBean;
 import javax.management.openmbean.TabularData;
 
 import org.jboss.messaging.core.management.AddressControlMBean;
@@ -46,8 +43,7 @@
  * @version <tt>$Revision$</tt>
  * 
  */
-public class AddressControl extends StandardMBean implements
-      AddressControlMBean
+public class AddressControl implements AddressControlMBean
 {
 
    // Constants -----------------------------------------------------
@@ -55,7 +51,9 @@
    // Attributes ----------------------------------------------------
 
    private final SimpleString address;
+
    private final PostOffice postOffice;
+
    private final HierarchicalRepository<Set<Role>> securityRepository;
 
    // Static --------------------------------------------------------
@@ -63,11 +61,9 @@
    // Constructors --------------------------------------------------
 
    public AddressControl(final SimpleString address,
-         final PostOffice postOffice,
-         final HierarchicalRepository<Set<Role>> securityRepository)
-         throws NotCompliantMBeanException
+                         final PostOffice postOffice,
+                         final HierarchicalRepository<Set<Role>> securityRepository)
    {
-      super(AddressControlMBean.class);
       this.address = address;
       this.postOffice = postOffice;
       this.securityRepository = securityRepository;
@@ -94,7 +90,8 @@
             queueNames[i] = binding.getQueue().getName().toString();
          }
          return queueNames;
-      } catch (Throwable t)
+      }
+      catch (Throwable t)
       {
          throw new IllegalStateException(t.getMessage());
       }
@@ -112,16 +109,15 @@
       int i = 0;
       for (Role role : roles)
       {
-         roleInfos[i++] = new RoleInfo(role.getName(), role
-               .isCheckType(CheckType.CREATE),
-               role.isCheckType(CheckType.READ), role
-                     .isCheckType(CheckType.WRITE));
+         roleInfos[i++] = new RoleInfo(role.getName(),
+                                       role.isCheckType(CheckType.CREATE),
+                                       role.isCheckType(CheckType.READ),
+                                       role.isCheckType(CheckType.WRITE));
       }
       return roleInfos;
    }
 
-   public void addRole(final String name, final boolean create,
-         final boolean read, final boolean write) throws Exception
+   public void addRole(final String name, final boolean create, final boolean read, final boolean write) throws Exception
    {
       Set<Role> roles = securityRepository.getMatch(address.toString());
       Role newRole = new Role(name, read, write, create);
@@ -155,18 +151,6 @@
       securityRepository.addMatch(address.toString(), roles);
    }
 
-   // StandardMBean overrides ---------------------------------------
-
-   @Override
-   public MBeanInfo getMBeanInfo()
-   {
-      MBeanInfo info = super.getMBeanInfo();
-      return new MBeanInfo(info.getClassName(), info.getDescription(), info
-            .getAttributes(), info.getConstructors(), MBeanInfoHelper
-            .getMBeanOperationsInfo(AddressControlMBean.class), info
-            .getNotifications());
-   }
-
    // Package protected ---------------------------------------------
 
    // Protected -----------------------------------------------------

Modified: trunk/src/main/org/jboss/messaging/core/management/impl/QueueControl.java
===================================================================
--- trunk/src/main/org/jboss/messaging/core/management/impl/QueueControl.java	2008-12-05 14:15:42 UTC (rev 5463)
+++ trunk/src/main/org/jboss/messaging/core/management/impl/QueueControl.java	2008-12-05 15:11:25 UTC (rev 5464)
@@ -26,9 +26,6 @@
 import java.util.GregorianCalendar;
 import java.util.List;
 
-import javax.management.MBeanInfo;
-import javax.management.NotCompliantMBeanException;
-import javax.management.StandardMBean;
 import javax.management.openmbean.CompositeData;
 import javax.management.openmbean.TabularData;
 
@@ -78,7 +75,7 @@
    public QueueControl(final Queue queue, final StorageManager storageManager,
          final PostOffice postOffice,
          final HierarchicalRepository<QueueSettings> queueSettingsRepository,
-         final MessageCounter counter) throws NotCompliantMBeanException
+         final MessageCounter counter)
    {
       this.queue = queue;
       this.storageManager = storageManager;




More information about the jboss-cvs-commits mailing list