[jboss-cvs] JBossAS SVN: r60817 - trunk/profileservice/src/main/org/jboss/profileservice/management.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Fri Feb 23 02:49:37 EST 2007


Author: scott.stark at jboss.org
Date: 2007-02-23 02:49:37 -0500 (Fri, 23 Feb 2007)
New Revision: 60817

Modified:
   trunk/profileservice/src/main/org/jboss/profileservice/management/ComponentTypeOverridesVisitor.java
Log:
Implement the jms destination comp type override

Modified: trunk/profileservice/src/main/org/jboss/profileservice/management/ComponentTypeOverridesVisitor.java
===================================================================
--- trunk/profileservice/src/main/org/jboss/profileservice/management/ComponentTypeOverridesVisitor.java	2007-02-23 07:11:40 UTC (rev 60816)
+++ trunk/profileservice/src/main/org/jboss/profileservice/management/ComponentTypeOverridesVisitor.java	2007-02-23 07:49:37 UTC (rev 60817)
@@ -92,9 +92,30 @@
       }
       return type;
    }
+
+   /**
+    * Determines the jms destination based on the org.jboss.jms.server.destination.Queue
+    * or org.jboss.jms.server.destination.Topic mbean in the ctx ServiceMetaData
+    * attachment.
+    * 
+    * @param ctx
+    * @return The ComponentType 
+    */
    protected ComponentType checkJmsDestination(DeploymentUnit ctx)
    {
       ComponentType type = null;
+      ServiceMetaData smd = ctx.getAttachment(ServiceMetaData.class);
+      if( smd != null )
+      {
+         String code = smd.getCode();
+         if( code.startsWith("org.jboss.jms.server.destination") )
+         {
+            if( code.endsWith(".Queue") )
+               type = new ComponentType("JMSDestination", "Queue");
+            else if( code.endsWith(".Topic") )
+               type = new ComponentType("JMSDestination", "Topic");
+         }
+      }
       return type;
    }
 }




More information about the jboss-cvs-commits mailing list