[jboss-cvs] JBossAS SVN: r87955 - in branches/Branch_5_x: varia/src/main/org/jboss/services/binding and 1 other directory.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Tue Apr 28 13:50:19 EDT 2009


Author: scott.stark at jboss.org
Date: 2009-04-28 13:50:19 -0400 (Tue, 28 Apr 2009)
New Revision: 87955

Modified:
   branches/Branch_5_x/testsuite/src/main/org/jboss/test/profileservice/test/ServiceBindingManagedObjectsTestCase.java
   branches/Branch_5_x/varia/src/main/org/jboss/services/binding/ServiceBindingManager.java
Log:
JBAS-6594, give the ServiceBindingManager a unique component name and correct the expected port type to its primitive form.

Modified: branches/Branch_5_x/testsuite/src/main/org/jboss/test/profileservice/test/ServiceBindingManagedObjectsTestCase.java
===================================================================
--- branches/Branch_5_x/testsuite/src/main/org/jboss/test/profileservice/test/ServiceBindingManagedObjectsTestCase.java	2009-04-28 17:42:21 UTC (rev 87954)
+++ branches/Branch_5_x/testsuite/src/main/org/jboss/test/profileservice/test/ServiceBindingManagedObjectsTestCase.java	2009-04-28 17:50:19 UTC (rev 87955)
@@ -65,7 +65,7 @@
    {
       ManagementView managementView = getManagementView();
       ComponentType type = new ComponentType("MCBean", "ServiceBindingManager");
-      ManagedComponent component = managementView.getComponent("ports-default", type);
+      ManagedComponent component = managementView.getComponent("ServiceBindingManager", type);
       assertNotNull(component);
 
       // verify that the component has the expected properties.
@@ -87,7 +87,8 @@
 //      assertTrue("property serviceBindings value is CollectionValue", val instanceof CollectionValue);
 //      getLog().info(((CollectionValue) val).getElements());
       
-      assertEquals("Unexpected number of properties", 2, properties.size());
+      // [serverName, state, serviceBindings]
+      assertEquals("Unexpected number of properties: "+properties.keySet(), 3, properties.size());
    }
 
    /**
@@ -250,7 +251,7 @@
          assertNotNull("property port has no value", val);
          assertTrue("property port value is SimpleValue", val instanceof SimpleValue);
          assertNotNull("property port value is not null", ((SimpleValue) val).getValue());
-         assertEquals("type of port value isn't Integer", Integer.class.getName(), val.getMetaType().getClassName());
+         assertEquals("type of port value isn't Integer", int.class.getName(), val.getMetaType().getClassName());
          assertNotNull("property port value is not null", ((SimpleValue) val).getValue());
          
          prop = properties.get("description");

Modified: branches/Branch_5_x/varia/src/main/org/jboss/services/binding/ServiceBindingManager.java
===================================================================
--- branches/Branch_5_x/varia/src/main/org/jboss/services/binding/ServiceBindingManager.java	2009-04-28 17:42:21 UTC (rev 87954)
+++ branches/Branch_5_x/varia/src/main/org/jboss/services/binding/ServiceBindingManager.java	2009-04-28 17:50:19 UTC (rev 87955)
@@ -55,8 +55,9 @@
  *
  * @jmx:mbean
  */
- at ManagementObject(componentType=@ManagementComponent(type="MCBean", subtype="ServiceBindingManager"),
-                  properties=ManagementProperties.EXPLICIT)
+ at ManagementObject(name="ServiceBindingManager",
+      componentType=@ManagementComponent(type="MCBean", subtype="ServiceBindingManager"),
+      properties=ManagementProperties.EXPLICIT)
 public class ServiceBindingManager
    implements ServiceBindingManagerMBean
 {  
@@ -152,12 +153,11 @@
     */
    @ManagementProperty(description="the value of the serverName param  this " +
    		"instance should pass to ServiceBindingStore when requesting bindings")
-   @ManagementObjectID(type="ServiceBindingManager")
    public String getServerName()
    {
       return this.serverName;
    }
-   
+
    @ManagementProperty(description="the set of service binding configurations associated with this instance",
                        use={ViewUse.STATISTIC})
    public Set<ServiceBinding> getServiceBindings()




More information about the jboss-cvs-commits mailing list