[hornetq-commits] JBoss hornetq SVN: r9997 - in trunk/src/main/org/hornetq: jms/client and 1 other directories.

do-not-reply at jboss.org do-not-reply at jboss.org
Mon Dec 6 04:24:44 EST 2010


Author: ataylor
Date: 2010-12-06 04:24:43 -0500 (Mon, 06 Dec 2010)
New Revision: 9997

Modified:
   trunk/src/main/org/hornetq/api/jms/management/ConnectionFactoryControl.java
   trunk/src/main/org/hornetq/jms/client/HornetQConnectionFactory.java
   trunk/src/main/org/hornetq/jms/client/HornetQQueueConnectionFactory.java
   trunk/src/main/org/hornetq/jms/client/HornetQTopicConnectionFactory.java
   trunk/src/main/org/hornetq/jms/client/HornetQXAConnectionFactory.java
   trunk/src/main/org/hornetq/jms/client/HornetQXAQueueConnectionFactory.java
   trunk/src/main/org/hornetq/jms/client/HornetQXATopicConnectionFactory.java
   trunk/src/main/org/hornetq/jms/management/impl/JMSConnectionFactoryControlImpl.java
Log:
added method to obtain the factory type

Modified: trunk/src/main/org/hornetq/api/jms/management/ConnectionFactoryControl.java
===================================================================
--- trunk/src/main/org/hornetq/api/jms/management/ConnectionFactoryControl.java	2010-12-06 09:14:41 UTC (rev 9996)
+++ trunk/src/main/org/hornetq/api/jms/management/ConnectionFactoryControl.java	2010-12-06 09:24:43 UTC (rev 9997)
@@ -49,6 +49,12 @@
    boolean isHA();
 
    /**
+   * return the type of factory
+    * @return 0 = jms cf, 1 = queue cf, 2 = topic cf, 3 = xa cf, 4 = xa queue cf, 5 = xa topic cf
+   */
+   int getFactoryType();
+
+   /**
     * Returns the Client ID of this connection factory (or {@code null} if it is not set.
     */
    String getClientID();

Modified: trunk/src/main/org/hornetq/jms/client/HornetQConnectionFactory.java
===================================================================
--- trunk/src/main/org/hornetq/jms/client/HornetQConnectionFactory.java	2010-12-06 09:14:41 UTC (rev 9996)
+++ trunk/src/main/org/hornetq/jms/client/HornetQConnectionFactory.java	2010-12-06 09:24:43 UTC (rev 9997)
@@ -34,6 +34,7 @@
 import org.hornetq.core.logging.Logger;
 import org.hornetq.jms.referenceable.ConnectionFactoryObjectFactory;
 import org.hornetq.jms.referenceable.SerializableObjectRefAddr;
+import org.hornetq.jms.server.impl.JMSFactoryType;
 
 /**
  * HornetQ implementation of a JMS ConnectionFactory.
@@ -541,7 +542,11 @@
    {
       return serverLocator;
    }
-   
+
+   public int getFactoryType()
+   {
+      return JMSFactoryType.CF.intValue();
+   }
    /**
     * 
     * @deprecated use {@link ServerLocator#createSessionFactory()}

Modified: trunk/src/main/org/hornetq/jms/client/HornetQQueueConnectionFactory.java
===================================================================
--- trunk/src/main/org/hornetq/jms/client/HornetQQueueConnectionFactory.java	2010-12-06 09:14:41 UTC (rev 9996)
+++ trunk/src/main/org/hornetq/jms/client/HornetQQueueConnectionFactory.java	2010-12-06 09:24:43 UTC (rev 9997)
@@ -18,6 +18,7 @@
 import org.hornetq.api.core.DiscoveryGroupConfiguration;
 import org.hornetq.api.core.TransportConfiguration;
 import org.hornetq.api.core.client.ServerLocator;
+import org.hornetq.jms.server.impl.JMSFactoryType;
 
 /**
  * A class that represents a QueueConnectionFactory.
@@ -64,4 +65,8 @@
       super(ha, initialConnectors);
    }
 
+   public int getFactoryType()
+   {
+      return JMSFactoryType.QUEUE_CF.intValue();
+   }
 }

Modified: trunk/src/main/org/hornetq/jms/client/HornetQTopicConnectionFactory.java
===================================================================
--- trunk/src/main/org/hornetq/jms/client/HornetQTopicConnectionFactory.java	2010-12-06 09:14:41 UTC (rev 9996)
+++ trunk/src/main/org/hornetq/jms/client/HornetQTopicConnectionFactory.java	2010-12-06 09:24:43 UTC (rev 9997)
@@ -18,6 +18,7 @@
 import org.hornetq.api.core.DiscoveryGroupConfiguration;
 import org.hornetq.api.core.TransportConfiguration;
 import org.hornetq.api.core.client.ServerLocator;
+import org.hornetq.jms.server.impl.JMSFactoryType;
 
 /**
  * A class that represents a TopicConnectionFactory.
@@ -65,4 +66,8 @@
       super(ha, initialConnectors);
    }
 
+   public int getFactoryType()
+   {
+      return JMSFactoryType.TOPIC_CF.intValue();
+   }
 }

Modified: trunk/src/main/org/hornetq/jms/client/HornetQXAConnectionFactory.java
===================================================================
--- trunk/src/main/org/hornetq/jms/client/HornetQXAConnectionFactory.java	2010-12-06 09:14:41 UTC (rev 9996)
+++ trunk/src/main/org/hornetq/jms/client/HornetQXAConnectionFactory.java	2010-12-06 09:24:43 UTC (rev 9997)
@@ -23,6 +23,7 @@
 import org.hornetq.api.core.DiscoveryGroupConfiguration;
 import org.hornetq.api.core.TransportConfiguration;
 import org.hornetq.api.core.client.ServerLocator;
+import org.hornetq.jms.server.impl.JMSFactoryType;
 
 /**
  * A class that represents a XAConnectionFactory.
@@ -70,4 +71,9 @@
       super(ha, initialConnectors);
    }
 
+   public int getFactoryType()
+   {
+      return JMSFactoryType.XA_CF.intValue();
+   }
+
 }

Modified: trunk/src/main/org/hornetq/jms/client/HornetQXAQueueConnectionFactory.java
===================================================================
--- trunk/src/main/org/hornetq/jms/client/HornetQXAQueueConnectionFactory.java	2010-12-06 09:14:41 UTC (rev 9996)
+++ trunk/src/main/org/hornetq/jms/client/HornetQXAQueueConnectionFactory.java	2010-12-06 09:24:43 UTC (rev 9997)
@@ -18,6 +18,7 @@
 import org.hornetq.api.core.DiscoveryGroupConfiguration;
 import org.hornetq.api.core.TransportConfiguration;
 import org.hornetq.api.core.client.ServerLocator;
+import org.hornetq.jms.server.impl.JMSFactoryType;
 
 /**
  * A class that represents a XAQueueConnectionFactory.
@@ -64,4 +65,9 @@
       super(ha, initialConnectors);
    }
 
+   public int getFactoryType()
+   {
+      return JMSFactoryType.QUEUE_XA_CF.intValue();
+   }
+
 }

Modified: trunk/src/main/org/hornetq/jms/client/HornetQXATopicConnectionFactory.java
===================================================================
--- trunk/src/main/org/hornetq/jms/client/HornetQXATopicConnectionFactory.java	2010-12-06 09:14:41 UTC (rev 9996)
+++ trunk/src/main/org/hornetq/jms/client/HornetQXATopicConnectionFactory.java	2010-12-06 09:24:43 UTC (rev 9997)
@@ -18,6 +18,7 @@
 import org.hornetq.api.core.DiscoveryGroupConfiguration;
 import org.hornetq.api.core.TransportConfiguration;
 import org.hornetq.api.core.client.ServerLocator;
+import org.hornetq.jms.server.impl.JMSFactoryType;
 
 /**
  * A class that represents a XATopicConnectionFactory.
@@ -64,4 +65,8 @@
       super(ha, initialConnectors);
    }
 
+   public int getFactoryType()
+   {
+      return JMSFactoryType.TOPIC_XA_CF.intValue();
+   }
 }

Modified: trunk/src/main/org/hornetq/jms/management/impl/JMSConnectionFactoryControlImpl.java
===================================================================
--- trunk/src/main/org/hornetq/jms/management/impl/JMSConnectionFactoryControlImpl.java	2010-12-06 09:14:41 UTC (rev 9996)
+++ trunk/src/main/org/hornetq/jms/management/impl/JMSConnectionFactoryControlImpl.java	2010-12-06 09:24:43 UTC (rev 9997)
@@ -71,6 +71,11 @@
       return cf.isHA();
    }
 
+   public int getFactoryType()
+   {
+      return cf.getFactoryType();
+   }
+
    public String getClientID()
    {
       return cf.getClientID();



More information about the hornetq-commits mailing list