[jboss-cvs] JBoss Messaging SVN: r3288 - in branches/Branch_MC_Integration_New: src/etc/server/default/deploy and 3 other directories.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Tue Nov 6 05:26:18 EST 2007


Author: ataylor
Date: 2007-11-06 05:26:18 -0500 (Tue, 06 Nov 2007)
New Revision: 3288

Modified:
   branches/Branch_MC_Integration_New/docs/examples/common/src/org/jboss/example/jms/common/Util.java
   branches/Branch_MC_Integration_New/src/etc/server/default/deploy/jbm-beans.xml
   branches/Branch_MC_Integration_New/src/etc/server/default/deploy/jbm-configuration.xml
   branches/Branch_MC_Integration_New/src/etc/server/default/deploy/jbm-destinations.xml
   branches/Branch_MC_Integration_New/src/main/org/jboss/jms/server/ServerPeer.java
   branches/Branch_MC_Integration_New/src/main/org/jboss/jms/server/destination/DestinationDeployer.java
   branches/Branch_MC_Integration_New/src/main/org/jboss/jms/server/destination/ManagedDestination.java
   branches/Branch_MC_Integration_New/tests/src/org/jboss/test/messaging/tools/aop/PoisonInterceptor.java
Log:
initial microcontainer integration, fixes

Modified: branches/Branch_MC_Integration_New/docs/examples/common/src/org/jboss/example/jms/common/Util.java
===================================================================
--- branches/Branch_MC_Integration_New/docs/examples/common/src/org/jboss/example/jms/common/Util.java	2007-11-05 17:26:49 UTC (rev 3287)
+++ branches/Branch_MC_Integration_New/docs/examples/common/src/org/jboss/example/jms/common/Util.java	2007-11-06 10:26:18 UTC (rev 3288)
@@ -70,11 +70,11 @@
    {
       MBeanServerConnection mBeanServer = lookupMBeanServerProxy(ic);
 
-      ObjectName serverObjectName = new ObjectName("jboss.messaging:service=Server");
+      ObjectName serverObjectName = new ObjectName("jboss.messaging:service=ServerPeer");
 
       String queueName = jndiName.substring(jndiName.lastIndexOf('/') + 1);
 
-      mBeanServer.invoke(serverObjectName, "createQueue",
+      mBeanServer.invoke(serverObjectName, "deployQueue",
                          new Object[] {queueName, jndiName},
                          new String[] {"java.lang.String", "java.lang.String"});
 

Modified: branches/Branch_MC_Integration_New/src/etc/server/default/deploy/jbm-beans.xml
===================================================================
--- branches/Branch_MC_Integration_New/src/etc/server/default/deploy/jbm-beans.xml	2007-11-05 17:26:49 UTC (rev 3287)
+++ branches/Branch_MC_Integration_New/src/etc/server/default/deploy/jbm-beans.xml	2007-11-06 10:26:18 UTC (rev 3288)
@@ -250,11 +250,6 @@
          </parameter>
       </constructor>
    </bean>
-   <bean name="DestinationDeployer" class="org.jboss.jms.server.destination.DestinationDeployer">
-      <property name="serverPeer">
-         <inject bean="ServerPeer"/>
-      </property>
-   </bean>
 
    <bean name="ClusterNotifier" class="org.jboss.messaging.core.impl.DefaultClusterNotifier"/>
    <bean name="topic" class="org.jboss.jms.server.destination.ManagedTopic"/>

Modified: branches/Branch_MC_Integration_New/src/etc/server/default/deploy/jbm-configuration.xml
===================================================================
--- branches/Branch_MC_Integration_New/src/etc/server/default/deploy/jbm-configuration.xml	2007-11-05 17:26:49 UTC (rev 3287)
+++ branches/Branch_MC_Integration_New/src/etc/server/default/deploy/jbm-configuration.xml	2007-11-06 10:26:18 UTC (rev 3288)
@@ -4,7 +4,7 @@
    <!-- The default JNDI context to use for queues when they are deployed without specifying one -->
    <default-queue-jndi-context>/queue</default-queue-jndi-context>
    <!-- The default JNDI context to use for topics when they are deployed without specifying one -->
-   <defaultTopicJndiContext>/topic</defaultTopicJndiContext>
+   <default-topic-jndi-context>/topic</default-topic-jndi-context>
    <!-- The JAAS security domain to use for JBoss Messaging -->
    <security-domain>java:/jaas/messaging</security-domain>
    <!-- The default security configuration to apply to destinations - this can be overridden on a per destination basis -->
@@ -49,25 +49,26 @@
    -->
    <strict-tck>false</strict-tck>
    <post-office-name>JMS post office</post-office-name>
-   <clustered>true</clustered>
 
+   <clustered>false</clustered>
+
    <!-- All the remaining properties only have to be specified if the post office is clustered.
 You can safely comment them out if your post office is non clustered -->
 
    <!-- The JGroups group name that the post office will use -->
 
-   <group-name>MessagingPostOffice</group-name>
+   <!--<group-name>MessagingPostOffice</group-name>-->
 
    <!-- Max time to wait for state to arrive when the post office joins the cluster -->
 
-   <state-timeout>5000</state-timeout>
+   <!--<state-timeout>5000</state-timeout>-->
 
    <!-- Max time to wait for a synchronous call to node members using the MessageDispatcher -->
 
-   <cast-timeout>50000</cast-timeout>
+  <!-- <cast-timeout>50000</cast-timeout>
 
    <control-channel-name>udp-sync</control-channel-name>
    <data-channel-name>udp</data-channel-name>
-   <channel-partition-name>${jboss.partition.name:DefaultPartition}-JMS</channel-partition-name>
+   <channel-partition-name>${jboss.partition.name:DefaultPartition}-JMS</channel-partition-name>-->
 
 </configuration>
\ No newline at end of file

Modified: branches/Branch_MC_Integration_New/src/etc/server/default/deploy/jbm-destinations.xml
===================================================================
--- branches/Branch_MC_Integration_New/src/etc/server/default/deploy/jbm-destinations.xml	2007-11-05 17:26:49 UTC (rev 3287)
+++ branches/Branch_MC_Integration_New/src/etc/server/default/deploy/jbm-destinations.xml	2007-11-06 10:26:18 UTC (rev 3288)
@@ -53,21 +53,21 @@
    <queue name="PrivateExpiryQueue"/>
    <queue name="QueueWithOwnDLQAndExpiryQueue">
       <dlq>PrivateDLQ</dlq>
-      <expiryqueue>PrivateExpiryQueue</expiryqueue>
+      <expiry-queue>PrivateExpiryQueue</expiry-queue>
    </queue>
 
    <topic name="TopicWithOwnDLQAndExpiryQueue">
       <dlq>PrivateDLQ</dlq>
-      <expiryqueue>PrivateExpiryQueue</expiryqueue>
+      <expiry-queue>PrivateExpiryQueue</expiry-queue>
    </topic>
 
    <!-- Queues and Topics can also specify their own redelivery delay -->
    <queue name="QueueWithOwnRedeliveryDelay">
-      <redeliverydelay>5000</redeliverydelay>
+      <redelivery-delay>5000</redelivery-delay>
    </queue>
 
    <topic name="TopicWithOwnRedeliveryDelay">
-      <redeliverydelay>5000</redeliverydelay>
+      <redelivery-delay>5000</redelivery-delay>
    </topic>
 
    <!--

Modified: branches/Branch_MC_Integration_New/src/main/org/jboss/jms/server/ServerPeer.java
===================================================================
--- branches/Branch_MC_Integration_New/src/main/org/jboss/jms/server/ServerPeer.java	2007-11-05 17:26:49 UTC (rev 3287)
+++ branches/Branch_MC_Integration_New/src/main/org/jboss/jms/server/ServerPeer.java	2007-11-06 10:26:18 UTC (rev 3288)
@@ -75,7 +75,7 @@
  *          <p/>
  *          $Id$
  */
- at JMX(name = "jboss.messaging:service=Server", exposedInterface = JmsServer.class)
+ at JMX(name = "jboss.messaging:service=ServerPeer", exposedInterface = JmsServer.class)
 public class ServerPeer implements JmsServer
 {
    // Constants ------------------------------------------------------------------------------------
@@ -185,6 +185,7 @@
          connectorManager = new SimpleConnectorManager();
          memoryManager = new SimpleMemoryManager();
          messageStore = new SimpleMessageStore();
+         destinationDeployer = new DestinationDeployer(this);
          txRepository =
                  new TransactionRepository(persistenceManager, messageStore, transactionIDManager);
          messageCounterManager = new MessageCounterManager(Configuration.getMessageCounterSamplePeriod());
@@ -230,6 +231,7 @@
          securityStore.start();
          txRepository.start();
          clusterConnectionManager.start();
+         destinationDeployer.start();
 
          // Note we do not start the message counter manager by default. This must be done
          // explicitly by the user by calling enableMessageCounters(). This is because message
@@ -396,14 +398,13 @@
 
    public String deployQueue(String name, String jndiName) throws Exception
    {
-      return destinationDeployer.deployQueue(name, jndiName, -1, -1, -1);
+      return destinationDeployer.deployQueue(name, jndiName);
    }
 
    public String deployQueue(String name, String jndiName, int fullSize, int pageSize, int downCacheSize) throws Exception
    {
       return destinationDeployer.deployQueue(name, jndiName, fullSize, pageSize, downCacheSize);
    }
-
    public boolean destroyQueue(String name) throws Exception
    {
       try
@@ -423,7 +424,7 @@
 
    public String deployTopic(String name, String jndiName) throws Exception
    {
-      return destinationDeployer.deployTopic(name, jndiName, -1, -1, -1);
+      return destinationDeployer.deployTopic(name, jndiName);
    }
 
    public String deployTopic(String name, String jndiName, int fullSize, int pageSize, int downCacheSize) throws Exception
@@ -987,15 +988,4 @@
       return ((ManagedQueue) getDestinationManager().getDestination(queueName, true)).listAllMessages(null);
    }
 
-
-   public DestinationDeployer getDestinationDeployer()
-   {
-      return destinationDeployer;
-   }
-
-   public void setDestinationDeployer(DestinationDeployer destinationDeployer)
-   {
-      this.destinationDeployer = destinationDeployer;
-   }
-
 }

Modified: branches/Branch_MC_Integration_New/src/main/org/jboss/jms/server/destination/DestinationDeployer.java
===================================================================
--- branches/Branch_MC_Integration_New/src/main/org/jboss/jms/server/destination/DestinationDeployer.java	2007-11-05 17:26:49 UTC (rev 3287)
+++ branches/Branch_MC_Integration_New/src/main/org/jboss/jms/server/destination/DestinationDeployer.java	2007-11-06 10:26:18 UTC (rev 3288)
@@ -41,7 +41,9 @@
 import java.util.HashSet;
 import java.util.Iterator;
 
-/**
+/** Destination Deployer. This class will administrate the deployment, undeployment and registration of Queue's and Topics.
+ * Some of these methods will be exposed via the ServerPeer
+ *
  * @author <a href="ataylor at redhat.com">Andy Taylor</a>
  */
 public class DestinationDeployer
@@ -51,15 +53,41 @@
    private static final String QUEUE_MESSAGECOUNTER_PREFIX = "Queue.";
 
    private ServerPeer serverPeer;
+   private static final String JBM_DESTINATIONS_XML = "jbm-destinations.xml";
+   private static final String QUEUE_ELEMENT = "queue";
+   private static final String NAME_ATTR = "name";
+   private static final String DLQ_ELEMENT = "dlq";
+   private static final String EXPIRY_QUEUE_ELEMENT = "expiry-queue";
+   private static final String REDELIVERY_DELAY_ELEMENT = "redelivery-delay";
+   private static final String CLUSTERED_ELEMENT = "clustered";
+   private static final String SECURITY_ELEMENT = "security";
+   private static final String TOPIC_ELEMENT = "topic";
+   private static final String READ_ATTR = "read";
+   private static final String WRITE_ATTR = "write";
+   private static final String CREATE_ATTR = "create";
 
+
+   public DestinationDeployer(ServerPeer serverPeer)
+   {
+      this.serverPeer = serverPeer;
+   }
+
+   /**
+    * lifecycle method. This will deploy all Queues and Topics that are configured in the jbm-destinations.xml file that
+    * is deployed in the root of the sar
+    *
+    * @throws Exception
+    */
    public void start() throws Exception
    {
-      URL url = getClass().getClassLoader().getResource("jbm-destinations.xml");
+      //find the config file
+      URL url = getClass().getClassLoader().getResource(JBM_DESTINATIONS_XML);
       Element e = XMLUtil.urlToElement(url);
-      NodeList children = e.getElementsByTagName("queue");
+      //lets get all the queues and create them
+      NodeList children = e.getElementsByTagName(QUEUE_ELEMENT);
       for (int i = 0; i < children.getLength(); i++)
       {
-         String name = children.item(i).getAttributes().getNamedItem("name").getNodeValue();
+         String name = children.item(i).getAttributes().getNamedItem(NAME_ATTR).getNodeValue();
          String dlq = null;
          String expq = null;
          long delay = -1;
@@ -68,33 +96,34 @@
          NodeList attributes = children.item(i).getChildNodes();
          for (int j = 0; j < attributes.getLength(); j++)
          {
-            if ("dlq".equalsIgnoreCase(attributes.item(j).getNodeName()))
+            if (DLQ_ELEMENT.equalsIgnoreCase(attributes.item(j).getNodeName()))
             {
                dlq = attributes.item(j).getTextContent();
             }
-            else if ("expiryqueue".equalsIgnoreCase(attributes.item(j).getNodeName()))
+            else if (EXPIRY_QUEUE_ELEMENT.equalsIgnoreCase(attributes.item(j).getNodeName()))
             {
                expq = attributes.item(j).getTextContent();
             }
-            else if ("redeliverydelay".equalsIgnoreCase(attributes.item(j).getNodeName()))
+            else if (REDELIVERY_DELAY_ELEMENT.equalsIgnoreCase(attributes.item(j).getNodeName()))
             {
                delay = Long.valueOf(attributes.item(j).getTextContent());
             }
-            else if ("clustered".equalsIgnoreCase(attributes.item(j).getNodeName()))
+            else if (CLUSTERED_ELEMENT.equalsIgnoreCase(attributes.item(j).getNodeName()))
             {
                clustered = Boolean.valueOf(attributes.item(j).getTextContent());
             }
-            else if ("security".equalsIgnoreCase(attributes.item(j).getNodeName()))
+            else if (SECURITY_ELEMENT.equalsIgnoreCase(attributes.item(j).getNodeName()))
             {
                securityConfig = getSecurity(attributes, j);
             }
          }
          createQueue(name, clustered, delay, dlq, expq, securityConfig);
       }
-      children = e.getElementsByTagName("topic");
+      //now lets create all the topics
+      children = e.getElementsByTagName(TOPIC_ELEMENT);
       for (int i = 0; i < children.getLength(); i++)
       {
-         String name = children.item(i).getAttributes().getNamedItem("name").getNodeValue();
+         String name = children.item(i).getAttributes().getNamedItem(NAME_ATTR).getNodeValue();
          String dlq = null;
          String expq = null;
          long delay = -1;
@@ -103,23 +132,23 @@
          HashSet<Role> securityConfig = null;
          for (int j = 0; j < attributes.getLength(); j++)
          {
-            if ("dlq".equalsIgnoreCase(attributes.item(j).getNodeName()))
+            if (DLQ_ELEMENT.equalsIgnoreCase(attributes.item(j).getNodeName()))
             {
                dlq = attributes.item(j).getTextContent();
             }
-            else if ("expiryqueue".equalsIgnoreCase(attributes.item(j).getNodeName()))
+            else if (EXPIRY_QUEUE_ELEMENT.equalsIgnoreCase(attributes.item(j).getNodeName()))
             {
                expq = attributes.item(j).getTextContent();
             }
-            else if ("redeliverydelay".equalsIgnoreCase(attributes.item(j).getNodeName()))
+            else if (REDELIVERY_DELAY_ELEMENT.equalsIgnoreCase(attributes.item(j).getNodeName()))
             {
                delay = Long.valueOf(attributes.item(j).getTextContent());
             }
-            else if ("clustered".equalsIgnoreCase(attributes.item(j).getNodeName()))
+            else if (CLUSTERED_ELEMENT.equalsIgnoreCase(attributes.item(j).getNodeName()))
             {
                clustered = Boolean.valueOf(attributes.item(j).getTextContent());
             }
-            else if ("security".equalsIgnoreCase(attributes.item(j).getNodeName()))
+            else if (SECURITY_ELEMENT.equalsIgnoreCase(attributes.item(j).getNodeName()))
             {
                securityConfig = getSecurity(attributes, j);
             }
@@ -128,6 +157,12 @@
       }
    }
 
+   /**
+    * creates the default security from the security element
+    * @param attributes
+    * @param j
+    * @return
+    */
    private HashSet<Role> getSecurity(NodeList attributes, int j)
    {
       HashSet<Role> securityConfig;
@@ -137,10 +172,10 @@
       {
          if ("roles".equalsIgnoreCase(roles.item(k).getNodeName()))
          {
-            Boolean read = roles.item(k).getAttributes().getNamedItem("read") != null && Boolean.valueOf(roles.item(k).getAttributes().getNamedItem("read").getNodeValue());
-            Boolean write = roles.item(k).getAttributes().getNamedItem("write") != null && Boolean.valueOf(roles.item(k).getAttributes().getNamedItem("write").getNodeValue());
-            Boolean create = roles.item(k).getAttributes().getNamedItem("create") != null && Boolean.valueOf(roles.item(k).getAttributes().getNamedItem("create").getNodeValue());
-            Role role = new Role(roles.item(k).getAttributes().getNamedItem("name").getNodeValue(),
+            Boolean read = roles.item(k).getAttributes().getNamedItem(READ_ATTR) != null && Boolean.valueOf(roles.item(k).getAttributes().getNamedItem(READ_ATTR).getNodeValue());
+            Boolean write = roles.item(k).getAttributes().getNamedItem(WRITE_ATTR) != null && Boolean.valueOf(roles.item(k).getAttributes().getNamedItem(WRITE_ATTR).getNodeValue());
+            Boolean create = roles.item(k).getAttributes().getNamedItem(CREATE_ATTR) != null && Boolean.valueOf(roles.item(k).getAttributes().getNamedItem(CREATE_ATTR).getNodeValue());
+            Role role = new Role(roles.item(k).getAttributes().getNamedItem(NAME_ATTR).getNodeValue(),
                     read,
                     write,
                     create);
@@ -150,6 +185,16 @@
       return securityConfig;
    }
 
+   /**
+    * creates a queue and deploys it.
+    * @param name
+    * @param clustered
+    * @param delay
+    * @param dlq
+    * @param expq
+    * @param securityConfig
+    * @throws Exception
+    */
    private void createQueue(String name, boolean clustered, long delay, String dlq, String expq, HashSet<Role> securityConfig) throws Exception
    {
       JMSCondition queueCond = new JMSCondition(true, name);
@@ -160,6 +205,7 @@
       destination.setDLQ(dlq);
       destination.setExpiryQueue(expq);
       destination.setSecurityConfig(securityConfig);
+      destination.setCreatedProgrammatically(true);
       MessagingQueue queue = new MessagingQueue(Configuration.getServerPeerID(), destination.getName(),
               serverPeer.getChannelIDManager().getID(),
               serverPeer.getMessageStore(), serverPeer.getPersistenceManagerInstance(),
@@ -182,6 +228,16 @@
       getServerPeer().getDestinationManager().registerDestination(destination);
    }
 
+   /**
+    * creates a topic and deploys it
+    * @param name
+    * @param clustered
+    * @param delay
+    * @param dlq
+    * @param expq
+    * @param securityConfig
+    * @throws Exception
+    */
    private void createTopic(String name, boolean clustered, long delay, String dlq, String expq, HashSet<Role> securityConfig) throws Exception
    {
       ManagedTopic destination = new ManagedTopic();
@@ -191,6 +247,7 @@
       destination.setDLQ(dlq);
       destination.setExpiryQueue(expq);
       destination.setSecurityConfig(securityConfig);
+      destination.setCreatedProgrammatically(true);
       PostOffice po = serverPeer.getPostOffice();
 
       // We deploy any queues corresponding to pre-existing durable subscriptions
@@ -237,19 +294,44 @@
 
    }
 
+   /**
+    * deploys a new queue
+    * @param name
+    * @param jndiName
+    * @return
+    * @throws Exception
+    */
    public String deployQueue(String name, String jndiName) throws Exception
    {
-      return deployQueue(name, jndiName, -1, -1, -1);
+      return deployQueue(name, jndiName, false, -1, -1, -1);
    }
 
    public String deployQueue(String name, String jndiName, int fullSize, int pageSize, int downCacheSize) throws Exception
    {
+      return deployQueue(name, jndiName, true, fullSize, pageSize, downCacheSize);
+   }
+
+   /**
+    * deploys a new queue
+    * @param name
+    * @param jndiName
+    * @param fullSize
+    * @param pageSize
+    * @param downCacheSize
+    * @return
+    * @throws Exception
+    */
+   public String deployQueue(String name, String jndiName, boolean params, int fullSize, int pageSize, int downCacheSize) throws Exception
+   {
       JMSCondition queueCond = new JMSCondition(true, name);
       ManagedQueue destination = new ManagedQueue();
       destination.setName(name);
-      destination.setDownCacheSize(downCacheSize);
-      destination.setPageSize(pageSize);
-      destination.setFullSize(fullSize);
+      if (params)
+      {
+         destination.setDownCacheSize(downCacheSize);
+         destination.setPageSize(pageSize);
+         destination.setFullSize(fullSize);
+      }
       destination.setJndiName(jndiName);
       MessagingQueue queue = new MessagingQueue(Configuration.getServerPeerID(), destination.getName(),
               serverPeer.getChannelIDManager().getID(),
@@ -274,11 +356,28 @@
       return destination.getJndiName();
    }
 
+   /**
+    * deploys a new topic
+    * @param name
+    * @param jndiName
+    * @return
+    * @throws Exception
+    */
    public String deployTopic(String name, String jndiName) throws Exception
    {
       return deployTopic(name, jndiName, -1, -1, -1);
    }
 
+   /**
+    * returns a new topic
+    * @param name
+    * @param jndiName
+    * @param fullSize
+    * @param pageSize
+    * @param downCacheSize
+    * @return
+    * @throws Exception
+    */
    public String deployTopic(String name, String jndiName, int fullSize, int pageSize, int downCacheSize) throws Exception
    {
       ManagedTopic destination = new ManagedTopic();
@@ -328,10 +427,20 @@
       return destination.getJndiName();
    }
 
+   /**
+    * undeploys a queue
+    * @param name
+    * @return
+    * @throws Exception
+    */
    public boolean undeployQueue(String name) throws Exception
    {
       ManagedDestination destination = serverPeer.getDestinationManager().getDestination(name, true);
-
+      if(destination.isCreatedProgrammatically())
+      {
+         log.warn("Cannot undeploy a destination that has not been created programatically");
+         return false;
+      }
       serverPeer.getDestinationManager().unregisterDestination(destination);
 
       Queue queue = ((ManagedQueue) destination).getQueue();
@@ -354,10 +463,20 @@
       return true;
    }
 
+   /**
+    * undeploys a topic
+    * @param name
+    * @return
+    * @throws Exception
+    */
    public boolean undeployTopic(String name) throws Exception
    {
       ManagedDestination destination = serverPeer.getDestinationManager().getDestination(name, false);
-
+      if(destination.isCreatedProgrammatically())
+      {
+         log.warn("Cannot undeploy a destination that has not been created programatically");
+         return false;
+      }
       serverPeer.getDestinationManager().unregisterDestination(destination);
 
       //When undeploying a topic, any non durable subscriptions will be removed
@@ -405,11 +524,23 @@
       return true;
    }
 
+   /**
+    * destroys a queue
+    * @param name
+    * @return
+    * @throws Throwable
+    */
    public boolean destroyQueue(String name) throws Throwable
    {
       return destroyDestination(true, name);
    }
 
+   /**
+    * destroys a topic
+    * @param name
+    * @return
+    * @throws Throwable
+    */
    public boolean destroyTopic(String name) throws Throwable
    {
       return destroyDestination(true, name);
@@ -457,7 +588,6 @@
 
    }
 
-
    public ServerPeer getServerPeer()
    {
       return serverPeer;

Modified: branches/Branch_MC_Integration_New/src/main/org/jboss/jms/server/destination/ManagedDestination.java
===================================================================
--- branches/Branch_MC_Integration_New/src/main/org/jboss/jms/server/destination/ManagedDestination.java	2007-11-05 17:26:49 UTC (rev 3287)
+++ branches/Branch_MC_Integration_New/src/main/org/jboss/jms/server/destination/ManagedDestination.java	2007-11-06 10:26:18 UTC (rev 3288)
@@ -88,6 +88,9 @@
    protected int maxDeliveryAttempts = -1;
    public static final String SUBSCRIPTION_MESSAGECOUNTER_PREFIX = "Subscription.";
 
+
+   private boolean createdProgrammatically;
+
    public ManagedDestination()
    {
    }
@@ -304,6 +307,17 @@
       this.maxDeliveryAttempts = maxDeliveryAttempts;
    }
 
+
+   public boolean isCreatedProgrammatically()
+   {
+      return createdProgrammatically;
+   }
+
+   public void setCreatedProgrammatically(boolean createdProgrammatically)
+   {
+      this.createdProgrammatically = createdProgrammatically;
+   }
+
    public abstract boolean isQueue();
 
    public void start() throws Exception
@@ -315,4 +329,5 @@
    {
       //NOOP
    }
+
 }

Modified: branches/Branch_MC_Integration_New/tests/src/org/jboss/test/messaging/tools/aop/PoisonInterceptor.java
===================================================================
--- branches/Branch_MC_Integration_New/tests/src/org/jboss/test/messaging/tools/aop/PoisonInterceptor.java	2007-11-05 17:26:49 UTC (rev 3287)
+++ branches/Branch_MC_Integration_New/tests/src/org/jboss/test/messaging/tools/aop/PoisonInterceptor.java	2007-11-06 10:26:18 UTC (rev 3288)
@@ -9,6 +9,7 @@
 import org.jboss.aop.advice.Interceptor;
 import org.jboss.aop.joinpoint.Invocation;
 import org.jboss.aop.joinpoint.MethodInvocation;
+import org.jboss.jms.server.Configuration;
 import org.jboss.jms.server.ServerPeer;
 import org.jboss.jms.server.endpoint.ServerConnectionEndpoint;
 import org.jboss.jms.server.endpoint.ServerConnectionFactoryEndpoint;
@@ -251,7 +252,7 @@
    {
       try
       {
-         int serverId = getServerPeer(target).getConfiguration().getServerPeerID();
+         int serverId = Configuration.getServerPeerID();
 
          //First unregister from the RMI registry
          Registry registry = LocateRegistry.getRegistry(RMITestServer.DEFAULT_REGISTRY_PORT);




More information about the jboss-cvs-commits mailing list