[jboss-cvs] JBossAS SVN: r86615 - in branches/Branch_5_x: testsuite/src/main/org/jboss/test/profileservice/test and 1 other directory.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Wed Apr 1 17:07:41 EDT 2009


Author: scott.stark at jboss.org
Date: 2009-04-01 17:07:41 -0400 (Wed, 01 Apr 2009)
New Revision: 86615

Modified:
   branches/Branch_5_x/messaging/src/main/org/jboss/jms/server/destination/QueueServiceMO.java
   branches/Branch_5_x/messaging/src/main/org/jboss/jms/server/destination/TopicServiceMO.java
   branches/Branch_5_x/testsuite/src/main/org/jboss/test/profileservice/test/JmsDestinationUnitTestCase.java
Log:
JBAS-6688,expose ManagedProperties representing ObjectNames as SimpleMetaType.STRINGs rather than ImmutableCompositeMetaTypes

Modified: branches/Branch_5_x/messaging/src/main/org/jboss/jms/server/destination/QueueServiceMO.java
===================================================================
--- branches/Branch_5_x/messaging/src/main/org/jboss/jms/server/destination/QueueServiceMO.java	2009-04-01 20:50:32 UTC (rev 86614)
+++ branches/Branch_5_x/messaging/src/main/org/jboss/jms/server/destination/QueueServiceMO.java	2009-04-01 21:07:41 UTC (rev 86615)
@@ -36,6 +36,8 @@
 import org.jboss.managed.api.annotation.ManagementProperties;
 import org.jboss.managed.api.annotation.ManagementProperty;
 import org.jboss.managed.api.annotation.ViewUse;
+import org.jboss.metatype.api.annotations.MetaMapping;
+import org.jboss.metatype.plugins.values.mappers.StringObjectNameMetaMapper;
 import org.w3c.dom.Element;
 
 /**
@@ -70,18 +72,21 @@
    @ManagementProperty(use={ViewUse.CONFIGURATION},
          description="The ObjectName of the server peer this destination was deployed on",
          includeInTemplate=true)
+   @MetaMapping(StringObjectNameMetaMapper.class)
    public ObjectName getServerPeer() { return null; }
    public void setServerPeer(ObjectName arg0) { }
    
    @ManagementProperty(use={ViewUse.CONFIGURATION},
          description="The DLQ for this queue, overrides the default DLQ on the server peer",
          includeInTemplate=true)
+   @MetaMapping(StringObjectNameMetaMapper.class)
    public ObjectName getDLQ() { return null; }
    public void setDLQ(ObjectName arg0) { }
    
    @ManagementProperty(use={ViewUse.CONFIGURATION},
          description="The expiry queue for this queue, overrides the default expiry queue on the server peer",
          includeInTemplate=true)
+   @MetaMapping(StringObjectNameMetaMapper.class)
    public ObjectName getExpiryQueue() { return null; }
    public void setExpiryQueue(ObjectName arg0) { }
    

Modified: branches/Branch_5_x/messaging/src/main/org/jboss/jms/server/destination/TopicServiceMO.java
===================================================================
--- branches/Branch_5_x/messaging/src/main/org/jboss/jms/server/destination/TopicServiceMO.java	2009-04-01 20:50:32 UTC (rev 86614)
+++ branches/Branch_5_x/messaging/src/main/org/jboss/jms/server/destination/TopicServiceMO.java	2009-04-01 21:07:41 UTC (rev 86615)
@@ -34,6 +34,8 @@
 import org.jboss.managed.api.annotation.ManagementProperties;
 import org.jboss.managed.api.annotation.ManagementProperty;
 import org.jboss.managed.api.annotation.ViewUse;
+import org.jboss.metatype.api.annotations.MetaMapping;
+import org.jboss.metatype.plugins.values.mappers.StringObjectNameMetaMapper;
 import org.w3c.dom.Element;
 
 /**
@@ -68,18 +70,21 @@
    @ManagementProperty(use={ViewUse.CONFIGURATION},
          description="The ObjectName of the server peer this destination was deployed on",
          includeInTemplate=true)
+   @MetaMapping(StringObjectNameMetaMapper.class)
    public ObjectName getServerPeer() { return null; }
    public void setServerPeer(ObjectName arg0) { }
    
    @ManagementProperty(use={ViewUse.CONFIGURATION},
          description="The DLQ for this topic, overrides the default DLQ on the server peer",
          includeInTemplate=true)   
+   @MetaMapping(StringObjectNameMetaMapper.class)
    public ObjectName getDLQ() { return null; }
    public void setDLQ(ObjectName arg0) { }
    
    @ManagementProperty(use={ViewUse.CONFIGURATION},
          description="The expiry queue for this topic, overrides the default expiry queue on the server peer",
          includeInTemplate=true)   
+   @MetaMapping(StringObjectNameMetaMapper.class)
    public ObjectName getExpiryQueue() { return null; }
    public void setExpiryQueue(ObjectName arg0) { }
    

Modified: branches/Branch_5_x/testsuite/src/main/org/jboss/test/profileservice/test/JmsDestinationUnitTestCase.java
===================================================================
--- branches/Branch_5_x/testsuite/src/main/org/jboss/test/profileservice/test/JmsDestinationUnitTestCase.java	2009-04-01 20:50:32 UTC (rev 86614)
+++ branches/Branch_5_x/testsuite/src/main/org/jboss/test/profileservice/test/JmsDestinationUnitTestCase.java	2009-04-01 21:07:41 UTC (rev 86615)
@@ -35,6 +35,8 @@
 import org.jboss.managed.api.DeploymentTemplateInfo;
 import org.jboss.managed.api.ManagedComponent;
 import org.jboss.managed.api.ManagedProperty;
+import org.jboss.metatype.api.types.MetaType;
+import org.jboss.metatype.api.types.SimpleMetaType;
 import org.jboss.metatype.api.values.MetaValue;
 import org.jboss.metatype.api.values.SimpleValueSupport;
 
@@ -107,6 +109,11 @@
       ManagedComponent queue = mgtView.getComponent("/queue/DLQ", type);
       assertNotNull(queue);
       assertEquals("/queue/DLQ", queue.getName());
+      // Validate some of the expected properties
+      ManagedProperty serverPeer = queue.getProperty("serverPeer");
+      assertNotNull(serverPeer);
+      MetaType serverPeerType = serverPeer.getMetaType();
+      assertEquals(SimpleMetaType.STRING, serverPeerType);
    }
 
    public void testCreateQueue() throws Exception




More information about the jboss-cvs-commits mailing list