[jboss-cvs] JBossAS SVN: r80136 - in trunk: messaging/src/main/org/jboss/jms/server/destination and 6 other directories.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Tue Oct 28 07:10:11 EDT 2008


Author: adrian at jboss.org
Date: 2008-10-28 07:10:10 -0400 (Tue, 28 Oct 2008)
New Revision: 80136

Added:
   trunk/messaging/src/main/org/jboss/jms/server/destination/JBossMessagingCreateDestinationFactory.java
   trunk/server/src/main/org/jboss/ejb/deployers/CreateDestination.java
   trunk/server/src/main/org/jboss/ejb/deployers/CreateDestinationDeployer.java
   trunk/server/src/main/org/jboss/ejb/deployers/CreateDestinationFactory.java
   trunk/server/src/main/org/jboss/ejb/deployers/CreateDestinationMatcher.java
   trunk/server/src/main/org/jboss/ejb/deployers/SimpleCreateDestinationMatcher.java
   trunk/testsuite/src/main/org/jboss/test/messagedriven/test/SimpleQueueMessageDrivenCreateDestinationUnitTestCase.java
   trunk/testsuite/src/main/org/jboss/test/messagedriven/test/SimpleTopicMessageDrivenCreateDestinationUnitTestCase.java
Modified:
   trunk/messaging/build.xml
   trunk/server/src/etc/deployers/ejb-deployer-jboss-beans.xml
   trunk/testsuite/src/main/org/jboss/test/messagedriven/mbeans/TestMessageDrivenManagement.java
   trunk/testsuite/src/main/org/jboss/test/messagedriven/support/BasicMessageDrivenUnitTest.java
   trunk/testsuite/src/main/org/jboss/test/messagedriven/support/CheckJMSDestinationOperation.java
   trunk/testsuite/src/main/org/jboss/test/messagedriven/support/SimpleMessageDrivenUnitTest.java
   trunk/testsuite/src/main/org/jboss/test/messagedriven/test/JMSContainerInvokerDurableTopicMessageDrivenUnitTestCase.java
   trunk/testsuite/src/main/org/jboss/test/messagedriven/test/JMSContainerInvokerQueueMessageDrivenUnitTestCase.java
   trunk/testsuite/src/main/org/jboss/test/messagedriven/test/JMSContainerInvokerTopicMessageDrivenUnitTestCase.java
   trunk/testsuite/src/resources/messagedriven/jar/META-INF/jboss.xml
Log:
[JBAS-6013] - Add support for creating mdb destinations automatically

Modified: trunk/messaging/build.xml
===================================================================
--- trunk/messaging/build.xml	2008-10-28 11:02:30 UTC (rev 80135)
+++ trunk/messaging/build.xml	2008-10-28 11:10:10 UTC (rev 80136)
@@ -81,14 +81,19 @@
       <path refid="jboss.jboss.javaee.classpath"/>
       <path refid="jboss.common.core.classpath"/>
       <path refid="jboss.common.logging.spi.classpath"/>
+      <path refid="jboss.jboss.deployers.classpath"/>
       <path refid="jboss.j2se.classpath"/>
       <path refid="jboss.messaging.classpath"/>      
+      <path refid="jboss.metadata.classpath"/>
+      <path refid="jboss.server.classpath"/>      
       <path refid="jboss.systemjmx.classpath"/>      
       <path refid="jboss.jboss.man.classpath"/>      
       <path refid="jboss.microcontainer.classpath"/>      
       <path refid="jboss.jbosssx.classpath"/>      
       <path refid="jboss.jboss.jaspi.api.classpath"/>      
       <path refid="jboss.jboss.security.spi.classpath"/>      
+      <path refid="sun.jaxb.classpath"/>
+      <path refid="jboss.jbossxb.classpath"/>
     </path>
 
     <!-- ===== -->

Added: trunk/messaging/src/main/org/jboss/jms/server/destination/JBossMessagingCreateDestinationFactory.java
===================================================================
--- trunk/messaging/src/main/org/jboss/jms/server/destination/JBossMessagingCreateDestinationFactory.java	                        (rev 0)
+++ trunk/messaging/src/main/org/jboss/jms/server/destination/JBossMessagingCreateDestinationFactory.java	2008-10-28 11:10:10 UTC (rev 80136)
@@ -0,0 +1,215 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2008, Red Hat Middleware LLC, and individual contributors
+* as indicated by the @author tags. See the copyright.txt file in the
+* distribution for a full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.jms.server.destination;
+
+import java.util.HashSet;
+import java.util.Set;
+
+import javax.jms.Queue;
+import javax.jms.Topic;
+import javax.management.ObjectName;
+
+import org.jboss.deployers.spi.DeploymentException;
+import org.jboss.deployers.structure.spi.DeploymentUnit;
+import org.jboss.ejb.deployers.CreateDestinationFactory;
+import org.jboss.logging.Logger;
+import org.jboss.metadata.ejb.jboss.JBossMessageDrivenBeanMetaData;
+import org.jboss.metadata.ejb.spec.ActivationConfigMetaData;
+import org.jboss.metadata.ejb.spec.ActivationConfigPropertiesMetaData;
+import org.jboss.metadata.ejb.spec.ActivationConfigPropertyMetaData;
+import org.jboss.mx.util.ObjectNameFactory;
+import org.jboss.system.metadata.ServiceAttributeMetaData;
+import org.jboss.system.metadata.ServiceConstructorMetaData;
+import org.jboss.system.metadata.ServiceDependencyMetaData;
+import org.jboss.system.metadata.ServiceMetaData;
+import org.jboss.system.metadata.ServiceTextValueMetaData;
+
+/**
+ * JBossMessagingCreateDestinationFactory.
+ * 
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 1.1 $
+ */
+public class JBossMessagingCreateDestinationFactory implements CreateDestinationFactory
+{
+   /** The log */
+   private static final Logger log = Logger.getLogger(JBossMessagingCreateDestinationFactory.class);
+
+   /** The server peer name */
+   private String serverPeerName;
+   
+   /** The post office name */
+   private String postOfficeName;
+   
+   /**
+    * Get the serverPeerName.
+    * 
+    * @return the serverPeerName.
+    */
+   public String getServerPeerName()
+   {
+      return serverPeerName;
+   }
+
+   /**
+    * Set the serverPeerName.
+    * 
+    * @param serverPeerName the serverPeerName.
+    */
+   public void setServerPeerName(String serverPeerName)
+   {
+      this.serverPeerName = serverPeerName;
+   }
+
+   /**
+    * Get the postOfficeName.
+    * 
+    * @return the postOfficeName.
+    */
+   public String getPostOfficeName()
+   {
+      return postOfficeName;
+   }
+
+   /**
+    * Set the postOfficeName.
+    * 
+    * @param postOfficeName the postOfficeName.
+    */
+   public void setPostOfficeName(String postOfficeName)
+   {
+      this.postOfficeName = postOfficeName;
+   }
+
+   public void create()
+   {
+      if (serverPeerName == null)
+         throw new IllegalStateException("serverPeerName has not been set");
+      if (postOfficeName == null)
+         throw new IllegalStateException("postOfficeName has not been set");
+   }
+   
+   public Object create(DeploymentUnit unit, JBossMessageDrivenBeanMetaData mdb) throws DeploymentException
+   {
+      String destinationName = null;
+      String destinationType = null;
+      
+      ActivationConfigMetaData activationConfig = mdb.getActivationConfig();
+      if (activationConfig != null)
+      {
+         ActivationConfigPropertiesMetaData properties = activationConfig.getActivationConfigProperties();
+         if (properties != null)
+         {
+            destinationName = getActivationConfigProperty(properties, "destination");
+            destinationType = getActivationConfigProperty(properties, "destinationType");
+         }
+      }
+
+      // TODO message-destination-link?
+      
+      if (destinationName == null || destinationName.trim().length() == 0)
+      {
+         log.warn("Unable to determine destination for " + mdb.getName());
+         return null;
+      }
+      boolean isTopic = false;
+      if (destinationType == null)
+      {
+         log.warn("Unable to determine destination type for " + mdb.getName());
+         return null;
+      }
+      else if (destinationType.equals(Queue.class.getName()))
+      {
+         // Its a queue
+      }
+      else if (destinationType.equals(Topic.class.getName()))
+      {
+         isTopic = true;
+      }
+      else
+      {
+         log.warn("Unknown destination type '" + destinationType + "' for " + mdb.getName());
+         return null;
+      }
+      
+      ServiceMetaData result = new ServiceMetaData();
+      result.setConstructor(new ServiceConstructorMetaData());
+      ObjectName objectName;
+      if (isTopic)
+      {
+         objectName = ObjectNameFactory.create("jboss.messaging.destination:service=Topic,name=" + destinationName);
+         result.setCode("org.jboss.jms.server.destination.TopicService");
+         result.setXMBeanDD("xmdesc/Topic-xmbean.xml");
+      }
+      else
+      {
+         objectName = ObjectNameFactory.create("jboss.messaging.destination:service=Queue,name=" + destinationName);
+         result.setCode("org.jboss.jms.server.destination.QueueService");
+         result.setXMBeanDD("xmdesc/Queue-xmbean.xml");
+      }
+      result.setObjectName(objectName);
+      
+      ServiceAttributeMetaData attribute = new ServiceAttributeMetaData();
+      attribute.setName("JNDIName");
+      attribute.setValue(new ServiceTextValueMetaData(destinationName));
+      result.addAttribute(attribute);
+
+      attribute = new ServiceAttributeMetaData();
+      attribute.setName("ServerPeer");
+      attribute.setValue(new ServiceTextValueMetaData(serverPeerName));
+      result.addAttribute(attribute);
+      
+      ServiceDependencyMetaData dependency = new ServiceDependencyMetaData();
+      dependency.setIDependOn(serverPeerName);
+      result.addDependency(dependency);
+
+      dependency = new ServiceDependencyMetaData();
+      dependency.setIDependOn(postOfficeName);
+      result.addDependency(dependency);
+
+      // Add this mbean to the mdbs depends
+      Set<String> depends = mdb.getDepends();
+      if (depends == null)
+      {
+         depends = new HashSet<String>();
+         mdb.setDepends(depends);
+      }
+      depends.add(objectName.getCanonicalName());
+      
+      return result;
+   }
+
+   /**
+    * Get an activation config property
+    * 
+    * @param properties the properties
+    * @param name the name
+    * @return the property or null if not found
+    */
+   protected static String getActivationConfigProperty(ActivationConfigPropertiesMetaData properties, String name)
+   {
+      ActivationConfigPropertyMetaData property = properties.get(name);
+      if (property == null)
+         return null;
+      return property.getValue();
+   }
+}

Modified: trunk/server/src/etc/deployers/ejb-deployer-jboss-beans.xml
===================================================================
--- trunk/server/src/etc/deployers/ejb-deployer-jboss-beans.xml	2008-10-28 11:02:30 UTC (rev 80135)
+++ trunk/server/src/etc/deployers/ejb-deployer-jboss-beans.xml	2008-10-28 11:10:10 UTC (rev 80136)
@@ -78,4 +78,29 @@
    </bean>
    <bean name="StandardJBossMetaDataDeployer" class="org.jboss.ejb.deployers.StandardJBossMetaDataDeployer">
    </bean>
+
+   <!-- Deployer for automatically creating message driven destinations -->
+   <bean name="CreateDestinationDeployer" class="org.jboss.ejb.deployers.CreateDestinationDeployer">
+      <incallback method="addCreateDestination"/>
+      <uncallback method="addCreateDestination"/>
+   </bean>
+
+   <!-- Destination creator for JBoss Messaging -->
+   <bean name="JBossMessageDestinationCreator" class="org.jboss.ejb.deployers.CreateDestination">
+      <!-- We match any jms mdb that is going to be deployed using our rar -->
+      <property name="matcher">
+         <bean class="org.jboss.ejb.deployers.SimpleCreateDestinationMatcher">
+            <property name="default">true</property>
+            <property name="messageListener">javax.jms.MessageListener</property>
+            <property name="rarName">jms-ra.rar</property>
+         </bean>
+      </property>
+      <!-- Create a destination with JBoss Messaging -->
+      <property name="factory">
+         <bean class="org.jboss.jms.server.destination.JBossMessagingCreateDestinationFactory">
+            <property name="serverPeerName">jboss.messaging:service=ServerPeer</property>
+            <property name="postOfficeName">jboss.messaging:service=PostOffice</property>
+         </bean>
+      </property>
+   </bean>
 </deployment>

Added: trunk/server/src/main/org/jboss/ejb/deployers/CreateDestination.java
===================================================================
--- trunk/server/src/main/org/jboss/ejb/deployers/CreateDestination.java	                        (rev 0)
+++ trunk/server/src/main/org/jboss/ejb/deployers/CreateDestination.java	2008-10-28 11:10:10 UTC (rev 80136)
@@ -0,0 +1,112 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2008, Red Hat Middleware LLC, and individual contributors
+* as indicated by the @author tags. See the copyright.txt file in the
+* distribution for a full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.ejb.deployers;
+
+/**
+ * CreateDestination.
+ * 
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 1.1 $
+ */
+public class CreateDestination
+{
+   /** The matcher */
+   private CreateDestinationMatcher matcher;
+   
+   /** The factory */
+   private CreateDestinationFactory factory;
+
+   /**
+    * Create a new CreateDestination.
+    */
+   public CreateDestination()
+   {
+   }
+   
+   /**
+    * Create a new CreateDestination.
+    * 
+    * @param matcher the matcher
+    * @param factory the factory
+    * @throws IllegalArgumentException for a null parameter
+    */
+   public CreateDestination(CreateDestinationMatcher matcher, CreateDestinationFactory factory)
+   {
+      if (matcher == null)
+         throw new IllegalArgumentException("Null matcher");
+      if (factory == null)
+         throw new IllegalArgumentException("Null factory");
+      this.matcher = matcher;
+      this.factory = factory;
+   }
+
+   /**
+    * Get the matcher.
+    * 
+    * @return the matcher.
+    */
+   public CreateDestinationMatcher getMatcher()
+   {
+      return matcher;
+   }
+
+   /**
+    * Set the matcher.
+    * 
+    * @param matcher the matcher.
+    */
+   public void setMatcher(CreateDestinationMatcher matcher)
+   {
+      this.matcher = matcher;
+   }
+
+   /**
+    * Get the factory.
+    * 
+    * @return the factory.
+    */
+   public CreateDestinationFactory getFactory()
+   {
+      return factory;
+   }
+
+   /**
+    * Set the factory.
+    * 
+    * @param factory the factory.
+    */
+   public void setFactory(CreateDestinationFactory factory)
+   {
+      this.factory = factory;
+   }
+
+   /**
+    * Validate the parameters
+    */
+   public void create()
+   {
+      if (matcher == null)
+         throw new IllegalStateException("No matcher has been set");
+      if (factory == null)
+         throw new IllegalStateException("No factory has been set");
+   }
+}

Added: trunk/server/src/main/org/jboss/ejb/deployers/CreateDestinationDeployer.java
===================================================================
--- trunk/server/src/main/org/jboss/ejb/deployers/CreateDestinationDeployer.java	                        (rev 0)
+++ trunk/server/src/main/org/jboss/ejb/deployers/CreateDestinationDeployer.java	2008-10-28 11:10:10 UTC (rev 80136)
@@ -0,0 +1,218 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2008, Red Hat Middleware LLC, and individual contributors
+* as indicated by the @author tags. See the copyright.txt file in the
+* distribution for a full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.ejb.deployers;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.concurrent.CopyOnWriteArrayList;
+
+import org.jboss.deployers.spi.DeploymentException;
+import org.jboss.deployers.spi.deployer.helpers.AbstractSimpleRealDeployer;
+import org.jboss.deployers.structure.spi.DeploymentUnit;
+import org.jboss.kernel.spi.deployment.KernelDeployment;
+import org.jboss.metadata.ejb.jboss.JBossEnterpriseBeanMetaData;
+import org.jboss.metadata.ejb.jboss.JBossEnterpriseBeansMetaData;
+import org.jboss.metadata.ejb.jboss.JBossMessageDrivenBeanMetaData;
+import org.jboss.metadata.ejb.jboss.JBossMetaData;
+import org.jboss.system.metadata.ServiceMetaData;
+
+/**
+ * CreateDestinationDeployer.
+ *
+ * FIXME This should be a component deployer but the ejb deployment is currently componentised
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 1.1 $
+ */
+public class CreateDestinationDeployer extends AbstractSimpleRealDeployer<JBossMetaData>
+{
+   /** The factories */
+   private List<CreateDestination> factories = new CopyOnWriteArrayList<CreateDestination>();
+   
+   /**
+    * Create a new CreateDestinationDeployer.
+    */
+   public CreateDestinationDeployer()
+   {
+      super(JBossMetaData.class);
+      setOutput(JBossMetaData.class);
+      setOutput(ServiceMetaData.class);
+      setOutput(KernelDeployment.class);
+   }
+
+   /**
+    * Add a create destination
+    * 
+    * @param factory the factory
+    * @throws IllegalArgumentException for a null factory
+    */
+   public void addCreateDestination(CreateDestination factory)
+   {
+      if (factory == null)
+         throw new IllegalArgumentException("Null factory");
+      factories.add(factory);
+   }
+
+   /**
+    * Remove a create destination
+    * 
+    * @param factory the factory
+    * @throws IllegalArgumentException for a null factory
+    */
+   public void removeCreateDestination(CreateDestination factory)
+   {
+      if (factory == null)
+         throw new IllegalArgumentException("Null factory");
+      factories.add(factory);
+   }
+   
+   public void deploy(DeploymentUnit unit, JBossMetaData deployment) throws DeploymentException
+   {
+      if (factories.isEmpty())
+         return;
+      
+      JBossEnterpriseBeansMetaData beans = deployment.getEnterpriseBeans();
+      if (beans != null && beans.isEmpty() == false)
+      {
+         ArrayList<JBossMessageDrivenBeanMetaData> deployed = new ArrayList<JBossMessageDrivenBeanMetaData>();
+         for (JBossEnterpriseBeanMetaData bean : beans)
+         {
+            if (bean.isMessageDriven())
+            {
+               try
+               {
+                  JBossMessageDrivenBeanMetaData messageDriven = (JBossMessageDrivenBeanMetaData) bean;
+                  if (isCreateDestination(unit, messageDriven))
+                  {
+                     deploy(unit, messageDriven);
+                     deployed.add(messageDriven);
+                  }
+               }
+               catch (Exception e)
+               {
+                  if (deployed.isEmpty() == false)
+                  {
+                     for (JBossMessageDrivenBeanMetaData messageDriven : deployed)
+                     {
+                        try
+                        {
+                           undeploy(unit, messageDriven);
+                        }
+                        catch (Exception t)
+                        {
+                           log.warn("Error undeploying destination: " + messageDriven.getName(), t);
+                        }
+                     }
+                  }
+                  throw DeploymentException.rethrowAsDeploymentException("Error deploying destination" + bean.getName(), e);
+               }
+            }
+         }
+      }
+   }
+
+   public void undeploy(DeploymentUnit unit, JBossMetaData deployment)
+   {
+      if (factories.isEmpty())
+         return;
+      
+      JBossEnterpriseBeansMetaData beans = deployment.getEnterpriseBeans();
+      if (beans != null && beans.isEmpty() == false)
+      {
+         for (JBossEnterpriseBeanMetaData bean : beans)
+         {
+            if (bean.isMessageDriven())
+            {
+               try
+               {
+                  JBossMessageDrivenBeanMetaData messageDriven = (JBossMessageDrivenBeanMetaData) bean;
+                  if (isCreateDestination(unit, messageDriven))
+                     undeploy(unit, messageDriven);
+               }
+               catch (Exception e)
+               {
+                  log.warn("Error undeploying destination" + bean.getName(), e);
+               }
+            }
+         }
+      }
+   }
+
+   /**
+    * Deploy a message driven bean
+    * 
+    * @param unit the deployment unit
+    * @param mdb the mdb
+    * @throws DeploymentException for any error
+    */
+   protected void deploy(DeploymentUnit unit, JBossMessageDrivenBeanMetaData mdb) throws DeploymentException
+   {
+      for (CreateDestination createDestination : factories)
+      {
+         if (createDestination.getMatcher().isMatch(unit, mdb))
+         {
+            Object attachment = createDestination.getFactory().create(unit, mdb);
+            if (attachment != null)
+            {
+               unit.addAttachment(getAttachmentName(unit, mdb), attachment);
+               return;
+            }
+         }
+      }
+   }
+
+   /**
+    * Undeploy a message driven bean
+    * 
+    * @param unit the deployment unit
+    * @param mdb the mdb
+    * @throws DeploymentException for any error
+    */
+   protected void undeploy(DeploymentUnit unit, JBossMessageDrivenBeanMetaData mdb) throws DeploymentException
+   {
+      unit.removeAttachment(getAttachmentName(unit, mdb));
+   }
+   
+   /**
+    * Whether we should create a destination for this MDB
+    * 
+    * @param unit the deployment unit
+    * @param mdb the message driven metadata
+    * @return true to create a destination
+    * @throws DeploymentException for any error
+    */
+   protected boolean isCreateDestination(DeploymentUnit unit, JBossMessageDrivenBeanMetaData mdb) throws DeploymentException
+   {
+      return mdb.isCreateDestination();
+   }
+
+   /**
+    * Get the attachment name
+    * 
+    * @param unit the unit
+    * @param mdb the mdb
+    * @return the attachment name
+    */
+   protected String getAttachmentName(DeploymentUnit unit, JBossMessageDrivenBeanMetaData mdb)
+   {
+      return mdb.getName() + "##Create_Destination";
+   }
+}

Added: trunk/server/src/main/org/jboss/ejb/deployers/CreateDestinationFactory.java
===================================================================
--- trunk/server/src/main/org/jboss/ejb/deployers/CreateDestinationFactory.java	                        (rev 0)
+++ trunk/server/src/main/org/jboss/ejb/deployers/CreateDestinationFactory.java	2008-10-28 11:10:10 UTC (rev 80136)
@@ -0,0 +1,45 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2008, Red Hat Middleware LLC, and individual contributors
+* as indicated by the @author tags. See the copyright.txt file in the
+* distribution for a full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.ejb.deployers;
+
+import org.jboss.deployers.spi.DeploymentException;
+import org.jboss.deployers.structure.spi.DeploymentUnit;
+import org.jboss.metadata.ejb.jboss.JBossMessageDrivenBeanMetaData;
+
+/**
+ * CreateDestinationFactory.
+ * 
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 1.1 $
+ */
+public interface CreateDestinationFactory
+{
+   /**
+    * Return the attachment to create the destination
+    * 
+    * @param unit the unit
+    * @param mdb the mdb
+    * @return the attachment
+    * @throws DeploymentException for any error
+    */
+    Object create(DeploymentUnit unit, JBossMessageDrivenBeanMetaData mdb) throws DeploymentException;
+}

Added: trunk/server/src/main/org/jboss/ejb/deployers/CreateDestinationMatcher.java
===================================================================
--- trunk/server/src/main/org/jboss/ejb/deployers/CreateDestinationMatcher.java	                        (rev 0)
+++ trunk/server/src/main/org/jboss/ejb/deployers/CreateDestinationMatcher.java	2008-10-28 11:10:10 UTC (rev 80136)
@@ -0,0 +1,45 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2008, Red Hat Middleware LLC, and individual contributors
+* as indicated by the @author tags. See the copyright.txt file in the
+* distribution for a full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.ejb.deployers;
+
+import org.jboss.deployers.spi.DeploymentException;
+import org.jboss.deployers.structure.spi.DeploymentUnit;
+import org.jboss.metadata.ejb.jboss.JBossMessageDrivenBeanMetaData;
+
+/**
+ * CreateDestinationMatcher.
+ * 
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 1.1 $
+ */
+public interface CreateDestinationMatcher
+{
+   /**
+    * Return true if it is a match
+    * 
+    * @param unit the unit
+    * @param mdb the mdb
+    * @return true if this is a match
+    * @throws DeploymentException for any error
+    */
+    boolean isMatch(DeploymentUnit unit, JBossMessageDrivenBeanMetaData mdb) throws DeploymentException;
+}

Added: trunk/server/src/main/org/jboss/ejb/deployers/SimpleCreateDestinationMatcher.java
===================================================================
--- trunk/server/src/main/org/jboss/ejb/deployers/SimpleCreateDestinationMatcher.java	                        (rev 0)
+++ trunk/server/src/main/org/jboss/ejb/deployers/SimpleCreateDestinationMatcher.java	2008-10-28 11:10:10 UTC (rev 80136)
@@ -0,0 +1,125 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2008, Red Hat Middleware LLC, and individual contributors
+* as indicated by the @author tags. See the copyright.txt file in the
+* distribution for a full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.ejb.deployers;
+
+import org.jboss.deployers.spi.DeploymentException;
+import org.jboss.deployers.structure.spi.DeploymentUnit;
+import org.jboss.metadata.ejb.jboss.JBossMessageDrivenBeanMetaData;
+
+/**
+ * SimpleCreateDestinationMatcher.
+ * 
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 1.1 $
+ */
+public class SimpleCreateDestinationMatcher implements CreateDestinationMatcher
+{
+   /** The message listener class */
+   private String messageListener;
+
+   /** The resource adapter name */
+   private String rarName;
+
+   /** Whether we are the default matcher */
+   private boolean defaultMatcher;
+   
+   /**
+    * Get the messageListener.
+    * 
+    * @return the messageListener.
+    */
+   public String getMessageListener()
+   {
+      return messageListener;
+   }
+
+   /**
+    * Set the messageListener.
+    * 
+    * @param messageListener the messageListener.
+    */
+   public void setMessageListener(String messageListener)
+   {
+      this.messageListener = messageListener;
+   }
+
+   /**
+    * Get the rarName.
+    * 
+    * @return the rarName.
+    */
+   public String getRarName()
+   {
+      return rarName;
+   }
+
+   /**
+    * Set the rarName.
+    * 
+    * @param rarName the rarName.
+    */
+   public void setRarName(String rarName)
+   {
+      this.rarName = rarName;
+   }
+
+   /**
+    * Get the defaultMatcher.
+    * 
+    * @return the defaultMatcher.
+    */
+   public boolean isDefault()
+   {
+      return defaultMatcher;
+   }
+
+   /**
+    * Set the defaultMatcher.
+    * 
+    * @param defaultMatcher the defaultMatcher.
+    */
+   public void setDefault(boolean defaultMatcher)
+   {
+      this.defaultMatcher = defaultMatcher;
+   }
+
+   public boolean isMatch(DeploymentUnit unit, JBossMessageDrivenBeanMetaData mdb) throws DeploymentException
+   {
+      if (noMatch(messageListener, mdb.getMessagingType(), isDefault()))
+         return false;
+      if (noMatch(rarName, mdb.getResourceAdapterName(), isDefault()))
+         return false;
+      return true;
+   }
+   
+   protected static boolean noMatch(String check, String parameter, boolean defaultMatch)
+   {
+      if (check != null)
+      {
+         if (parameter == null)
+            return defaultMatch == false;
+         parameter = parameter.trim();
+         return check.equals(parameter) == false;
+      }
+      return false;
+   }
+}

Modified: trunk/testsuite/src/main/org/jboss/test/messagedriven/mbeans/TestMessageDrivenManagement.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/messagedriven/mbeans/TestMessageDrivenManagement.java	2008-10-28 11:02:30 UTC (rev 80135)
+++ trunk/testsuite/src/main/org/jboss/test/messagedriven/mbeans/TestMessageDrivenManagement.java	2008-10-28 11:10:10 UTC (rev 80136)
@@ -67,6 +67,7 @@
       defaultProps.put("subscriptionName", "");
       defaultProps.put("user", "guest");
       defaultProps.put("password", "guest");
+      defaultProps.put("createDestination", "false");
    }
    
    protected ArrayList messages = new ArrayList();

Modified: trunk/testsuite/src/main/org/jboss/test/messagedriven/support/BasicMessageDrivenUnitTest.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/messagedriven/support/BasicMessageDrivenUnitTest.java	2008-10-28 11:02:30 UTC (rev 80135)
+++ trunk/testsuite/src/main/org/jboss/test/messagedriven/support/BasicMessageDrivenUnitTest.java	2008-10-28 11:10:10 UTC (rev 80136)
@@ -282,14 +282,16 @@
    protected void setUp() throws Exception
    {
 	  super.setUp();
-	  deployDestinations();
+	  if (isDeployDestinations())
+	     deployDestinations();
       try
       {
          deploy(mbeansar);
       }
       catch (Exception e)
       {
-         undeployDestinations();
+         if (isDeployDestinations())
+            undeployDestinations();
          throw e;
       }
    }
@@ -304,14 +306,26 @@
       {
          getLog().error("Error undeploying: " + mbeansar, t);
       }
-      undeployDestinations();
+      if (isDeployDestinations())
+         undeployDestinations();
       super.tearDown();
    }
    
+   protected boolean isDeployDestinations()
+   {
+      return true;
+   }
+   
+   protected boolean isClearDestination()
+   {
+      return true;
+   }
+   
    protected void startTest(Properties props) throws Exception
    {
       this.props = props;
-      clearMessages(getJMXDestination());
+      if (isClearDestination())
+         clearMessages(getJMXDestination());
       clearMessages(getDLQJMXDestination());
       tidyup(props);
       initProperties(props);
@@ -367,7 +381,8 @@
       }
       try
       {
-         clearMessages(getJMXDestination());
+         if (isClearDestination())
+            clearMessages(getJMXDestination());
          tidyup(props);
       }
       catch (Throwable t)

Modified: trunk/testsuite/src/main/org/jboss/test/messagedriven/support/CheckJMSDestinationOperation.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/messagedriven/support/CheckJMSDestinationOperation.java	2008-10-28 11:02:30 UTC (rev 80135)
+++ trunk/testsuite/src/main/org/jboss/test/messagedriven/support/CheckJMSDestinationOperation.java	2008-10-28 11:10:10 UTC (rev 80136)
@@ -36,6 +36,12 @@
    protected int msgNo;
    protected Destination destination;
    
+   public CheckJMSDestinationOperation(BasicMessageDrivenUnitTest test, int msgNo)
+   {
+      super(test);
+      this.msgNo = msgNo;
+   }
+   
    public CheckJMSDestinationOperation(BasicMessageDrivenUnitTest test, int msgNo, Destination destination)
    {
       super(test);
@@ -47,6 +53,8 @@
    {
       TextMessage message = (TextMessage) test.getMessages().get(msgNo);
       Destination msgdest = message.getJMSDestination();
+      if (destination == null)
+         destination = test.getDestination();
       
       if (message == null || !msgdest.equals(destination))
          throw new Exception("**** For msgNo=" + msgNo + " destination=" + destination.toString() + " received=" + msgdest.toString());

Modified: trunk/testsuite/src/main/org/jboss/test/messagedriven/support/SimpleMessageDrivenUnitTest.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/messagedriven/support/SimpleMessageDrivenUnitTest.java	2008-10-28 11:02:30 UTC (rev 80135)
+++ trunk/testsuite/src/main/org/jboss/test/messagedriven/support/SimpleMessageDrivenUnitTest.java	2008-10-28 11:10:10 UTC (rev 80136)
@@ -70,7 +70,7 @@
       {
          new SendMessageOperation(this, "1"),
          new CheckMessageSizeOperation(this, 1, 0),
-         new CheckJMSDestinationOperation(this, 0, getDestination()),
+         new CheckJMSDestinationOperation(this, 0),
          new CheckMessageIDOperation(this, 0, "1"),
       };
    }
@@ -81,12 +81,12 @@
       {
          new SendMessageOperation(this, "1"),
          new CheckMessageSizeOperation(this, 7, 500),
-         new CheckJMSDestinationOperation(this, 0, getDestination()),
-         new CheckJMSDestinationOperation(this, 1, getDestination()),
-         new CheckJMSDestinationOperation(this, 2, getDestination()),
-         new CheckJMSDestinationOperation(this, 3, getDestination()),
-         new CheckJMSDestinationOperation(this, 4, getDestination()),
-         new CheckJMSDestinationOperation(this, 5, getDestination()),
+         new CheckJMSDestinationOperation(this, 0),
+         new CheckJMSDestinationOperation(this, 1),
+         new CheckJMSDestinationOperation(this, 2),
+         new CheckJMSDestinationOperation(this, 3),
+         new CheckJMSDestinationOperation(this, 4),
+         new CheckJMSDestinationOperation(this, 5),
          new CheckJMSDestinationOperation(this, 6, getDLQDestination()),
          new CheckMessageIDOperation(this, 0, "1"),
          new CheckMessageIDOperation(this, 1, "1"),

Modified: trunk/testsuite/src/main/org/jboss/test/messagedriven/test/JMSContainerInvokerDurableTopicMessageDrivenUnitTestCase.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/messagedriven/test/JMSContainerInvokerDurableTopicMessageDrivenUnitTestCase.java	2008-10-28 11:02:30 UTC (rev 80135)
+++ trunk/testsuite/src/main/org/jboss/test/messagedriven/test/JMSContainerInvokerDurableTopicMessageDrivenUnitTestCase.java	2008-10-28 11:10:10 UTC (rev 80136)
@@ -58,14 +58,14 @@
          new CheckMessageSizeOperation(this, 0, 5000), 
          new SendMessageOperation(this, "2"),
          new CheckMessageSizeOperation(this, 1, 5000),
-         new CheckJMSDestinationOperation(this, 0, getDestination()),
+         new CheckJMSDestinationOperation(this, 0),
          new CheckMessageIDOperation(this, 0, "2"),
          new DeactivateOperation(this, mdbInvoker),
          new SendMessageOperation(this, "3"),
          new CheckMessageSizeOperation(this, 1, 5000),
          new ActivateOperation(this, mdbInvoker),
          new CheckMessageSizeOperation(this, 2, 0),
-         new CheckJMSDestinationOperation(this, 1, getDestination()),
+         new CheckJMSDestinationOperation(this, 1),
          new CheckMessageIDOperation(this, 1, "3"),
       };
    }

Modified: trunk/testsuite/src/main/org/jboss/test/messagedriven/test/JMSContainerInvokerQueueMessageDrivenUnitTestCase.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/messagedriven/test/JMSContainerInvokerQueueMessageDrivenUnitTestCase.java	2008-10-28 11:02:30 UTC (rev 80135)
+++ trunk/testsuite/src/main/org/jboss/test/messagedriven/test/JMSContainerInvokerQueueMessageDrivenUnitTestCase.java	2008-10-28 11:10:10 UTC (rev 80136)
@@ -82,14 +82,14 @@
          new CheckMessageSizeOperation(this, 0, 5000),
          new ActivateOperation(this, mdbInvoker),
          new CheckMessageSizeOperation(this, 1, 0),
-         new CheckJMSDestinationOperation(this, 0, getDestination()),
+         new CheckJMSDestinationOperation(this, 0),
          new CheckMessageIDOperation(this, 0, "1"),
          new DeactivateOperation(this, mdbInvoker),
          new SendMessageOperation(this, "2"),
          new CheckMessageSizeOperation(this, 1, 5000),
          new ActivateOperation(this, mdbInvoker),
          new CheckMessageSizeOperation(this, 2, 0),
-         new CheckJMSDestinationOperation(this, 1, getDestination()),
+         new CheckJMSDestinationOperation(this, 1),
          new CheckMessageIDOperation(this, 1, "2"),
       };
    }

Modified: trunk/testsuite/src/main/org/jboss/test/messagedriven/test/JMSContainerInvokerTopicMessageDrivenUnitTestCase.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/messagedriven/test/JMSContainerInvokerTopicMessageDrivenUnitTestCase.java	2008-10-28 11:02:30 UTC (rev 80135)
+++ trunk/testsuite/src/main/org/jboss/test/messagedriven/test/JMSContainerInvokerTopicMessageDrivenUnitTestCase.java	2008-10-28 11:10:10 UTC (rev 80136)
@@ -58,7 +58,7 @@
          new CheckMessageSizeOperation(this, 0, 5000),
          new SendMessageOperation(this, "1"),
          new CheckMessageSizeOperation(this, 1, 5000),
-         new CheckJMSDestinationOperation(this, 0, getDestination()),
+         new CheckJMSDestinationOperation(this, 0),
          new CheckMessageIDOperation(this, 0, "1"),
          new DeactivateOperation(this, mdbInvoker),
          new SendMessageOperation(this, "2"),

Added: trunk/testsuite/src/main/org/jboss/test/messagedriven/test/SimpleQueueMessageDrivenCreateDestinationUnitTestCase.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/messagedriven/test/SimpleQueueMessageDrivenCreateDestinationUnitTestCase.java	                        (rev 0)
+++ trunk/testsuite/src/main/org/jboss/test/messagedriven/test/SimpleQueueMessageDrivenCreateDestinationUnitTestCase.java	2008-10-28 11:10:10 UTC (rev 80136)
@@ -0,0 +1,70 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.test.messagedriven.test;
+
+import java.util.Properties;
+
+import javax.management.ObjectName;
+
+import org.jboss.mx.util.ObjectNameFactory;
+import org.jboss.test.messagedriven.support.SimpleMessageDrivenUnitTest;
+
+/**
+ * Basic tests of message driven beans 
+ *
+ * @author <a href="mailto:adrian at jboss.com>Adrian Brock</a>
+ * @version <tt>$Revision: 1.4</tt>
+ */
+public class SimpleQueueMessageDrivenCreateDestinationUnitTestCase extends SimpleMessageDrivenUnitTest
+{
+   static ObjectName destinationName;
+   
+   static Properties testProps;
+   
+   static
+   {
+      if (isJBossMessaging())
+         destinationName = ObjectNameFactory.create("jboss.messaging.destination:service=Queue,name=queue/CreateDestination");
+      else
+         destinationName = ObjectNameFactory.create("jboss.mq.destination:service=Queue,name=queue/CreateDestination");
+      testProps = (Properties) testQueueProps.clone();
+      testProps.put("destination", "queue/CreateDestination");
+      testProps.put("createDestination", "true");
+   }
+   
+   public SimpleQueueMessageDrivenCreateDestinationUnitTestCase(String name)
+   {
+      super(name, destinationName, testProps);
+   }
+
+   @Override
+   protected boolean isDeployDestinations()
+   {
+      return false;
+   }
+   
+   @Override
+   protected boolean isClearDestination()
+   {
+      return false;
+   }
+}

Added: trunk/testsuite/src/main/org/jboss/test/messagedriven/test/SimpleTopicMessageDrivenCreateDestinationUnitTestCase.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/messagedriven/test/SimpleTopicMessageDrivenCreateDestinationUnitTestCase.java	                        (rev 0)
+++ trunk/testsuite/src/main/org/jboss/test/messagedriven/test/SimpleTopicMessageDrivenCreateDestinationUnitTestCase.java	2008-10-28 11:10:10 UTC (rev 80136)
@@ -0,0 +1,70 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.test.messagedriven.test;
+
+import java.util.Properties;
+
+import javax.management.ObjectName;
+
+import org.jboss.mx.util.ObjectNameFactory;
+import org.jboss.test.messagedriven.support.SimpleMessageDrivenUnitTest;
+
+/**
+ * Basic tests of message driven beans 
+ *
+ * @author <a href="mailto:adrian at jboss.com>Adrian Brock</a>
+ * @version <tt>$Revision: 1.4</tt>
+ */
+public class SimpleTopicMessageDrivenCreateDestinationUnitTestCase extends SimpleMessageDrivenUnitTest
+{
+   static ObjectName destinationName;
+   
+   static Properties testProps;
+   
+   static
+   {
+      if (isJBossMessaging())
+         destinationName = ObjectNameFactory.create("jboss.messaging.destination:service=Topic,name=topic/CreateDestination");
+      else
+         destinationName = ObjectNameFactory.create("jboss.mq.destination:service=Topic,name=topic/CreateDestination");
+      testProps = (Properties) testTopicProps.clone();
+      testProps.put("destination", "topic/CreateDestination");
+      testProps.put("createDestination", "true");
+   }
+   
+   public SimpleTopicMessageDrivenCreateDestinationUnitTestCase(String name)
+   {
+      super(name, destinationName, testProps);
+   }
+
+   @Override
+   protected boolean isDeployDestinations()
+   {
+      return false;
+   }
+   
+   @Override
+   protected boolean isClearDestination()
+   {
+      return false;
+   }
+}

Modified: trunk/testsuite/src/resources/messagedriven/jar/META-INF/jboss.xml
===================================================================
--- trunk/testsuite/src/resources/messagedriven/jar/META-INF/jboss.xml	2008-10-28 11:02:30 UTC (rev 80135)
+++ trunk/testsuite/src/resources/messagedriven/jar/META-INF/jboss.xml	2008-10-28 11:10:10 UTC (rev 80136)
@@ -1,9 +1,10 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!DOCTYPE jboss PUBLIC
-      "-//JBoss//DTD JBOSS 4.0//EN"
-      "http://www.jboss.org/j2ee/dtd/jboss_4_0.dtd">
+<?xml version="1.0" encoding="UTF-8"?>
 
-<jboss>
+<jboss xmlns="http://www.jboss.com/xml/ns/javaee"
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       xsi:schemaLocation="http://www.jboss.com/xml/ns/javaee http://www.jboss.org/j2ee/schema/jboss_5_0.xsd"
+       version="3.0">
+
    <enterprise-beans>
       <message-driven>
          <ejb-name>TestMDB</ejb-name>
@@ -42,6 +43,7 @@
                <activation-config-property-value>${test.messagedriven.DLQMaxResent}</activation-config-property-value>
             </activation-config-property>
          </activation-config>
+         <create-destination>${test.messagedriven.createDestination}</create-destination>
          <invoker-bindings>
             <invoker>
                <invoker-proxy-binding-name>jms-message-inflow-driven-bean</invoker-proxy-binding-name>




More information about the jboss-cvs-commits mailing list