[jboss-cvs] JBoss Messaging SVN: r5810 - in trunk/src: main/org/jboss/messaging/ra and 1 other directory.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Wed Feb 4 15:56:11 EST 2009


Author: jesper.pedersen
Date: 2009-02-04 15:56:10 -0500 (Wed, 04 Feb 2009)
New Revision: 5810

Added:
   trunk/src/main/org/jboss/messaging/ra/JBMRAProperties.java
Modified:
   trunk/src/config/ra.xml
   trunk/src/main/org/jboss/messaging/ra/JBMConnectionRequestInfo.java
   trunk/src/main/org/jboss/messaging/ra/JBMMCFProperties.java
   trunk/src/main/org/jboss/messaging/ra/JBMManagedConnectionFactory.java
   trunk/src/main/org/jboss/messaging/ra/JBMResourceAdapter.java
Log:
[JBMESSAGING-1367] Create JCA resource adapter for JBM 2.0

Modified: trunk/src/config/ra.xml
===================================================================
--- trunk/src/config/ra.xml	2009-02-04 18:16:58 UTC (rev 5809)
+++ trunk/src/config/ra.xml	2009-02-04 20:56:10 UTC (rev 5810)
@@ -43,187 +43,188 @@
    <resourceadapter>
       <resourceadapter-class>org.jboss.messaging.ra.JBMResourceAdapter</resourceadapter-class>
 
+      <config-property>
+        <description>The discovery group name</description>
+        <config-property-name>DiscoveryGroupName</config-property-name>
+        <config-property-type>java.lang.String</config-property-type>
+        <config-property-value>default</config-property-value>
+      </config-property>
+      <config-property>
+        <description>The discovery group port</description>
+        <config-property-name>DiscoveryGroupPort</config-property-name>
+        <config-property-type>java.lang.Integer</config-property-type>
+        <config-property-value>0</config-property-value>
+      </config-property>
+<!--
+      <config-property>
+        <description>The discovery refresh timeout</description>
+        <config-property-name>DiscoveryRefreshTimeout</config-property-name>
+        <config-property-type>java.lang.Long</config-property-type>
+        <config-property-value></config-property-value>
+      </config-property>
+      <config-property>
+        <description>The discovery initial wait timeout</description>
+        <config-property-name>DiscoveryInitialWaitTimeout</config-property-name>
+        <config-property-type>java.lang.Long</config-property-type>
+        <config-property-value></config-property-value>
+      </config-property>
+      <config-property>
+        <description>The load balancing policy class name</description>
+        <config-property-name>LoadBalancingPolicyClassName</config-property-name>
+        <config-property-type>java.lang.String</config-property-type>
+        <config-property-value></config-property-value>
+      </config-property>
+      <config-property>
+        <description>The ping period</description>
+        <config-property-name>PingPeriod</config-property-name>
+        <config-property-type>java.lang.Long</config-property-type>
+        <config-property-value></config-property-value>
+      </config-property>
+      <config-property>
+        <description>The connection TTL</description>
+        <config-property-name>ConnectionTTL</config-property-name>
+        <config-property-type>java.lang.Long</config-property-type>
+        <config-property-value></config-property-value>
+      </config-property>
+      <config-property>
+        <description>The call timeout</description>
+        <config-property-name>CallTimeout</config-property-name>
+        <config-property-type>java.lang.Long</config-property-type>
+        <config-property-value></config-property-value>
+      </config-property>
+      <config-property>
+        <description>The dups ok batch size</description>
+        <config-property-name>DupsOKBatchSize</config-property-name>
+        <config-property-type>java.lang.Integer</config-property-type>
+        <config-property-value></config-property-value>
+      </config-property>
+      <config-property>
+        <description>The transaction batch size</description>
+        <config-property-name>TransactionBatchSize</config-property-name>
+        <config-property-type>java.lang.Integer</config-property-type>
+        <config-property-value></config-property-value>
+      </config-property>
+      <config-property>
+        <description>The consumer window size</description>
+        <config-property-name>ConsumerWindowSize</config-property-name>
+        <config-property-type>java.lang.Integer</config-property-type>
+        <config-property-value></config-property-value>
+      </config-property>
+      <config-property>
+        <description>The consumer max rate</description>
+        <config-property-name>ConsumerMaxRate</config-property-name>
+        <config-property-type>java.lang.Integer</config-property-type>
+        <config-property-value></config-property-value>
+      </config-property>
+      <config-property>
+        <description>The send window size</description>
+        <config-property-name>SendWindowSize</config-property-name>
+        <config-property-type>java.lang.Integer</config-property-type>
+        <config-property-value></config-property-value>
+      </config-property>
+      <config-property>
+        <description>The producer max rate</description>
+        <config-property-name>ProducerMaxRate</config-property-name>
+        <config-property-type>java.lang.Integer</config-property-type>
+        <config-property-value></config-property-value>
+      </config-property>
+      <config-property>
+        <description>The min large message size</description>
+        <config-property-name>MinLargeMessageSize</config-property-name>
+        <config-property-type>java.lang.Integer</config-property-type>
+        <config-property-value></config-property-value>
+      </config-property>
+      <config-property>
+        <description>The block on acknowledge</description>
+        <config-property-name>BlockOnAcknowledge</config-property-name>
+        <config-property-type>java.lang.Boolean</config-property-type>
+        <config-property-value></config-property-value>
+      </config-property>
+      <config-property>
+        <description>The block on non persistent send</description>
+        <config-property-name>BlockOnNonPersistentSend</config-property-name>
+        <config-property-type>java.lang.Boolean</config-property-type>
+        <config-property-value></config-property-value>
+      </config-property>
+      <config-property>
+        <description>The block on persistent send</description>
+        <config-property-name>BlockOnPersistentSend</config-property-name>
+        <config-property-type>java.lang.Boolean</config-property-type>
+        <config-property-value></config-property-value>
+      </config-property>
+      <config-property>
+        <description>The auto group</description>
+        <config-property-name>AutoGroup</config-property-name>
+        <config-property-type>java.lang.Boolean</config-property-type>
+        <config-property-value></config-property-value>
+      </config-property>
+      <config-property>
+        <description>The max connections</description>
+        <config-property-name>MaxConnections</config-property-name>
+        <config-property-type>java.lang.Integer</config-property-type>
+        <config-property-value></config-property-value>
+      </config-property>
+      <config-property>
+        <description>The pre acknowledge</description>
+        <config-property-name>PreAcknowledge</config-property-name>
+        <config-property-type>java.lang.Boolean</config-property-type>
+        <config-property-value></config-property-value>
+      </config-property>
+      <config-property>
+        <description>The retry interval</description>
+        <config-property-name>RetryInterval</config-property-name>
+        <config-property-type>java.lang.Long</config-property-type>
+        <config-property-value></config-property-value>
+      </config-property>
+      <config-property>
+        <description>The retry interval multiplier</description>
+        <config-property-name>RetryIntervalMultiplier</config-property-name>
+        <config-property-type>java.lang.Double</config-property-type>
+        <config-property-value></config-property-value>
+      </config-property>
+      <config-property>
+        <description>The max retries before failover</description>
+        <config-property-name>MaxRetriesBeforeFailover</config-property-name>
+        <config-property-type>java.lang.Integer</config-property-type>
+        <config-property-value></config-property-value>
+      </config-property>
+      <config-property>
+        <description>The max retries after failover</description>
+        <config-property-name>MaxRetriesAfterFailover</config-property-name>
+        <config-property-type>java.lang.Integer</config-property-type>
+        <config-property-value></config-property-value>
+      </config-property>
+-->
+      <config-property>
+        <description>Use XA methods to obtain connections</description>
+        <config-property-name>UseXA</config-property-name>
+        <config-property-type>java.lang.Boolean</config-property-type>
+        <config-property-value>true</config-property-value>
+      </config-property>
+      <config-property>
+        <description>The user name used to login to the JMS server</description>
+        <config-property-name>UserName</config-property-name>
+        <config-property-type>java.lang.String</config-property-type>
+        <config-property-value></config-property-value>
+      </config-property>
+      <config-property>
+        <description>The password used to login to the JMS server</description>
+        <config-property-name>Password</config-property-name>
+        <config-property-type>java.lang.String</config-property-type>
+        <config-property-value></config-property-value>
+      </config-property>
+      <config-property>
+        <description>The client id</description>
+        <config-property-name>ClientID</config-property-name>
+        <config-property-type>java.lang.String</config-property-type>
+        <config-property-value></config-property-value>
+      </config-property>
+
       <outbound-resourceadapter>
          <connection-definition>
             <managedconnectionfactory-class>org.jboss.messaging.ra.JBMManagedConnectionFactory</managedconnectionfactory-class>
 
             <config-property>
-               <description>The discovery group name</description>
-               <config-property-name>DiscoveryGroupName</config-property-name>
-               <config-property-type>java.lang.String</config-property-type>
-               <config-property-value>default</config-property-value>
-            </config-property>
-            <config-property>
-               <description>The discovery group port</description>
-               <config-property-name>DiscoveryGroupPort</config-property-name>
-               <config-property-type>java.lang.Integer</config-property-type>
-               <config-property-value>0</config-property-value>
-            </config-property>
-<!--
-            <config-property>
-               <description>The discovery refresh timeout</description>
-               <config-property-name>DiscoveryRefreshTimeout</config-property-name>
-               <config-property-type>java.lang.Long</config-property-type>
-               <config-property-value></config-property-value>
-            </config-property>
-            <config-property>
-               <description>The discovery initial wait timeout</description>
-               <config-property-name>DiscoveryInitialWaitTimeout</config-property-name>
-               <config-property-type>java.lang.Long</config-property-type>
-               <config-property-value></config-property-value>
-            </config-property>
-            <config-property>
-               <description>The load balancing policy class name</description>
-               <config-property-name>LoadBalancingPolicyClassName</config-property-name>
-               <config-property-type>java.lang.String</config-property-type>
-               <config-property-value></config-property-value>
-            </config-property>
-            <config-property>
-               <description>The ping period</description>
-               <config-property-name>PingPeriod</config-property-name>
-               <config-property-type>java.lang.Long</config-property-type>
-               <config-property-value></config-property-value>
-            </config-property>
-            <config-property>
-               <description>The connection TTL</description>
-               <config-property-name>ConnectionTTL</config-property-name>
-               <config-property-type>java.lang.Long</config-property-type>
-               <config-property-value></config-property-value>
-            </config-property>
-            <config-property>
-               <description>The call timeout</description>
-               <config-property-name>CallTimeout</config-property-name>
-               <config-property-type>java.lang.Long</config-property-type>
-               <config-property-value></config-property-value>
-            </config-property>
-            <config-property>
-               <description>The dups ok batch size</description>
-               <config-property-name>DupsOKBatchSize</config-property-name>
-               <config-property-type>java.lang.Integer</config-property-type>
-               <config-property-value></config-property-value>
-            </config-property>
-            <config-property>
-               <description>The transaction batch size</description>
-               <config-property-name>TransactionBatchSize</config-property-name>
-               <config-property-type>java.lang.Integer</config-property-type>
-               <config-property-value></config-property-value>
-            </config-property>
-            <config-property>
-               <description>The consumer window size</description>
-               <config-property-name>ConsumerWindowSize</config-property-name>
-               <config-property-type>java.lang.Integer</config-property-type>
-               <config-property-value></config-property-value>
-            </config-property>
-            <config-property>
-               <description>The consumer max rate</description>
-               <config-property-name>ConsumerMaxRate</config-property-name>
-               <config-property-type>java.lang.Integer</config-property-type>
-               <config-property-value></config-property-value>
-            </config-property>
-            <config-property>
-               <description>The send window size</description>
-               <config-property-name>SendWindowSize</config-property-name>
-               <config-property-type>java.lang.Integer</config-property-type>
-               <config-property-value></config-property-value>
-            </config-property>
-            <config-property>
-               <description>The producer max rate</description>
-               <config-property-name>ProducerMaxRate</config-property-name>
-               <config-property-type>java.lang.Integer</config-property-type>
-               <config-property-value></config-property-value>
-            </config-property>
-            <config-property>
-               <description>The min large message size</description>
-               <config-property-name>MinLargeMessageSize</config-property-name>
-               <config-property-type>java.lang.Integer</config-property-type>
-               <config-property-value></config-property-value>
-            </config-property>
-            <config-property>
-               <description>The block on acknowledge</description>
-               <config-property-name>BlockOnAcknowledge</config-property-name>
-               <config-property-type>java.lang.Boolean</config-property-type>
-               <config-property-value></config-property-value>
-            </config-property>
-            <config-property>
-               <description>The block on non persistent send</description>
-               <config-property-name>BlockOnNonPersistentSend</config-property-name>
-               <config-property-type>java.lang.Boolean</config-property-type>
-               <config-property-value></config-property-value>
-            </config-property>
-            <config-property>
-               <description>The block on persistent send</description>
-               <config-property-name>BlockOnPersistentSend</config-property-name>
-               <config-property-type>java.lang.Boolean</config-property-type>
-               <config-property-value></config-property-value>
-            </config-property>
-            <config-property>
-               <description>The auto group</description>
-               <config-property-name>AutoGroup</config-property-name>
-               <config-property-type>java.lang.Boolean</config-property-type>
-               <config-property-value></config-property-value>
-            </config-property>
-            <config-property>
-               <description>The max connections</description>
-               <config-property-name>MaxConnections</config-property-name>
-               <config-property-type>java.lang.Integer</config-property-type>
-               <config-property-value></config-property-value>
-            </config-property>
-            <config-property>
-               <description>The pre acknowledge</description>
-               <config-property-name>PreAcknowledge</config-property-name>
-               <config-property-type>java.lang.Boolean</config-property-type>
-               <config-property-value></config-property-value>
-            </config-property>
-            <config-property>
-               <description>The retry interval</description>
-               <config-property-name>RetryInterval</config-property-name>
-               <config-property-type>java.lang.Long</config-property-type>
-               <config-property-value></config-property-value>
-            </config-property>
-            <config-property>
-               <description>The retry interval multiplier</description>
-               <config-property-name>RetryIntervalMultiplier</config-property-name>
-               <config-property-type>java.lang.Double</config-property-type>
-               <config-property-value></config-property-value>
-            </config-property>
-            <config-property>
-               <description>The max retries before failover</description>
-               <config-property-name>MaxRetriesBeforeFailover</config-property-name>
-               <config-property-type>java.lang.Integer</config-property-type>
-               <config-property-value></config-property-value>
-            </config-property>
-            <config-property>
-               <description>The max retries after failover</description>
-               <config-property-name>MaxRetriesAfterFailover</config-property-name>
-               <config-property-type>java.lang.Integer</config-property-type>
-               <config-property-value></config-property-value>
-            </config-property>
--->
-            <config-property>
-               <description>Use XA methods to obtain connections</description>
-               <config-property-name>UseXA</config-property-name>
-               <config-property-type>java.lang.Boolean</config-property-type>
-               <config-property-value>true</config-property-value>
-            </config-property>
-            <config-property>
-               <description>The user name used to login to the JMS server</description>
-               <config-property-name>UserName</config-property-name>
-               <config-property-type>java.lang.String</config-property-type>
-               <config-property-value></config-property-value>
-            </config-property>
-            <config-property>
-               <description>The password used to login to the JMS server</description>
-               <config-property-name>Password</config-property-name>
-               <config-property-type>java.lang.String</config-property-type>
-               <config-property-value></config-property-value>
-            </config-property>
-            <config-property>
-               <description>The client id</description>
-               <config-property-name>ClientID</config-property-name>
-               <config-property-type>java.lang.String</config-property-type>
-               <config-property-value></config-property-value>
-            </config-property>
-            <config-property>
                <description>The default session type</description>
                <config-property-name>SessionDefaultType</config-property-name>
                <config-property-type>java.lang.String</config-property-type>

Modified: trunk/src/main/org/jboss/messaging/ra/JBMConnectionRequestInfo.java
===================================================================
--- trunk/src/main/org/jboss/messaging/ra/JBMConnectionRequestInfo.java	2009-02-04 18:16:58 UTC (rev 5809)
+++ trunk/src/main/org/jboss/messaging/ra/JBMConnectionRequestInfo.java	2009-02-04 20:56:10 UTC (rev 5810)
@@ -51,12 +51,12 @@
    /** The client id */
    private String clientID;
 
+   /** Use XA */
+   private boolean useXA;
+
    /** The type */
    private int type;
 
-   /** Use XA */
-   private boolean useXA;
-
    /** Use transactions */
    private boolean transacted;
 
@@ -65,9 +65,10 @@
 
    /**
     * Constructor
-    * @param prop The managed connection factory properties
+    * @param prop The resource adapter properties
+    * @param type The connection type
     */
-   public JBMConnectionRequestInfo(JBMMCFProperties prop)
+   public JBMConnectionRequestInfo(JBMRAProperties prop, int type)
    {
       if (trace)
          log.trace("constructor(" + prop + ")");
@@ -75,8 +76,8 @@
       this.userName = prop.getUserName();
       this.password = prop.getPassword();
       this.clientID = prop.getClientID();
-      this.type = prop.getType();
       this.useXA = prop.isUseXA();
+      this.type = type;
       this.transacted = true;
       this.acknowledgeMode = Session.AUTO_ACKNOWLEDGE;
    }
@@ -113,9 +114,9 @@
 
    /**
     * Fill in default values if they are missing
-    * @param prop The managed connection factory properties
+    * @param prop The resource adapter properties
     */
-   public void setDefaults(JBMMCFProperties prop)
+   public void setDefaults(JBMRAProperties prop)
    {
       if (trace)
          log.trace("setDefaults(" + prop + ")");

Modified: trunk/src/main/org/jboss/messaging/ra/JBMMCFProperties.java
===================================================================
--- trunk/src/main/org/jboss/messaging/ra/JBMMCFProperties.java	2009-02-04 18:16:58 UTC (rev 5809)
+++ trunk/src/main/org/jboss/messaging/ra/JBMMCFProperties.java	2009-02-04 20:56:10 UTC (rev 5810)
@@ -37,7 +37,7 @@
 public class JBMMCFProperties implements Serializable
 {
    /** Serial version UID */
-   static final long serialVersionUID = 6930631856481925007L;
+   static final long serialVersionUID = -5951352236582886862L;
 
    /** The logger */
    private static final Logger log = Logger.getLogger(JBMMCFProperties.class);
@@ -51,93 +51,6 @@
    /** The topic type */
    private static final String TOPIC_TYPE = Topic.class.getName();
 
-   /** The discovery group name */
-   private String discoveryGroupName;
-
-   /** The discovery group port */
-   private Integer discoveryGroupPort;
-
-   /** */
-   private Long discoveryRefreshTimeout;
-   
-   /** */
-   private Long discoveryInitialWaitTimeout;
-
-   /** */
-   private String loadBalancingPolicyClassName;
-
-   /** */
-   private Long pingPeriod;
-
-   /** */
-   private Long connectionTTL;
-
-   /** */
-   private Long callTimeout;
-
-   /** */
-   private Integer dupsOKBatchSize;
-
-   /** */
-   private Integer transactionBatchSize;
-
-   /** */
-   private Integer consumerWindowSize;
-
-   /** */
-   private Integer consumerMaxRate;
-
-   /** */
-   private Integer sendWindowSize;
-
-   /** */
-   private Integer producerMaxRate;
-
-   /** */
-   private Integer minLargeMessageSize;
-
-   /** */
-   private Boolean blockOnAcknowledge;
-
-   /** */
-   private Boolean blockOnNonPersistentSend;
-
-   /** */
-   private Boolean blockOnPersistentSend;
-
-   /** */
-   private Boolean autoGroup;
-
-   /** */
-   private Integer maxConnections;
-
-   /** */
-   private Boolean preAcknowledge;
-
-   /** */
-   private Long retryInterval;
-
-   /** */
-   private Double retryIntervalMultiplier;
-
-   /** */
-   private Integer maxRetriesBeforeFailover;
-
-   /** */
-   private Integer maxRetriesAfterFailover;
-
-   /** The user name */
-   private String userName;
-
-   /** The password */
-   private String password;
-
-   /** The client ID */
-   private String clientID;
-
-   /** Use XA */
-   private Boolean useXA;
-
    /** The connection type */
    private int type = JBMConnectionFactory.CONNECTION;
 
@@ -152,750 +65,10 @@
       if (trace)
          log.trace("constructor()");
 
-      discoveryGroupName = null;
-      discoveryGroupPort = null;
-      discoveryRefreshTimeout = null;
-      discoveryInitialWaitTimeout = null;
-      loadBalancingPolicyClassName = null;
-      pingPeriod = null;
-      connectionTTL = null;
-      callTimeout = null;
-      dupsOKBatchSize = null;
-      transactionBatchSize = null;
-      consumerWindowSize = null;
-      consumerMaxRate = null;
-      sendWindowSize = null;
-      producerMaxRate = null;
-      minLargeMessageSize = null;
-      blockOnAcknowledge = null;
-      blockOnNonPersistentSend = null;
-      blockOnPersistentSend = null;
-      autoGroup = null;
-      maxConnections = null;
-      preAcknowledge = null;
-      retryInterval = null;
-      retryIntervalMultiplier = null;
-      maxRetriesBeforeFailover = null;
-      maxRetriesAfterFailover = null;
-      userName = null;
-      password = null;
-      clientID = null;
-      useXA = null;
       useTryLock = null;
    }
-   
-   /**
-    * Get the discovery group name
-    * @return The value
-    */
-   public String getDiscoveryGroupName()
-   {
-      if (trace)
-         log.trace("getDiscoveryGroupName()");
 
-      return discoveryGroupName;
-   }
-
    /**
-    * Set the discovery group name
-    * @param dgn The value
-    */
-   public void setDiscoveryGroupName(String dgn)
-   {
-      if (trace)
-         log.trace("setDiscoveryGroupName(" + dgn + ")");
-
-      discoveryGroupName = dgn;
-   }
-
-   /**
-    * Get the discovery group port
-    * @return The value
-    */
-   public Integer getDiscoveryGroupPort()
-   {
-      if (trace)
-         log.trace("getDiscoveryGroupPort()");
-
-      return discoveryGroupPort;
-   }
-
-   /**
-    * Set the discovery group port
-    * @param dgp The value
-    */
-   public void setDiscoveryGroupPort(Integer dgp)
-   {
-      if (trace)
-         log.trace("setDiscoveryGroupPort(" + dgp + ")");
-
-      discoveryGroupPort = dgp;
-   }
-
-   /**
-    * Get discovery refresh timeout
-    * @return The value
-    */
-   public Long getDiscoveryRefreshTimeout()
-   {
-      if (trace)
-         log.trace("getDiscoveryRefreshTimeout()");
-
-      return discoveryRefreshTimeout;
-   }
-
-   /**
-    * Set discovery refresh timeout
-    * @param discoveryRefreshTimeout The value
-    */
-   public void setDiscoveryRefreshTimeout(Long discoveryRefreshTimeout)
-   {
-      if (trace)
-         log.trace("setDiscoveryRefreshTimeout(" + discoveryRefreshTimeout + ")");
-
-      this.discoveryRefreshTimeout = discoveryRefreshTimeout;
-   }
-
-   /**
-    * Get discovery initial wait timeout
-    * @return The value
-    */
-   public Long getDiscoveryInitialWaitTimeout()
-   {
-      if (trace)
-         log.trace("getDiscoveryInitialWaitTimeout()");
-
-      return discoveryInitialWaitTimeout;
-   }
-
-   /**
-    * Set discovery initial wait timeout
-    * @param discoveryInitialWaitTimeout The value
-    */
-   public void setDiscoveryInitialWaitTimeout(Long discoveryInitialWaitTimeout)
-   {
-      if (trace)
-         log.trace("setDiscoveryInitialWaitTimeout(" + discoveryInitialWaitTimeout + ")");
-
-      this.discoveryInitialWaitTimeout = discoveryInitialWaitTimeout;
-   }
-
-   /**
-    * Get load balancing policy class name
-    * @return The value
-    */
-   public String getLoadBalancingPolicyClassName()
-   {
-      if (trace)
-         log.trace("getLoadBalancingPolicyClassName()");
-
-      return loadBalancingPolicyClassName;
-   }
-
-   /**
-    * Set load balancing policy class name
-    * @param loadBalancingPolicyClassName The value
-    */
-   public void setLoadBalancingPolicyClassName(String loadBalancingPolicyClassName)
-   {
-      if (trace)
-         log.trace("setLoadBalancingPolicyClassName(" + loadBalancingPolicyClassName + ")");
-
-      this.loadBalancingPolicyClassName = loadBalancingPolicyClassName;
-   }
-
-   /**
-    * Get ping period
-    * @return The value
-    */
-   public Long getPingPeriod()
-   {
-      if (trace)
-         log.trace("getPingPeriod()");
-
-      return pingPeriod;
-   }
-
-   /**
-    * Set ping period
-    * @param pingPeriod The value
-    */
-   public void setPingPeriod(Long pingPeriod)
-   {
-      if (trace)
-         log.trace("setPingPeriod(" + pingPeriod + ")");
-
-      this.pingPeriod = pingPeriod;
-   }
-
-   /**
-    * Get connection TTL
-    * @return The value
-    */
-   public Long getConnectionTTL()
-   {
-      if (trace)
-         log.trace("getConnectionTTL()");
-
-      return connectionTTL;
-   }
-
-   /**
-    * Set connection TTL
-    * @param connectionTTL The value
-    */
-   public void setConnectionTTL(Long connectionTTL)
-   {
-      if (trace)
-         log.trace("setConnectionTTL(" + connectionTTL + ")");
-
-      this.connectionTTL = connectionTTL;
-   }
-
-   /**
-    * Get call timeout
-    * @return The value
-    */
-   public Long getCallTimeout()
-   {
-      if (trace)
-         log.trace("getCallTimeout()");
-
-      return callTimeout;
-   }
-
-   /**
-    * Set call timeout
-    * @param callTimeout The value
-    */
-   public void setCallTimeout(Long callTimeout)
-   {
-      if (trace)
-         log.trace("setCallTimeout(" + callTimeout + ")");
-
-      this.callTimeout = callTimeout;
-   }
-
-   /**
-    * Get dups ok batch size
-    * @return The value
-    */
-   public Integer getDupsOKBatchSize()
-   {
-      if (trace)
-         log.trace("getDupsOKBatchSize()");
-
-      return dupsOKBatchSize;
-   }
-
-   /**
-    * Set dups ok batch size
-    * @param dupsOKBatchSize The value
-    */
-   public void setDupsOKBatchSize(Integer dupsOKBatchSize)
-   {
-      if (trace)
-         log.trace("setDupsOKBatchSize(" + dupsOKBatchSize + ")");
-
-      this.dupsOKBatchSize = dupsOKBatchSize;
-   }
-
-   /**
-    * Get transaction batch size
-    * @return The value
-    */
-   public Integer getTransactionBatchSize()
-   {
-      if (trace)
-         log.trace("getTransactionBatchSize()");
-
-      return transactionBatchSize;
-   }
-
-   /**
-    * Set transaction batch size
-    * @param transactionBatchSize The value
-    */
-   public void setTransactionBatchSize(Integer transactionBatchSize)
-   {
-      if (trace)
-         log.trace("setTransactionBatchSize(" + transactionBatchSize + ")");
-
-      this.transactionBatchSize = transactionBatchSize;
-   }
-
-   /**
-    * Get consumer window size
-    * @return The value
-    */
-   public Integer getConsumerWindowSize()
-   {
-      if (trace)
-         log.trace("getConsumerWindowSize()");
-
-      return consumerWindowSize;
-   }
-
-   /**
-    * Set consumer window size
-    * @param consumerWindowSize The value
-    */
-   public void setConsumerWindowSize(Integer consumerWindowSize)
-   {
-      if (trace)
-         log.trace("setConsumerWindowSize(" + consumerWindowSize + ")");
-
-      this.consumerWindowSize = consumerWindowSize;
-   }
-
-   /**
-    * Get consumer max rate
-    * @return The value
-    */
-   public Integer getConsumerMaxRate()
-   {
-      if (trace)
-         log.trace("getConsumerMaxRate()");
-
-      return consumerMaxRate;
-   }
-
-   /**
-    * Set consumer max rate
-    * @param consumerMaxRate The value
-    */
-   public void setConsumerMaxRate(Integer consumerMaxRate)
-   {
-      if (trace)
-         log.trace("setConsumerMaxRate(" + consumerMaxRate + ")");
-
-      this.consumerMaxRate = consumerMaxRate;
-   }
-
-   /**
-    * Get send window size
-    * @return The value
-    */
-   public Integer getSendWindowSize()
-   {
-      if (trace)
-         log.trace("getSendWindowSize()");
-
-      return sendWindowSize;
-   }
-
-   /**
-    * Set send window size
-    * @param sendWindowSize The value
-    */
-   public void setSendWindowSize(Integer sendWindowSize)
-   {
-      if (trace)
-         log.trace("setSendWindowSize(" + sendWindowSize + ")");
-
-      this.sendWindowSize = sendWindowSize;
-   }
-
-   /**
-    * Get producer max rate
-    * @return The value
-    */
-   public Integer getProducerMaxRate()
-   {
-      if (trace)
-         log.trace("getProducerMaxRate()");
-
-      return producerMaxRate;
-   }
-
-   /**
-    * Set producer max rate
-    * @param producerMaxRate The value
-    */
-   public void setProducerMaxRate(Integer producerMaxRate)
-   {
-      if (trace)
-         log.trace("setProducerMaxRate(" + producerMaxRate + ")");
-
-      this.producerMaxRate = producerMaxRate;
-   }
-
-   /**
-    * Get min large message size
-    * @return The value
-    */
-   public Integer getMinLargeMessageSize()
-   {
-      if (trace)
-         log.trace("getMinLargeMessageSize()");
-
-      return minLargeMessageSize;
-   }
-
-   /**
-    * Set min large message size
-    * @param minLargeMessageSize The value
-    */
-   public void setMinLargeMessageSize(Integer minLargeMessageSize)
-   {
-      if (trace)
-         log.trace("setMinLargeMessageSize(" + minLargeMessageSize + ")");
-
-      this.minLargeMessageSize = minLargeMessageSize;
-   }
-
-   /**
-    * Get block on acknowledge
-    * @return The value
-    */
-   public Boolean getBlockOnAcknowledge()
-   {
-      if (trace)
-         log.trace("getBlockOnAcknowledge()");
-
-      return blockOnAcknowledge;
-   }
-
-   /**
-    * Set block on acknowledge
-    * @param blockOnAcknowledge The value
-    */
-   public void setBlockOnAcknowledge(Boolean blockOnAcknowledge)
-   {
-      if (trace)
-         log.trace("setBlockOnAcknowledge(" + blockOnAcknowledge + ")");
-
-      this.blockOnAcknowledge = blockOnAcknowledge;
-   }
-
-   /**
-    * Get block on non persistent send
-    * @return The value
-    */
-   public Boolean getBlockOnNonPersistentSend()
-   {
-      if (trace)
-         log.trace("getBlockOnNonPersistentSend()");
-
-      return blockOnNonPersistentSend;
-   }
-
-   /**
-    * Set block on non persistent send
-    * @param blockOnNonPersistentSend The value
-    */
-   public void setBlockOnNonPersistentSend(Boolean blockOnNonPersistentSend)
-   {
-      if (trace)
-         log.trace("setBlockOnNonPersistentSend(" + blockOnNonPersistentSend + ")");
-
-      this.blockOnNonPersistentSend = blockOnNonPersistentSend;
-   }
-
-   /**
-    * Get block on persistent send
-    * @return The value
-    */
-   public Boolean getBlockOnPersistentSend()
-   {
-      if (trace)
-         log.trace("getBlockOnPersistentSend()");
-
-      return blockOnPersistentSend;
-   }
-
-   /**
-    * Set block on persistent send
-    * @param blockOnPersistentSend The value
-    */
-   public void setBlockOnPersistentSend(Boolean blockOnPersistentSend)
-   {
-      if (trace)
-         log.trace("setBlockOnPersistentSend(" + blockOnPersistentSend + ")");
-
-      this.blockOnPersistentSend = blockOnPersistentSend;
-   }
-
-   /**
-    * Get auto group
-    * @return The value
-    */
-   public Boolean getAutoGroup()
-   {
-      if (trace)
-         log.trace("getAutoGroup()");
-
-      return autoGroup;
-   }
-
-   /**
-    * Set auto group
-    * @param autoGroup The value
-    */
-   public void setAutoGroup(Boolean autoGroup)
-   {
-      if (trace)
-         log.trace("setAutoGroup(" + autoGroup + ")");
-
-      this.autoGroup = autoGroup;
-   }
-
-   /**
-    * Get max connections
-    * @return The value
-    */
-   public Integer getMaxConnections()
-   {
-      if (trace)
-         log.trace("getMaxConnections()");
-
-      return maxConnections;
-   }
-
-   /**
-    * Set max connections
-    * @param maxConnections The value
-    */
-   public void setMaxConnections(Integer maxConnections)
-   {
-      if (trace)
-         log.trace("setMaxConnections(" + maxConnections + ")");
-
-      this.maxConnections = maxConnections;
-   }
-
-   /**
-    * Get pre acknowledge
-    * @return The value
-    */
-   public Boolean getPreAcknowledge()
-   {
-      if (trace)
-         log.trace("getPreAcknowledge()");
-
-      return preAcknowledge;
-   }
-
-   /**
-    * Set pre acknowledge
-    * @param preAcknowledge The value
-    */
-   public void setPreAcknowledge(Boolean preAcknowledge)
-   {
-      if (trace)
-         log.trace("setPreAcknowledge(" + preAcknowledge + ")");
-
-      this.preAcknowledge = preAcknowledge;
-   }
-
-   /**
-    * Get retry interval
-    * @return The value
-    */
-   public Long getRetryInterval()
-   {
-      if (trace)
-         log.trace("getRetryInterval()");
-
-      return retryInterval;
-   }
-
-   /**
-    * Set retry interval
-    * @param retryInterval The value
-    */
-   public void setRetryInterval(Long retryInterval)
-   {
-      if (trace)
-         log.trace("setRetryInterval(" + retryInterval + ")");
-
-      this.retryInterval = retryInterval;
-   }
-
-   /**
-    * Get retry interval multiplier
-    * @return The value
-    */
-   public Double getRetryIntervalMultiplier()
-   {
-      if (trace)
-         log.trace("getRetryIntervalMultiplier()");
-
-      return retryIntervalMultiplier;
-   }
-
-   /**
-    * Set retry interval multiplier
-    * @param retryIntervalMultiplier The value
-    */
-   public void setRetryIntervalMultiplier(Double retryIntervalMultiplier)
-   {
-      if (trace)
-         log.trace("setRetryIntervalMultiplier(" + retryIntervalMultiplier + ")");
-
-      this.retryIntervalMultiplier = retryIntervalMultiplier;
-   }
-
-   /**
-    * Get max retries before failover
-    * @return The value
-    */
-   public Integer getMaxRetriesBeforeFailover()
-   {
-      if (trace)
-         log.trace("getMaxRetriesBeforeFailover()");
-
-      return maxRetriesBeforeFailover;
-   }
-
-   /**
-    * Set max retries before failover
-    * @param maxRetriesBeforeFailover The value
-    */
-   public void setMaxRetriesBeforeFailover(Integer maxRetriesBeforeFailover)
-   {
-      if (trace)
-         log.trace("setMaxRetriesBeforeFailover(" + maxRetriesBeforeFailover + ")");
-
-      this.maxRetriesBeforeFailover = maxRetriesBeforeFailover;
-   }
-
-   /**
-    * Get max retries after failover
-    * @return The value
-    */
-   public Integer getMaxRetriesAfterFailover()
-   {
-      if (trace)
-         log.trace("getMaxRetriesAfterFailover()");
-
-      return maxRetriesAfterFailover;
-   }
-
-   /**
-    * Set max retries after failover
-    * @param maxRetriesAfterFailover The value
-    */
-   public void setMaxRetriesAfterFailover(Integer maxRetriesAfterFailover)
-   {
-      if (trace)
-         log.trace("setMaxRetriesAfterFailover(" + maxRetriesAfterFailover + ")");
-
-      this.maxRetriesAfterFailover = maxRetriesAfterFailover;
-   }
-
-   /**
-    * Get the user name
-    * @return The value
-    */
-   public String getUserName()
-   {
-      if (trace)
-         log.trace("getUserName()");
-
-      return userName;
-   }
-
-   /**
-    * Set the user name
-    * @param userName The value
-    */
-   public void setUserName(String userName)
-   {
-      if (trace)
-         log.trace("setUserName(" + userName + ")");
-
-      this.userName = userName;
-   }
-  
-   /**
-    * Get the password
-    * @return The value
-    */
-   public String getPassword()
-   {
-      if (trace)
-         log.trace("getPassword()");
-
-      return password;
-   }
-
-   /**
-    * Set the password
-    * @param password The value
-    */
-   public void setPassword(String password)
-   {
-      if (trace)
-         log.trace("setPassword(****)");
-
-      this.password = password;
-   }
-  
-   /**
-    * Get the client id
-    * @return The value
-    */
-   public String getClientID()
-   {
-      if (trace)
-         log.trace("getClientID()");
-
-      return clientID;
-   }
-
-   /**
-    * Set the client id
-    * @param clientID The value
-    */
-   public void setClientID(String clientID)
-   {
-      if (trace)
-         log.trace("setClientID(" + clientID + ")");
-
-      this.clientID = clientID;
-   }
-  
-   /**
-    * Get the use XA flag
-    * @return The value
-    */
-   public Boolean getUseXA()
-   {
-      if (trace)
-         log.trace("getUseXA()");
-
-      return useXA;
-   }
-
-   /**
-    * Set the use XA flag
-    * @param xa The value
-    */
-   public void setUseXA(Boolean xa)
-   {
-      if (trace)
-         log.trace("setUseXA(" + xa + ")");
-
-      this.useXA = xa;
-   }
-
-   /**
-    * Use XA for communication
-    * @return The value
-    */
-   public boolean isUseXA()
-   {
-      if (trace)
-         log.trace("isUseXA()");
-
-      if (useXA == null)
-         return false;
-
-      return useXA.booleanValue();
-   }
-
-   /**
     * Get the connection type
     * @return The type
     */
@@ -981,35 +154,7 @@
       if (obj instanceof JBMMCFProperties)
       {
          JBMMCFProperties you = (JBMMCFProperties) obj;
-         return (Util.compare(discoveryGroupName, you.getDiscoveryGroupName()) &&
-                 Util.compare(discoveryGroupPort, you.getDiscoveryGroupPort()) &&
-                 Util.compare(discoveryRefreshTimeout, you.getDiscoveryRefreshTimeout()) &&
-                 Util.compare(discoveryInitialWaitTimeout, you.getDiscoveryInitialWaitTimeout()) &&
-                 Util.compare(loadBalancingPolicyClassName, you.getLoadBalancingPolicyClassName()) &&
-                 Util.compare(pingPeriod, you.getPingPeriod()) &&
-                 Util.compare(connectionTTL, you.getConnectionTTL()) &&
-                 Util.compare(callTimeout, you.getCallTimeout()) &&
-                 Util.compare(dupsOKBatchSize, you.getDupsOKBatchSize()) &&
-                 Util.compare(transactionBatchSize, you.getTransactionBatchSize()) &&
-                 Util.compare(consumerWindowSize, you.getConsumerWindowSize()) &&
-                 Util.compare(consumerMaxRate, you.getConsumerMaxRate()) &&
-                 Util.compare(sendWindowSize, you.getSendWindowSize()) &&
-                 Util.compare(producerMaxRate, you.getProducerMaxRate()) &&
-                 Util.compare(minLargeMessageSize, you.getMinLargeMessageSize()) &&
-                 Util.compare(blockOnAcknowledge, you.getBlockOnAcknowledge()) &&
-                 Util.compare(blockOnNonPersistentSend, you.getBlockOnNonPersistentSend()) &&
-                 Util.compare(blockOnPersistentSend, you.getBlockOnPersistentSend()) &&
-                 Util.compare(autoGroup, you.getAutoGroup()) &&
-                 Util.compare(maxConnections, you.getMaxConnections()) &&
-                 Util.compare(preAcknowledge, you.getPreAcknowledge()) &&
-                 Util.compare(retryInterval, you.getRetryInterval()) &&
-                 Util.compare(retryIntervalMultiplier, you.getRetryIntervalMultiplier()) &&
-                 Util.compare(maxRetriesBeforeFailover, you.getMaxRetriesBeforeFailover()) &&
-                 Util.compare(maxRetriesAfterFailover, you.getMaxRetriesAfterFailover()) &&
-                 Util.compare(userName, you.getUserName()) &&
-                 Util.compare(password, you.getPassword()) &&
-                 Util.compare(clientID, you.getClientID()) &&
-                 Util.compare(useXA, you.getUseXA()) &&
+         return (type == you.getType() &&
                  Util.compare(useTryLock, you.getUseTryLock()));
       }
     
@@ -1027,35 +172,7 @@
 
       int hash = 7;
 
-      hash += 31 * hash + (discoveryGroupName != null ? discoveryGroupName.hashCode() : 0);
-      hash += 31 * hash + (discoveryGroupPort != null ? discoveryGroupPort.hashCode() : 0);
-      hash += 31 * hash + (discoveryRefreshTimeout != null ? discoveryRefreshTimeout.hashCode() : 0);
-      hash += 31 * hash + (discoveryInitialWaitTimeout != null ? discoveryInitialWaitTimeout.hashCode() : 0);
-      hash += 31 * hash + (loadBalancingPolicyClassName != null ? loadBalancingPolicyClassName.hashCode() : 0);
-      hash += 31 * hash + (pingPeriod != null ? pingPeriod.hashCode() : 0);
-      hash += 31 * hash + (connectionTTL != null ? connectionTTL.hashCode() : 0);
-      hash += 31 * hash + (callTimeout != null ? callTimeout.hashCode() : 0);
-      hash += 31 * hash + (dupsOKBatchSize != null ? dupsOKBatchSize.hashCode() : 0);
-      hash += 31 * hash + (transactionBatchSize != null ? transactionBatchSize.hashCode() : 0);
-      hash += 31 * hash + (consumerWindowSize != null ? consumerWindowSize.hashCode() : 0);
-      hash += 31 * hash + (consumerMaxRate != null ? consumerMaxRate.hashCode() : 0);
-      hash += 31 * hash + (sendWindowSize != null ? sendWindowSize.hashCode() : 0);
-      hash += 31 * hash + (producerMaxRate != null ? producerMaxRate.hashCode() : 0);
-      hash += 31 * hash + (minLargeMessageSize != null ? minLargeMessageSize.hashCode() : 0);
-      hash += 31 * hash + (blockOnAcknowledge != null ? blockOnAcknowledge.hashCode() : 0);
-      hash += 31 * hash + (blockOnNonPersistentSend != null ? blockOnNonPersistentSend.hashCode() : 0);
-      hash += 31 * hash + (blockOnPersistentSend != null ? blockOnPersistentSend.hashCode() : 0);
-      hash += 31 * hash + (autoGroup != null ? autoGroup.hashCode() : 0);
-      hash += 31 * hash + (maxConnections != null ? maxConnections.hashCode() : 0);
-      hash += 31 * hash + (preAcknowledge != null ? preAcknowledge.hashCode() : 0);
-      hash += 31 * hash + (retryInterval != null ? retryInterval.hashCode() : 0);
-      hash += 31 * hash + (retryIntervalMultiplier != null ? retryIntervalMultiplier.hashCode() : 0);
-      hash += 31 * hash + (maxRetriesBeforeFailover != null ? maxRetriesBeforeFailover.hashCode() : 0);
-      hash += 31 * hash + (maxRetriesAfterFailover != null ? maxRetriesAfterFailover.hashCode() : 0);
-      hash += 31 * hash + (userName != null ? userName.hashCode() : 0);
-      hash += 31 * hash + (password != null ? password.hashCode() : 0);
-      hash += 31 * hash + (clientID != null ? clientID.hashCode() : 0);
-      hash += 31 * hash + (useXA != null ? useXA.hashCode() : 0);
+      hash += 31 * hash + (Integer.valueOf(type).hashCode());
       hash += 31 * hash + (useTryLock != null ? useTryLock.hashCode() : 0);
 
       return hash;

Modified: trunk/src/main/org/jboss/messaging/ra/JBMManagedConnectionFactory.java
===================================================================
--- trunk/src/main/org/jboss/messaging/ra/JBMManagedConnectionFactory.java	2009-02-04 18:16:58 UTC (rev 5809)
+++ trunk/src/main/org/jboss/messaging/ra/JBMManagedConnectionFactory.java	2009-02-04 20:56:10 UTC (rev 5810)
@@ -24,7 +24,6 @@
 import java.io.PrintWriter;
 import java.util.Iterator;
 import java.util.Set;
-import java.util.concurrent.atomic.AtomicBoolean;
 
 import javax.jms.ConnectionMetaData;
 import javax.resource.ResourceException;
@@ -32,6 +31,8 @@
 import javax.resource.spi.ConnectionRequestInfo;
 import javax.resource.spi.ManagedConnection;
 import javax.resource.spi.ManagedConnectionFactory;
+import javax.resource.spi.ResourceAdapter;
+import javax.resource.spi.ResourceAdapterAssociation;
 import javax.security.auth.Subject;
 
 import org.jboss.messaging.core.logging.Logger;
@@ -44,7 +45,7 @@
  * @author <a href="mailto:jesper.pedersen at jboss.org">Jesper Pedersen</a>.
  * @version $Revision: $
  */
-public class JBMManagedConnectionFactory implements ManagedConnectionFactory
+public class JBMManagedConnectionFactory implements ManagedConnectionFactory, ResourceAdapterAssociation
 {
    /** Serial version UID */
    static final long serialVersionUID = -1452379518562456741L;
@@ -54,6 +55,9 @@
    
    /** Trace enabled */
    private static boolean trace = log.isTraceEnabled();
+
+   /** The resource adapter */
+   private JBMResourceAdapter ra;
    
    /** Connection manager */
    private ConnectionManager cm;
@@ -61,12 +65,6 @@
    /** The managed connection factory properties */
    private JBMMCFProperties mcfProperties;
 
-   /** The JBoss connection factory */
-   private JBossConnectionFactory factory;
-   
-   /** Have the factory been configured */
-   private AtomicBoolean configured;
-
    /**
     * Constructor
     */
@@ -75,8 +73,9 @@
       if (trace)
          log.trace("constructor()");
       
+      ra = null;
+      cm = null;
       mcfProperties = new JBMMCFProperties();
-      configured = new AtomicBoolean(false);
    }
   
    /**
@@ -219,6 +218,35 @@
    }
 
    /**
+    * Get the resource adapter
+    * @return The resource adapter
+    */
+   public ResourceAdapter getResourceAdapter()
+   {
+      if (trace)
+         log.trace("getResourceAdapter()");
+
+      return ra;
+   }
+
+   /**
+    * Set the resource adapter
+    * @param ra The resource adapter
+    * @exception ResourceException Thrown if incorrect resource adapter
+    */
+   public void setResourceAdapter(ResourceAdapter ra) throws ResourceException
+   {
+      if (trace)
+         log.trace("setResourceAdapter(" + ra + ")");
+
+      if (ra == null || !(ra instanceof JBMResourceAdapter)) {
+         throw new ResourceException("Resource adapter is " + ra);
+      }
+
+      this.ra = (JBMResourceAdapter)ra;
+   }
+
+   /**
     * Indicates whether some other object is "equal to" this one.
     * @param obj Object with which to compare
     * @return True if this object is the same as the obj argument; false otherwise.
@@ -233,7 +261,10 @@
 
       if (obj instanceof JBMManagedConnectionFactory)
       {
-         return mcfProperties.equals(((JBMManagedConnectionFactory)obj).getProperties());
+         JBMManagedConnectionFactory other = (JBMManagedConnectionFactory)obj;
+
+         return mcfProperties.equals(other.getProperties()) &&
+            ra.equals(other.getResourceAdapter());
       }
       else
       {
@@ -250,706 +281,13 @@
       if (trace)
          log.trace("hashCode()");
 
-      return mcfProperties.hashCode();
-   }
+      int hash = mcfProperties.hashCode();
+      hash += 31 * ra.hashCode();
 
-   /**
-    * Get the discovery group name
-    * @return The value
-    */
-   public String getDiscoveryGroupName()
-   {
-      if (trace)
-         log.trace("getDiscoveryGroupName()");
-
-      return mcfProperties.getDiscoveryGroupName();
+      return hash;
    }
 
    /**
-    * Set the discovery group name
-    * @param dgn The value
-    */
-   public void setDiscoveryGroupName(String dgn)
-   {
-      if (trace)
-         log.trace("setDiscoveryGroupName(" + dgn + ")");
-
-      mcfProperties.setDiscoveryGroupName(dgn);
-   }
-
-   /**
-    * Get the discovery group port
-    * @return The value
-    */
-   public Integer getDiscoveryGroupPort()
-   {
-      if (trace)
-         log.trace("getDiscoveryGroupPort()");
-
-      return mcfProperties.getDiscoveryGroupPort();
-   }
-
-   /**
-    * Set the discovery group port
-    * @param dgp The value
-    */
-   public void setDiscoveryGroupPort(Integer dgp)
-   {
-      if (trace)
-         log.trace("setDiscoveryGroupPort(" + dgp + ")");
-
-      mcfProperties.setDiscoveryGroupPort(dgp);
-   }
-
-   /**
-    * Get discovery refresh timeout
-    * @return The value
-    */
-   public Long getDiscoveryRefreshTimeout()
-   {
-      if (trace)
-         log.trace("getDiscoveryRefreshTimeout()");
-
-      return mcfProperties.getDiscoveryRefreshTimeout();
-   }
-
-   /**
-    * Set discovery refresh timeout
-    * @param discoveryRefreshTimeout The value
-    */
-   public void setDiscoveryRefreshTimeout(Long discoveryRefreshTimeout)
-   {
-      if (trace)
-         log.trace("setDiscoveryRefreshTimeout(" + discoveryRefreshTimeout + ")");
-
-      mcfProperties.setDiscoveryRefreshTimeout(discoveryRefreshTimeout);
-   }
-
-   /**
-    * Get discovery initial wait timeout
-    * @return The value
-    */
-   public Long getDiscoveryInitialWaitTimeout()
-   {
-      if (trace)
-         log.trace("getDiscoveryInitialWaitTimeout()");
-
-      return mcfProperties.getDiscoveryInitialWaitTimeout();
-   }
-
-   /**
-    * Set discovery initial wait timeout
-    * @param discoveryInitialWaitTimeout The value
-    */
-   public void setDiscoveryInitialWaitTimeout(Long discoveryInitialWaitTimeout)
-   {
-      if (trace)
-         log.trace("setDiscoveryInitialWaitTimeout(" + discoveryInitialWaitTimeout + ")");
-
-      mcfProperties.setDiscoveryInitialWaitTimeout(discoveryInitialWaitTimeout);
-   }
-
-   /**
-    * Get load balancing policy class name
-    * @return The value
-    */
-   public String getLoadBalancingPolicyClassName()
-   {
-      if (trace)
-         log.trace("getLoadBalancingPolicyClassName()");
-
-      return mcfProperties.getLoadBalancingPolicyClassName();
-   }
-
-   /**
-    * Set load balancing policy class name
-    * @param loadBalancingPolicyClassName The value
-    */
-   public void setLoadBalancingPolicyClassName(String loadBalancingPolicyClassName)
-   {
-      if (trace)
-         log.trace("setLoadBalancingPolicyClassName(" + loadBalancingPolicyClassName + ")");
-
-      mcfProperties.setLoadBalancingPolicyClassName(loadBalancingPolicyClassName);
-   }
-
-   /**
-    * Get ping period
-    * @return The value
-    */
-   public Long getPingPeriod()
-   {
-      if (trace)
-         log.trace("getPingPeriod()");
-
-      return mcfProperties.getPingPeriod();
-   }
-
-   /**
-    * Set ping period
-    * @param pingPeriod The value
-    */
-   public void setPingPeriod(Long pingPeriod)
-   {
-      if (trace)
-         log.trace("setPingPeriod(" + pingPeriod + ")");
-
-      mcfProperties.setPingPeriod(pingPeriod);
-   }
-
-   /**
-    * Get connection TTL
-    * @return The value
-    */
-   public Long getConnectionTTL()
-   {
-      if (trace)
-         log.trace("getConnectionTTL()");
-
-      return mcfProperties.getConnectionTTL();
-   }
-
-   /**
-    * Set connection TTL
-    * @param connectionTTL The value
-    */
-   public void setConnectionTTL(Long connectionTTL)
-   {
-      if (trace)
-         log.trace("setConnectionTTL(" + connectionTTL + ")");
-
-      mcfProperties.setConnectionTTL(connectionTTL);
-   }
-
-   /**
-    * Get call timeout
-    * @return The value
-    */
-   public Long getCallTimeout()
-   {
-      if (trace)
-         log.trace("getCallTimeout()");
-
-      return mcfProperties.getCallTimeout();
-   }
-
-   /**
-    * Set call timeout
-    * @param callTimeout The value
-    */
-   public void setCallTimeout(Long callTimeout)
-   {
-      if (trace)
-         log.trace("setCallTimeout(" + callTimeout + ")");
-
-      mcfProperties.setCallTimeout(callTimeout);
-   }
-
-   /**
-    * Get dups ok batch size
-    * @return The value
-    */
-   public Integer getDupsOKBatchSize()
-   {
-      if (trace)
-         log.trace("getDupsOKBatchSize()");
-
-      return mcfProperties.getDupsOKBatchSize();
-   }
-
-   /**
-    * Set dups ok batch size
-    * @param dupsOKBatchSize The value
-    */
-   public void setDupsOKBatchSize(Integer dupsOKBatchSize)
-   {
-      if (trace)
-         log.trace("setDupsOKBatchSize(" + dupsOKBatchSize + ")");
-
-      mcfProperties.setDupsOKBatchSize(dupsOKBatchSize);
-   }
-
-   /**
-    * Get transaction batch size
-    * @return The value
-    */
-   public Integer getTransactionBatchSize()
-   {
-      if (trace)
-         log.trace("getTransactionBatchSize()");
-
-      return mcfProperties.getTransactionBatchSize();
-   }
-
-   /**
-    * Set transaction batch size
-    * @param transactionBatchSize The value
-    */
-   public void setTransactionBatchSize(Integer transactionBatchSize)
-   {
-      if (trace)
-         log.trace("setTransactionBatchSize(" + transactionBatchSize + ")");
-
-      mcfProperties.setTransactionBatchSize(transactionBatchSize);
-   }
-
-   /**
-    * Get consumer window size
-    * @return The value
-    */
-   public Integer getConsumerWindowSize()
-   {
-      if (trace)
-         log.trace("getConsumerWindowSize()");
-
-      return mcfProperties.getConsumerWindowSize();
-   }
-
-   /**
-    * Set consumer window size
-    * @param consumerWindowSize The value
-    */
-   public void setConsumerWindowSize(Integer consumerWindowSize)
-   {
-      if (trace)
-         log.trace("setConsumerWindowSize(" + consumerWindowSize + ")");
-
-      mcfProperties.setConsumerWindowSize(consumerWindowSize);
-   }
-
-   /**
-    * Get consumer max rate
-    * @return The value
-    */
-   public Integer getConsumerMaxRate()
-   {
-      if (trace)
-         log.trace("getConsumerMaxRate()");
-
-      return mcfProperties.getConsumerMaxRate();
-   }
-
-   /**
-    * Set consumer max rate
-    * @param consumerMaxRate The value
-    */
-   public void setConsumerMaxRate(Integer consumerMaxRate)
-   {
-      if (trace)
-         log.trace("setConsumerMaxRate(" + consumerMaxRate + ")");
-
-      mcfProperties.setConsumerMaxRate(consumerMaxRate);
-   }
-
-   /**
-    * Get send window size
-    * @return The value
-    */
-   public Integer getSendWindowSize()
-   {
-      if (trace)
-         log.trace("getSendWindowSize()");
-
-      return mcfProperties.getSendWindowSize();
-   }
-
-   /**
-    * Set send window size
-    * @param sendWindowSize The value
-    */
-   public void setSendWindowSize(Integer sendWindowSize)
-   {
-      if (trace)
-         log.trace("setSendWindowSize(" + sendWindowSize + ")");
-
-      mcfProperties.setSendWindowSize(sendWindowSize);
-   }
-
-   /**
-    * Get producer max rate
-    * @return The value
-    */
-   public Integer getProducerMaxRate()
-   {
-      if (trace)
-         log.trace("getProducerMaxRate()");
-
-      return mcfProperties.getProducerMaxRate();
-   }
-
-   /**
-    * Set producer max rate
-    * @param producerMaxRate The value
-    */
-   public void setProducerMaxRate(Integer producerMaxRate)
-   {
-      if (trace)
-         log.trace("setProducerMaxRate(" + producerMaxRate + ")");
-
-      mcfProperties.setProducerMaxRate(producerMaxRate);
-   }
-
-   /**
-    * Get min large message size
-    * @return The value
-    */
-   public Integer getMinLargeMessageSize()
-   {
-      if (trace)
-         log.trace("getMinLargeMessageSize()");
-
-      return mcfProperties.getMinLargeMessageSize();
-   }
-
-   /**
-    * Set min large message size
-    * @param minLargeMessageSize The value
-    */
-   public void setMinLargeMessageSize(Integer minLargeMessageSize)
-   {
-      if (trace)
-         log.trace("setMinLargeMessageSize(" + minLargeMessageSize + ")");
-
-      mcfProperties.setMinLargeMessageSize(minLargeMessageSize);
-   }
-
-   /**
-    * Get block on acknowledge
-    * @return The value
-    */
-   public Boolean getBlockOnAcknowledge()
-   {
-      if (trace)
-         log.trace("getBlockOnAcknowledge()");
-
-      return mcfProperties.getBlockOnAcknowledge();
-   }
-
-   /**
-    * Set block on acknowledge
-    * @param blockOnAcknowledge The value
-    */
-   public void setBlockOnAcknowledge(Boolean blockOnAcknowledge)
-   {
-      if (trace)
-         log.trace("setBlockOnAcknowledge(" + blockOnAcknowledge + ")");
-
-      mcfProperties.setBlockOnAcknowledge(blockOnAcknowledge);
-   }
-
-   /**
-    * Get block on non persistent send
-    * @return The value
-    */
-   public Boolean getBlockOnNonPersistentSend()
-   {
-      if (trace)
-         log.trace("getBlockOnNonPersistentSend()");
-
-      return mcfProperties.getBlockOnNonPersistentSend();
-   }
-
-   /**
-    * Set block on non persistent send
-    * @param blockOnNonPersistentSend The value
-    */
-   public void setBlockOnNonPersistentSend(Boolean blockOnNonPersistentSend)
-   {
-      if (trace)
-         log.trace("setBlockOnNonPersistentSend(" + blockOnNonPersistentSend + ")");
-
-      mcfProperties.setBlockOnNonPersistentSend(blockOnNonPersistentSend);
-   }
-
-   /**
-    * Get block on persistent send
-    * @return The value
-    */
-   public Boolean getBlockOnPersistentSend()
-   {
-      if (trace)
-         log.trace("getBlockOnPersistentSend()");
-
-      return mcfProperties.getBlockOnPersistentSend();
-   }
-
-   /**
-    * Set block on persistent send
-    * @param blockOnPersistentSend The value
-    */
-   public void setBlockOnPersistentSend(Boolean blockOnPersistentSend)
-   {
-      if (trace)
-         log.trace("setBlockOnPersistentSend(" + blockOnPersistentSend + ")");
-
-      mcfProperties.setBlockOnPersistentSend(blockOnPersistentSend);
-   }
-
-   /**
-    * Get auto group
-    * @return The value
-    */
-   public Boolean getAutoGroup()
-   {
-      if (trace)
-         log.trace("getAutoGroup()");
-
-      return mcfProperties.getAutoGroup();
-   }
-
-   /**
-    * Set auto group
-    * @param autoGroup The value
-    */
-   public void setAutoGroup(Boolean autoGroup)
-   {
-      if (trace)
-         log.trace("setAutoGroup(" + autoGroup + ")");
-
-      mcfProperties.setAutoGroup(autoGroup);
-   }
-
-   /**
-    * Get max connections
-    * @return The value
-    */
-   public Integer getMaxConnections()
-   {
-      if (trace)
-         log.trace("getMaxConnections()");
-
-      return mcfProperties.getMaxConnections();
-   }
-
-   /**
-    * Set max connections
-    * @param maxConnections The value
-    */
-   public void setMaxConnections(Integer maxConnections)
-   {
-      if (trace)
-         log.trace("setMaxConnections(" + maxConnections + ")");
-
-      mcfProperties.setMaxConnections(maxConnections);
-   }
-
-   /**
-    * Get pre acknowledge
-    * @return The value
-    */
-   public Boolean getPreAcknowledge()
-   {
-      if (trace)
-         log.trace("getPreAcknowledge()");
-
-      return mcfProperties.getPreAcknowledge();
-   }
-
-   /**
-    * Set pre acknowledge
-    * @param preAcknowledge The value
-    */
-   public void setPreAcknowledge(Boolean preAcknowledge)
-   {
-      if (trace)
-         log.trace("setPreAcknowledge(" + preAcknowledge + ")");
-
-      mcfProperties.setPreAcknowledge(preAcknowledge);
-   }
-
-   /**
-    * Get retry interval
-    * @return The value
-    */
-   public Long getRetryInterval()
-   {
-      if (trace)
-         log.trace("getRetryInterval()");
-
-      return mcfProperties.getRetryInterval();
-   }
-
-   /**
-    * Set retry interval
-    * @param retryInterval The value
-    */
-   public void setRetryInterval(Long retryInterval)
-   {
-      if (trace)
-         log.trace("setRetryInterval(" + retryInterval + ")");
-
-      mcfProperties.setRetryInterval(retryInterval);
-   }
-
-   /**
-    * Get retry interval multiplier
-    * @return The value
-    */
-   public Double getRetryIntervalMultiplier()
-   {
-      if (trace)
-         log.trace("getRetryIntervalMultiplier()");
-
-      return mcfProperties.getRetryIntervalMultiplier();
-   }
-
-   /**
-    * Set retry interval multiplier
-    * @param retryIntervalMultiplier The value
-    */
-   public void setRetryIntervalMultiplier(Double retryIntervalMultiplier)
-   {
-      if (trace)
-         log.trace("setRetryIntervalMultiplier(" + retryIntervalMultiplier + ")");
-
-      mcfProperties.setRetryIntervalMultiplier(retryIntervalMultiplier);
-   }
-
-   /**
-    * Get max retries before failover
-    * @return The value
-    */
-   public Integer getMaxRetriesBeforeFailover()
-   {
-      if (trace)
-         log.trace("getMaxRetriesBeforeFailover()");
-
-      return mcfProperties.getMaxRetriesBeforeFailover();
-   }
-
-   /**
-    * Set max retries before failover
-    * @param maxRetriesBeforeFailover The value
-    */
-   public void setMaxRetriesBeforeFailover(Integer maxRetriesBeforeFailover)
-   {
-      if (trace)
-         log.trace("setMaxRetriesBeforeFailover(" + maxRetriesBeforeFailover + ")");
-
-      mcfProperties.setMaxRetriesBeforeFailover(maxRetriesBeforeFailover);
-   }
-
-   /**
-    * Get max retries after failover
-    * @return The value
-    */
-   public Integer getMaxRetriesAfterFailover()
-   {
-      if (trace)
-         log.trace("getMaxRetriesAfterFailover()");
-
-      return mcfProperties.getMaxRetriesAfterFailover();
-   }
-
-   /**
-    * Set max retries after failover
-    * @param maxRetriesAfterFailover The value
-    */
-   public void setMaxRetriesAfterFailover(Integer maxRetriesAfterFailover)
-   {
-      if (trace)
-         log.trace("setMaxRetriesAfterFailover(" + maxRetriesAfterFailover + ")");
-
-      mcfProperties.setMaxRetriesAfterFailover(maxRetriesAfterFailover);
-   }
-
-   /**
-    * Get the user name
-    * @return The value
-    */
-   public String getUserName()
-   {
-      if (trace)
-         log.trace("getUserName()");
-
-      return mcfProperties.getUserName();
-   }
-
-   /**
-    * Set the user name
-    * @param userName The value
-    */
-   public void setUserName(String userName)
-   {
-      if (trace)
-         log.trace("setUserName(" + userName + ")");
-
-      mcfProperties.setUserName(userName);
-   }
-
-   /**
-    * Get the password
-    * @return The value
-    */
-   public String getPassword()
-   {
-      if (trace)
-         log.trace("getPassword()");
-
-      return mcfProperties.getPassword();
-   }
-
-   /**
-    * Set the password
-    * @param password The value
-    */
-   public void setPassword(String password)
-   {
-      if (trace)
-         log.trace("setPassword(****)");
-
-      mcfProperties.setPassword(password);
-   }
-   
-   /**
-    * Get the client ID
-    * @return The value
-    */
-   public String getClientID()
-   {
-      if (trace)
-         log.trace("getClientID()");
-
-      return mcfProperties.getClientID();
-   }
-
-   /**
-    * Set the client ID
-    * @param clientId The client id
-    */
-   public void setClientID(String clientID)
-   {
-      if (trace)
-         log.trace("setClientID(" + clientID + ")");
-
-      mcfProperties.setClientID(clientID);
-   }
-   
-   /**
-    * Get the use XA flag
-    * @return The value
-    */
-   public Boolean getUseXA()
-   {
-      if (trace)
-         log.trace("getUseXA()");
-
-      return mcfProperties.getUseXA();
-   }
-
-   /**
-    * Set the use XA flag
-    * @param xa The value
-    */
-   public void setUseXA(Boolean xa)
-   {
-      if (trace)
-         log.trace("setUseXA(" + xa + ")");
-
-      mcfProperties.setUseXA(xa);
-   }
-
-   /**
     * Get the default session type
     * @return The value
     */
@@ -998,29 +336,6 @@
    }
    
    /**
-    * Get a connection request info instance
-    * @param info The instance that should be updated; may be <code>null</code>
-    * @return The instance
-    */
-   private JBMConnectionRequestInfo getCRI(JBMConnectionRequestInfo info)
-   {
-      if (trace)
-         log.trace("getCRI(" + info + ")");
-
-      if (info == null)
-      {
-         // Create a default one
-         return new JBMConnectionRequestInfo(mcfProperties);
-      }
-      else
-      {
-         // Fill the one with any defaults
-         info.setDefaults(mcfProperties);
-         return info;
-      }
-   }
-   
-   /**
     * Get the connection metadata
     * @return The metadata
     */
@@ -1033,10 +348,19 @@
    }
 
    /**
+    * Get the JBoss connection factory
+    * @return The factory
+    */
+   protected JBossConnectionFactory getJBossConnectionFactory()
+   {
+      return ra.getJBossConnectionFactory();
+   }
+
+   /**
     * Get the managed connection factory properties
     * @return The properties
     */
-   public JBMMCFProperties getProperties()
+   protected JBMMCFProperties getProperties()
    {
       if (trace)
          log.trace("getProperties()");
@@ -1045,106 +369,25 @@
    }
 
    /**
-    * Get the JBoss connection factory
-    * @return The factory
+    * Get a connection request info instance
+    * @param info The instance that should be updated; may be <code>null</code>
+    * @return The instance
     */
-   protected JBossConnectionFactory getJBossConnectionFactory()
+   private JBMConnectionRequestInfo getCRI(JBMConnectionRequestInfo info)
    {
-      if (!configured.get()) {
-         setup();
-      }
+      if (trace)
+         log.trace("getCRI(" + info + ")");
 
-      return factory;
-   }
-
-   /**
-    * Setup the factory
-    */
-   protected void setup()
-   {
-      if (getDiscoveryGroupName() != null &&
-          !getDiscoveryGroupName().trim().equals("") &&
-          getDiscoveryGroupPort() != null &&
-          getDiscoveryRefreshTimeout() != null &&
-          getDiscoveryInitialWaitTimeout() != null &&
-          getLoadBalancingPolicyClassName() != null &&
-          getPingPeriod() != null &&
-          getConnectionTTL() != null &&
-          getCallTimeout() != null &&
-          getClientID() != null &&
-          getDupsOKBatchSize() != null &&
-          getTransactionBatchSize() != null &&
-          getConsumerWindowSize() != null &&
-          getConsumerMaxRate() != null &&
-          getSendWindowSize() != null &&
-          getProducerMaxRate() != null &&
-          getMinLargeMessageSize() != null &&
-          getBlockOnAcknowledge() != null &&
-          getBlockOnNonPersistentSend() != null &&
-          getBlockOnPersistentSend() != null &&
-          getAutoGroup() != null &&
-          getMaxConnections() != null &&
-          getPreAcknowledge() != null &&
-          getRetryInterval() != null &&
-          getRetryIntervalMultiplier() != null &&
-          getMaxRetriesBeforeFailover() != null &&
-          getMaxRetriesAfterFailover() != null)
+      if (info == null)
       {
-         factory = new JBossConnectionFactory(getDiscoveryGroupName(), 
-                                              getDiscoveryGroupPort().intValue(),
-                                              getDiscoveryRefreshTimeout().longValue(),
-                                              getDiscoveryInitialWaitTimeout().longValue(),
-                                              getLoadBalancingPolicyClassName(),
-                                              getPingPeriod().longValue(),
-                                              getConnectionTTL().longValue(),
-                                              getCallTimeout().longValue(),
-                                              getClientID(),
-                                              getDupsOKBatchSize().intValue(),
-                                              getTransactionBatchSize().intValue(),
-                                              getConsumerWindowSize().intValue(),
-                                              getConsumerMaxRate().intValue(),
-                                              getSendWindowSize().intValue(),
-                                              getProducerMaxRate().intValue(),
-                                              getMinLargeMessageSize().intValue(),
-                                              getBlockOnAcknowledge().booleanValue(),
-                                              getBlockOnNonPersistentSend().booleanValue(),
-                                              getBlockOnPersistentSend().booleanValue(),
-                                              getAutoGroup().booleanValue(),
-                                              getMaxConnections().intValue(),
-                                              getPreAcknowledge().booleanValue(),
-                                              getRetryInterval().longValue(),
-                                              getRetryIntervalMultiplier().doubleValue(),
-                                              getMaxRetriesBeforeFailover().intValue(),
-                                              getMaxRetriesAfterFailover().intValue());
-
-         configured.set(true);
-
-      } else if (getDiscoveryGroupName() != null &&
-                 !getDiscoveryGroupName().trim().equals("") &&
-                 getDiscoveryGroupPort() != null &&
-                 getDiscoveryRefreshTimeout() != null &&
-                 getDiscoveryInitialWaitTimeout() != null)
-      {
-         factory = new JBossConnectionFactory(getDiscoveryGroupName(), 
-                                              getDiscoveryGroupPort().intValue(),
-                                              getDiscoveryRefreshTimeout().longValue(),
-                                              getDiscoveryInitialWaitTimeout().longValue());
-
-         configured.set(true);
-
-      } 
-      else if (getDiscoveryGroupName() != null &&
-               !getDiscoveryGroupName().trim().equals("") &&
-               getDiscoveryGroupPort() != null)
-      {
-         factory = new JBossConnectionFactory(getDiscoveryGroupName(), 
-                                              getDiscoveryGroupPort().intValue());
-
-         configured.set(true);
+         // Create a default one
+         return new JBMConnectionRequestInfo(ra.getProperties(), mcfProperties.getType());
       }
       else
       {
-         log.fatal("Unable to configure phsyical connection factory");
+         // Fill the one with any defaults
+         info.setDefaults(ra.getProperties());
+         return info;
       }
    }
 }

Added: trunk/src/main/org/jboss/messaging/ra/JBMRAProperties.java
===================================================================
--- trunk/src/main/org/jboss/messaging/ra/JBMRAProperties.java	                        (rev 0)
+++ trunk/src/main/org/jboss/messaging/ra/JBMRAProperties.java	2009-02-04 20:56:10 UTC (rev 5810)
@@ -0,0 +1,976 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2009, 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.messaging.ra;
+
+import java.io.Serializable;
+
+import org.jboss.messaging.core.logging.Logger;
+
+/**
+ * The RA default properties - these are set in the ra.xml file
+ *
+ * @author <a href="mailto:adrian at jboss.com">Adrian Brock</a>
+ * @author <a href="mailto:jesper.pedersen at jboss.org">Jesper Pedersen</a>
+ * @version $Revision: $
+ */
+public class JBMRAProperties implements Serializable
+{
+   /** Serial version UID */
+   static final long serialVersionUID = -2772367477755473248L;
+
+   /** The logger */
+   private static final Logger log = Logger.getLogger(JBMRAProperties.class);
+   
+   /** Trace enabled */
+   private static boolean trace = log.isTraceEnabled();
+
+   /** The discovery group name */
+   private String discoveryGroupName;
+
+   /** The discovery group port */
+   private Integer discoveryGroupPort;
+
+   /** */
+   private Long discoveryRefreshTimeout;
+   
+   /** */
+   private Long discoveryInitialWaitTimeout;
+
+   /** */
+   private String loadBalancingPolicyClassName;
+
+   /** */
+   private Long pingPeriod;
+
+   /** */
+   private Long connectionTTL;
+
+   /** */
+   private Long callTimeout;
+
+   /** */
+   private Integer dupsOKBatchSize;
+
+   /** */
+   private Integer transactionBatchSize;
+
+   /** */
+   private Integer consumerWindowSize;
+
+   /** */
+   private Integer consumerMaxRate;
+
+   /** */
+   private Integer sendWindowSize;
+
+   /** */
+   private Integer producerMaxRate;
+
+   /** */
+   private Integer minLargeMessageSize;
+
+   /** */
+   private Boolean blockOnAcknowledge;
+
+   /** */
+   private Boolean blockOnNonPersistentSend;
+
+   /** */
+   private Boolean blockOnPersistentSend;
+
+   /** */
+   private Boolean autoGroup;
+
+   /** */
+   private Integer maxConnections;
+
+   /** */
+   private Boolean preAcknowledge;
+
+   /** */
+   private Long retryInterval;
+
+   /** */
+   private Double retryIntervalMultiplier;
+
+   /** */
+   private Integer maxRetriesBeforeFailover;
+
+   /** */
+   private Integer maxRetriesAfterFailover;
+
+   /** The user name */
+   private String userName;
+
+   /** The password */
+   private String password;
+
+   /** The client ID */
+   private String clientID;
+
+   /** Use XA */
+   private Boolean useXA;
+
+   /**
+    * Constructor
+    */
+   public JBMRAProperties()
+   {
+      if (trace)
+         log.trace("constructor()");
+
+      discoveryGroupName = null;
+      discoveryGroupPort = null;
+      discoveryRefreshTimeout = null;
+      discoveryInitialWaitTimeout = null;
+      loadBalancingPolicyClassName = null;
+      pingPeriod = null;
+      connectionTTL = null;
+      callTimeout = null;
+      dupsOKBatchSize = null;
+      transactionBatchSize = null;
+      consumerWindowSize = null;
+      consumerMaxRate = null;
+      sendWindowSize = null;
+      producerMaxRate = null;
+      minLargeMessageSize = null;
+      blockOnAcknowledge = null;
+      blockOnNonPersistentSend = null;
+      blockOnPersistentSend = null;
+      autoGroup = null;
+      maxConnections = null;
+      preAcknowledge = null;
+      retryInterval = null;
+      retryIntervalMultiplier = null;
+      maxRetriesBeforeFailover = null;
+      maxRetriesAfterFailover = null;
+      userName = null;
+      password = null;
+      clientID = null;
+      useXA = null;
+   }
+   
+   /**
+    * Get the discovery group name
+    * @return The value
+    */
+   public String getDiscoveryGroupName()
+   {
+      if (trace)
+         log.trace("getDiscoveryGroupName()");
+
+      return discoveryGroupName;
+   }
+
+   /**
+    * Set the discovery group name
+    * @param dgn The value
+    */
+   public void setDiscoveryGroupName(String dgn)
+   {
+      if (trace)
+         log.trace("setDiscoveryGroupName(" + dgn + ")");
+
+      discoveryGroupName = dgn;
+   }
+
+   /**
+    * Get the discovery group port
+    * @return The value
+    */
+   public Integer getDiscoveryGroupPort()
+   {
+      if (trace)
+         log.trace("getDiscoveryGroupPort()");
+
+      return discoveryGroupPort;
+   }
+
+   /**
+    * Set the discovery group port
+    * @param dgp The value
+    */
+   public void setDiscoveryGroupPort(Integer dgp)
+   {
+      if (trace)
+         log.trace("setDiscoveryGroupPort(" + dgp + ")");
+
+      discoveryGroupPort = dgp;
+   }
+
+   /**
+    * Get discovery refresh timeout
+    * @return The value
+    */
+   public Long getDiscoveryRefreshTimeout()
+   {
+      if (trace)
+         log.trace("getDiscoveryRefreshTimeout()");
+
+      return discoveryRefreshTimeout;
+   }
+
+   /**
+    * Set discovery refresh timeout
+    * @param discoveryRefreshTimeout The value
+    */
+   public void setDiscoveryRefreshTimeout(Long discoveryRefreshTimeout)
+   {
+      if (trace)
+         log.trace("setDiscoveryRefreshTimeout(" + discoveryRefreshTimeout + ")");
+
+      this.discoveryRefreshTimeout = discoveryRefreshTimeout;
+   }
+
+   /**
+    * Get discovery initial wait timeout
+    * @return The value
+    */
+   public Long getDiscoveryInitialWaitTimeout()
+   {
+      if (trace)
+         log.trace("getDiscoveryInitialWaitTimeout()");
+
+      return discoveryInitialWaitTimeout;
+   }
+
+   /**
+    * Set discovery initial wait timeout
+    * @param discoveryInitialWaitTimeout The value
+    */
+   public void setDiscoveryInitialWaitTimeout(Long discoveryInitialWaitTimeout)
+   {
+      if (trace)
+         log.trace("setDiscoveryInitialWaitTimeout(" + discoveryInitialWaitTimeout + ")");
+
+      this.discoveryInitialWaitTimeout = discoveryInitialWaitTimeout;
+   }
+
+   /**
+    * Get load balancing policy class name
+    * @return The value
+    */
+   public String getLoadBalancingPolicyClassName()
+   {
+      if (trace)
+         log.trace("getLoadBalancingPolicyClassName()");
+
+      return loadBalancingPolicyClassName;
+   }
+
+   /**
+    * Set load balancing policy class name
+    * @param loadBalancingPolicyClassName The value
+    */
+   public void setLoadBalancingPolicyClassName(String loadBalancingPolicyClassName)
+   {
+      if (trace)
+         log.trace("setLoadBalancingPolicyClassName(" + loadBalancingPolicyClassName + ")");
+
+      this.loadBalancingPolicyClassName = loadBalancingPolicyClassName;
+   }
+
+   /**
+    * Get ping period
+    * @return The value
+    */
+   public Long getPingPeriod()
+   {
+      if (trace)
+         log.trace("getPingPeriod()");
+
+      return pingPeriod;
+   }
+
+   /**
+    * Set ping period
+    * @param pingPeriod The value
+    */
+   public void setPingPeriod(Long pingPeriod)
+   {
+      if (trace)
+         log.trace("setPingPeriod(" + pingPeriod + ")");
+
+      this.pingPeriod = pingPeriod;
+   }
+
+   /**
+    * Get connection TTL
+    * @return The value
+    */
+   public Long getConnectionTTL()
+   {
+      if (trace)
+         log.trace("getConnectionTTL()");
+
+      return connectionTTL;
+   }
+
+   /**
+    * Set connection TTL
+    * @param connectionTTL The value
+    */
+   public void setConnectionTTL(Long connectionTTL)
+   {
+      if (trace)
+         log.trace("setConnectionTTL(" + connectionTTL + ")");
+
+      this.connectionTTL = connectionTTL;
+   }
+
+   /**
+    * Get call timeout
+    * @return The value
+    */
+   public Long getCallTimeout()
+   {
+      if (trace)
+         log.trace("getCallTimeout()");
+
+      return callTimeout;
+   }
+
+   /**
+    * Set call timeout
+    * @param callTimeout The value
+    */
+   public void setCallTimeout(Long callTimeout)
+   {
+      if (trace)
+         log.trace("setCallTimeout(" + callTimeout + ")");
+
+      this.callTimeout = callTimeout;
+   }
+
+   /**
+    * Get dups ok batch size
+    * @return The value
+    */
+   public Integer getDupsOKBatchSize()
+   {
+      if (trace)
+         log.trace("getDupsOKBatchSize()");
+
+      return dupsOKBatchSize;
+   }
+
+   /**
+    * Set dups ok batch size
+    * @param dupsOKBatchSize The value
+    */
+   public void setDupsOKBatchSize(Integer dupsOKBatchSize)
+   {
+      if (trace)
+         log.trace("setDupsOKBatchSize(" + dupsOKBatchSize + ")");
+
+      this.dupsOKBatchSize = dupsOKBatchSize;
+   }
+
+   /**
+    * Get transaction batch size
+    * @return The value
+    */
+   public Integer getTransactionBatchSize()
+   {
+      if (trace)
+         log.trace("getTransactionBatchSize()");
+
+      return transactionBatchSize;
+   }
+
+   /**
+    * Set transaction batch size
+    * @param transactionBatchSize The value
+    */
+   public void setTransactionBatchSize(Integer transactionBatchSize)
+   {
+      if (trace)
+         log.trace("setTransactionBatchSize(" + transactionBatchSize + ")");
+
+      this.transactionBatchSize = transactionBatchSize;
+   }
+
+   /**
+    * Get consumer window size
+    * @return The value
+    */
+   public Integer getConsumerWindowSize()
+   {
+      if (trace)
+         log.trace("getConsumerWindowSize()");
+
+      return consumerWindowSize;
+   }
+
+   /**
+    * Set consumer window size
+    * @param consumerWindowSize The value
+    */
+   public void setConsumerWindowSize(Integer consumerWindowSize)
+   {
+      if (trace)
+         log.trace("setConsumerWindowSize(" + consumerWindowSize + ")");
+
+      this.consumerWindowSize = consumerWindowSize;
+   }
+
+   /**
+    * Get consumer max rate
+    * @return The value
+    */
+   public Integer getConsumerMaxRate()
+   {
+      if (trace)
+         log.trace("getConsumerMaxRate()");
+
+      return consumerMaxRate;
+   }
+
+   /**
+    * Set consumer max rate
+    * @param consumerMaxRate The value
+    */
+   public void setConsumerMaxRate(Integer consumerMaxRate)
+   {
+      if (trace)
+         log.trace("setConsumerMaxRate(" + consumerMaxRate + ")");
+
+      this.consumerMaxRate = consumerMaxRate;
+   }
+
+   /**
+    * Get send window size
+    * @return The value
+    */
+   public Integer getSendWindowSize()
+   {
+      if (trace)
+         log.trace("getSendWindowSize()");
+
+      return sendWindowSize;
+   }
+
+   /**
+    * Set send window size
+    * @param sendWindowSize The value
+    */
+   public void setSendWindowSize(Integer sendWindowSize)
+   {
+      if (trace)
+         log.trace("setSendWindowSize(" + sendWindowSize + ")");
+
+      this.sendWindowSize = sendWindowSize;
+   }
+
+   /**
+    * Get producer max rate
+    * @return The value
+    */
+   public Integer getProducerMaxRate()
+   {
+      if (trace)
+         log.trace("getProducerMaxRate()");
+
+      return producerMaxRate;
+   }
+
+   /**
+    * Set producer max rate
+    * @param producerMaxRate The value
+    */
+   public void setProducerMaxRate(Integer producerMaxRate)
+   {
+      if (trace)
+         log.trace("setProducerMaxRate(" + producerMaxRate + ")");
+
+      this.producerMaxRate = producerMaxRate;
+   }
+
+   /**
+    * Get min large message size
+    * @return The value
+    */
+   public Integer getMinLargeMessageSize()
+   {
+      if (trace)
+         log.trace("getMinLargeMessageSize()");
+
+      return minLargeMessageSize;
+   }
+
+   /**
+    * Set min large message size
+    * @param minLargeMessageSize The value
+    */
+   public void setMinLargeMessageSize(Integer minLargeMessageSize)
+   {
+      if (trace)
+         log.trace("setMinLargeMessageSize(" + minLargeMessageSize + ")");
+
+      this.minLargeMessageSize = minLargeMessageSize;
+   }
+
+   /**
+    * Get block on acknowledge
+    * @return The value
+    */
+   public Boolean getBlockOnAcknowledge()
+   {
+      if (trace)
+         log.trace("getBlockOnAcknowledge()");
+
+      return blockOnAcknowledge;
+   }
+
+   /**
+    * Set block on acknowledge
+    * @param blockOnAcknowledge The value
+    */
+   public void setBlockOnAcknowledge(Boolean blockOnAcknowledge)
+   {
+      if (trace)
+         log.trace("setBlockOnAcknowledge(" + blockOnAcknowledge + ")");
+
+      this.blockOnAcknowledge = blockOnAcknowledge;
+   }
+
+   /**
+    * Get block on non persistent send
+    * @return The value
+    */
+   public Boolean getBlockOnNonPersistentSend()
+   {
+      if (trace)
+         log.trace("getBlockOnNonPersistentSend()");
+
+      return blockOnNonPersistentSend;
+   }
+
+   /**
+    * Set block on non persistent send
+    * @param blockOnNonPersistentSend The value
+    */
+   public void setBlockOnNonPersistentSend(Boolean blockOnNonPersistentSend)
+   {
+      if (trace)
+         log.trace("setBlockOnNonPersistentSend(" + blockOnNonPersistentSend + ")");
+
+      this.blockOnNonPersistentSend = blockOnNonPersistentSend;
+   }
+
+   /**
+    * Get block on persistent send
+    * @return The value
+    */
+   public Boolean getBlockOnPersistentSend()
+   {
+      if (trace)
+         log.trace("getBlockOnPersistentSend()");
+
+      return blockOnPersistentSend;
+   }
+
+   /**
+    * Set block on persistent send
+    * @param blockOnPersistentSend The value
+    */
+   public void setBlockOnPersistentSend(Boolean blockOnPersistentSend)
+   {
+      if (trace)
+         log.trace("setBlockOnPersistentSend(" + blockOnPersistentSend + ")");
+
+      this.blockOnPersistentSend = blockOnPersistentSend;
+   }
+
+   /**
+    * Get auto group
+    * @return The value
+    */
+   public Boolean getAutoGroup()
+   {
+      if (trace)
+         log.trace("getAutoGroup()");
+
+      return autoGroup;
+   }
+
+   /**
+    * Set auto group
+    * @param autoGroup The value
+    */
+   public void setAutoGroup(Boolean autoGroup)
+   {
+      if (trace)
+         log.trace("setAutoGroup(" + autoGroup + ")");
+
+      this.autoGroup = autoGroup;
+   }
+
+   /**
+    * Get max connections
+    * @return The value
+    */
+   public Integer getMaxConnections()
+   {
+      if (trace)
+         log.trace("getMaxConnections()");
+
+      return maxConnections;
+   }
+
+   /**
+    * Set max connections
+    * @param maxConnections The value
+    */
+   public void setMaxConnections(Integer maxConnections)
+   {
+      if (trace)
+         log.trace("setMaxConnections(" + maxConnections + ")");
+
+      this.maxConnections = maxConnections;
+   }
+
+   /**
+    * Get pre acknowledge
+    * @return The value
+    */
+   public Boolean getPreAcknowledge()
+   {
+      if (trace)
+         log.trace("getPreAcknowledge()");
+
+      return preAcknowledge;
+   }
+
+   /**
+    * Set pre acknowledge
+    * @param preAcknowledge The value
+    */
+   public void setPreAcknowledge(Boolean preAcknowledge)
+   {
+      if (trace)
+         log.trace("setPreAcknowledge(" + preAcknowledge + ")");
+
+      this.preAcknowledge = preAcknowledge;
+   }
+
+   /**
+    * Get retry interval
+    * @return The value
+    */
+   public Long getRetryInterval()
+   {
+      if (trace)
+         log.trace("getRetryInterval()");
+
+      return retryInterval;
+   }
+
+   /**
+    * Set retry interval
+    * @param retryInterval The value
+    */
+   public void setRetryInterval(Long retryInterval)
+   {
+      if (trace)
+         log.trace("setRetryInterval(" + retryInterval + ")");
+
+      this.retryInterval = retryInterval;
+   }
+
+   /**
+    * Get retry interval multiplier
+    * @return The value
+    */
+   public Double getRetryIntervalMultiplier()
+   {
+      if (trace)
+         log.trace("getRetryIntervalMultiplier()");
+
+      return retryIntervalMultiplier;
+   }
+
+   /**
+    * Set retry interval multiplier
+    * @param retryIntervalMultiplier The value
+    */
+   public void setRetryIntervalMultiplier(Double retryIntervalMultiplier)
+   {
+      if (trace)
+         log.trace("setRetryIntervalMultiplier(" + retryIntervalMultiplier + ")");
+
+      this.retryIntervalMultiplier = retryIntervalMultiplier;
+   }
+
+   /**
+    * Get max retries before failover
+    * @return The value
+    */
+   public Integer getMaxRetriesBeforeFailover()
+   {
+      if (trace)
+         log.trace("getMaxRetriesBeforeFailover()");
+
+      return maxRetriesBeforeFailover;
+   }
+
+   /**
+    * Set max retries before failover
+    * @param maxRetriesBeforeFailover The value
+    */
+   public void setMaxRetriesBeforeFailover(Integer maxRetriesBeforeFailover)
+   {
+      if (trace)
+         log.trace("setMaxRetriesBeforeFailover(" + maxRetriesBeforeFailover + ")");
+
+      this.maxRetriesBeforeFailover = maxRetriesBeforeFailover;
+   }
+
+   /**
+    * Get max retries after failover
+    * @return The value
+    */
+   public Integer getMaxRetriesAfterFailover()
+   {
+      if (trace)
+         log.trace("getMaxRetriesAfterFailover()");
+
+      return maxRetriesAfterFailover;
+   }
+
+   /**
+    * Set max retries after failover
+    * @param maxRetriesAfterFailover The value
+    */
+   public void setMaxRetriesAfterFailover(Integer maxRetriesAfterFailover)
+   {
+      if (trace)
+         log.trace("setMaxRetriesAfterFailover(" + maxRetriesAfterFailover + ")");
+
+      this.maxRetriesAfterFailover = maxRetriesAfterFailover;
+   }
+
+   /**
+    * Get the user name
+    * @return The value
+    */
+   public String getUserName()
+   {
+      if (trace)
+         log.trace("getUserName()");
+
+      return userName;
+   }
+
+   /**
+    * Set the user name
+    * @param userName The value
+    */
+   public void setUserName(String userName)
+   {
+      if (trace)
+         log.trace("setUserName(" + userName + ")");
+
+      this.userName = userName;
+   }
+  
+   /**
+    * Get the password
+    * @return The value
+    */
+   public String getPassword()
+   {
+      if (trace)
+         log.trace("getPassword()");
+
+      return password;
+   }
+
+   /**
+    * Set the password
+    * @param password The value
+    */
+   public void setPassword(String password)
+   {
+      if (trace)
+         log.trace("setPassword(****)");
+
+      this.password = password;
+   }
+  
+   /**
+    * Get the client id
+    * @return The value
+    */
+   public String getClientID()
+   {
+      if (trace)
+         log.trace("getClientID()");
+
+      return clientID;
+   }
+
+   /**
+    * Set the client id
+    * @param clientID The value
+    */
+   public void setClientID(String clientID)
+   {
+      if (trace)
+         log.trace("setClientID(" + clientID + ")");
+
+      this.clientID = clientID;
+   }
+  
+   /**
+    * Get the use XA flag
+    * @return The value
+    */
+   public Boolean getUseXA()
+   {
+      if (trace)
+         log.trace("getUseXA()");
+
+      return useXA;
+   }
+
+   /**
+    * Set the use XA flag
+    * @param xa The value
+    */
+   public void setUseXA(Boolean xa)
+   {
+      if (trace)
+         log.trace("setUseXA(" + xa + ")");
+
+      this.useXA = xa;
+   }
+
+   /**
+    * Use XA for communication
+    * @return The value
+    */
+   public boolean isUseXA()
+   {
+      if (trace)
+         log.trace("isUseXA()");
+
+      if (useXA == null)
+         return false;
+
+      return useXA.booleanValue();
+   }
+
+   /**
+    * Indicates whether some other object is "equal to" this one.
+    * @param obj Object with which to compare
+    * @return True if this object is the same as the obj argument; false otherwise.
+    */
+   public boolean equals(Object obj)
+   {
+      if (trace)
+         log.trace("equals(" + obj + ")");
+
+      if (obj == null) 
+         return false;
+    
+      if (obj instanceof JBMRAProperties)
+      {
+         JBMRAProperties you = (JBMRAProperties) obj;
+         return (Util.compare(discoveryGroupName, you.getDiscoveryGroupName()) &&
+                 Util.compare(discoveryGroupPort, you.getDiscoveryGroupPort()) &&
+                 Util.compare(discoveryRefreshTimeout, you.getDiscoveryRefreshTimeout()) &&
+                 Util.compare(discoveryInitialWaitTimeout, you.getDiscoveryInitialWaitTimeout()) &&
+                 Util.compare(loadBalancingPolicyClassName, you.getLoadBalancingPolicyClassName()) &&
+                 Util.compare(pingPeriod, you.getPingPeriod()) &&
+                 Util.compare(connectionTTL, you.getConnectionTTL()) &&
+                 Util.compare(callTimeout, you.getCallTimeout()) &&
+                 Util.compare(dupsOKBatchSize, you.getDupsOKBatchSize()) &&
+                 Util.compare(transactionBatchSize, you.getTransactionBatchSize()) &&
+                 Util.compare(consumerWindowSize, you.getConsumerWindowSize()) &&
+                 Util.compare(consumerMaxRate, you.getConsumerMaxRate()) &&
+                 Util.compare(sendWindowSize, you.getSendWindowSize()) &&
+                 Util.compare(producerMaxRate, you.getProducerMaxRate()) &&
+                 Util.compare(minLargeMessageSize, you.getMinLargeMessageSize()) &&
+                 Util.compare(blockOnAcknowledge, you.getBlockOnAcknowledge()) &&
+                 Util.compare(blockOnNonPersistentSend, you.getBlockOnNonPersistentSend()) &&
+                 Util.compare(blockOnPersistentSend, you.getBlockOnPersistentSend()) &&
+                 Util.compare(autoGroup, you.getAutoGroup()) &&
+                 Util.compare(maxConnections, you.getMaxConnections()) &&
+                 Util.compare(preAcknowledge, you.getPreAcknowledge()) &&
+                 Util.compare(retryInterval, you.getRetryInterval()) &&
+                 Util.compare(retryIntervalMultiplier, you.getRetryIntervalMultiplier()) &&
+                 Util.compare(maxRetriesBeforeFailover, you.getMaxRetriesBeforeFailover()) &&
+                 Util.compare(maxRetriesAfterFailover, you.getMaxRetriesAfterFailover()) &&
+                 Util.compare(userName, you.getUserName()) &&
+                 Util.compare(password, you.getPassword()) &&
+                 Util.compare(clientID, you.getClientID()) &&
+                 Util.compare(useXA, you.getUseXA()));
+      }
+    
+      return false;
+   }
+  
+   /**
+    * Return the hash code for the object
+    * @return The hash code
+    */
+   public int hashCode()
+   {
+      if (trace)
+         log.trace("hashCode()");
+
+      int hash = 7;
+
+      hash += 31 * hash + (discoveryGroupName != null ? discoveryGroupName.hashCode() : 0);
+      hash += 31 * hash + (discoveryGroupPort != null ? discoveryGroupPort.hashCode() : 0);
+      hash += 31 * hash + (discoveryRefreshTimeout != null ? discoveryRefreshTimeout.hashCode() : 0);
+      hash += 31 * hash + (discoveryInitialWaitTimeout != null ? discoveryInitialWaitTimeout.hashCode() : 0);
+      hash += 31 * hash + (loadBalancingPolicyClassName != null ? loadBalancingPolicyClassName.hashCode() : 0);
+      hash += 31 * hash + (pingPeriod != null ? pingPeriod.hashCode() : 0);
+      hash += 31 * hash + (connectionTTL != null ? connectionTTL.hashCode() : 0);
+      hash += 31 * hash + (callTimeout != null ? callTimeout.hashCode() : 0);
+      hash += 31 * hash + (dupsOKBatchSize != null ? dupsOKBatchSize.hashCode() : 0);
+      hash += 31 * hash + (transactionBatchSize != null ? transactionBatchSize.hashCode() : 0);
+      hash += 31 * hash + (consumerWindowSize != null ? consumerWindowSize.hashCode() : 0);
+      hash += 31 * hash + (consumerMaxRate != null ? consumerMaxRate.hashCode() : 0);
+      hash += 31 * hash + (sendWindowSize != null ? sendWindowSize.hashCode() : 0);
+      hash += 31 * hash + (producerMaxRate != null ? producerMaxRate.hashCode() : 0);
+      hash += 31 * hash + (minLargeMessageSize != null ? minLargeMessageSize.hashCode() : 0);
+      hash += 31 * hash + (blockOnAcknowledge != null ? blockOnAcknowledge.hashCode() : 0);
+      hash += 31 * hash + (blockOnNonPersistentSend != null ? blockOnNonPersistentSend.hashCode() : 0);
+      hash += 31 * hash + (blockOnPersistentSend != null ? blockOnPersistentSend.hashCode() : 0);
+      hash += 31 * hash + (autoGroup != null ? autoGroup.hashCode() : 0);
+      hash += 31 * hash + (maxConnections != null ? maxConnections.hashCode() : 0);
+      hash += 31 * hash + (preAcknowledge != null ? preAcknowledge.hashCode() : 0);
+      hash += 31 * hash + (retryInterval != null ? retryInterval.hashCode() : 0);
+      hash += 31 * hash + (retryIntervalMultiplier != null ? retryIntervalMultiplier.hashCode() : 0);
+      hash += 31 * hash + (maxRetriesBeforeFailover != null ? maxRetriesBeforeFailover.hashCode() : 0);
+      hash += 31 * hash + (maxRetriesAfterFailover != null ? maxRetriesAfterFailover.hashCode() : 0);
+      hash += 31 * hash + (userName != null ? userName.hashCode() : 0);
+      hash += 31 * hash + (password != null ? password.hashCode() : 0);
+      hash += 31 * hash + (clientID != null ? clientID.hashCode() : 0);
+      hash += 31 * hash + (useXA != null ? useXA.hashCode() : 0);
+
+      return hash;
+   }
+}

Modified: trunk/src/main/org/jboss/messaging/ra/JBMResourceAdapter.java
===================================================================
--- trunk/src/main/org/jboss/messaging/ra/JBMResourceAdapter.java	2009-02-04 18:16:58 UTC (rev 5809)
+++ trunk/src/main/org/jboss/messaging/ra/JBMResourceAdapter.java	2009-02-04 20:56:10 UTC (rev 5810)
@@ -21,6 +21,8 @@
  */
 package org.jboss.messaging.ra;
 
+import java.util.concurrent.atomic.AtomicBoolean;
+
 import javax.resource.NotSupportedException;
 import javax.resource.ResourceException;
 import javax.resource.spi.ActivationSpec;
@@ -31,6 +33,7 @@
 import javax.transaction.xa.XAResource;
 
 import org.jboss.messaging.core.logging.Logger;
+import org.jboss.messaging.jms.client.JBossConnectionFactory;
 
 /**
  * The resource adapter for JBoss Messaging
@@ -47,12 +50,18 @@
    /** Trace enabled */
    private static boolean trace = log.isTraceEnabled();
 
-   /** Hash code */
-   private static final int HASH_CODE = 0x42;
-
    /** The bootstrap context */
    private BootstrapContext ctx;
 
+   /** The resource adapter properties */
+   private JBMRAProperties raProperties;
+
+   /** The JBoss connection factory */
+   private JBossConnectionFactory factory;
+   
+   /** Have the factory been configured */
+   private AtomicBoolean configured;
+
    /**
     * Constructor
     */
@@ -60,6 +69,10 @@
    {
       if (trace)
          log.trace("constructor()");
+
+      raProperties = new JBMRAProperties();
+      factory = null;
+      configured = new AtomicBoolean(false);
    }
 
    public void endpointActivation(MessageEndpointFactory endpointFactory, ActivationSpec spec) throws ResourceException
@@ -103,29 +116,849 @@
    }
 
    /**
+    * Get the discovery group name
+    * @return The value
+    */
+   public String getDiscoveryGroupName()
+   {
+      if (trace)
+         log.trace("getDiscoveryGroupName()");
+
+      return raProperties.getDiscoveryGroupName();
+   }
+
+   /**
+    * Set the discovery group name
+    * @param dgn The value
+    */
+   public void setDiscoveryGroupName(String dgn)
+   {
+      if (trace)
+         log.trace("setDiscoveryGroupName(" + dgn + ")");
+
+      raProperties.setDiscoveryGroupName(dgn);
+   }
+
+   /**
+    * Get the discovery group port
+    * @return The value
+    */
+   public Integer getDiscoveryGroupPort()
+   {
+      if (trace)
+         log.trace("getDiscoveryGroupPort()");
+
+      return raProperties.getDiscoveryGroupPort();
+   }
+
+   /**
+    * Set the discovery group port
+    * @param dgp The value
+    */
+   public void setDiscoveryGroupPort(Integer dgp)
+   {
+      if (trace)
+         log.trace("setDiscoveryGroupPort(" + dgp + ")");
+
+      raProperties.setDiscoveryGroupPort(dgp);
+   }
+
+   /**
+    * Get discovery refresh timeout
+    * @return The value
+    */
+   public Long getDiscoveryRefreshTimeout()
+   {
+      if (trace)
+         log.trace("getDiscoveryRefreshTimeout()");
+
+      return raProperties.getDiscoveryRefreshTimeout();
+   }
+
+   /**
+    * Set discovery refresh timeout
+    * @param discoveryRefreshTimeout The value
+    */
+   public void setDiscoveryRefreshTimeout(Long discoveryRefreshTimeout)
+   {
+      if (trace)
+         log.trace("setDiscoveryRefreshTimeout(" + discoveryRefreshTimeout + ")");
+
+      raProperties.setDiscoveryRefreshTimeout(discoveryRefreshTimeout);
+   }
+
+   /**
+    * Get discovery initial wait timeout
+    * @return The value
+    */
+   public Long getDiscoveryInitialWaitTimeout()
+   {
+      if (trace)
+         log.trace("getDiscoveryInitialWaitTimeout()");
+
+      return raProperties.getDiscoveryInitialWaitTimeout();
+   }
+
+   /**
+    * Set discovery initial wait timeout
+    * @param discoveryInitialWaitTimeout The value
+    */
+   public void setDiscoveryInitialWaitTimeout(Long discoveryInitialWaitTimeout)
+   {
+      if (trace)
+         log.trace("setDiscoveryInitialWaitTimeout(" + discoveryInitialWaitTimeout + ")");
+
+      raProperties.setDiscoveryInitialWaitTimeout(discoveryInitialWaitTimeout);
+   }
+
+   /**
+    * Get load balancing policy class name
+    * @return The value
+    */
+   public String getLoadBalancingPolicyClassName()
+   {
+      if (trace)
+         log.trace("getLoadBalancingPolicyClassName()");
+
+      return raProperties.getLoadBalancingPolicyClassName();
+   }
+
+   /**
+    * Set load balancing policy class name
+    * @param loadBalancingPolicyClassName The value
+    */
+   public void setLoadBalancingPolicyClassName(String loadBalancingPolicyClassName)
+   {
+      if (trace)
+         log.trace("setLoadBalancingPolicyClassName(" + loadBalancingPolicyClassName + ")");
+
+      raProperties.setLoadBalancingPolicyClassName(loadBalancingPolicyClassName);
+   }
+
+   /**
+    * Get ping period
+    * @return The value
+    */
+   public Long getPingPeriod()
+   {
+      if (trace)
+         log.trace("getPingPeriod()");
+
+      return raProperties.getPingPeriod();
+   }
+
+   /**
+    * Set ping period
+    * @param pingPeriod The value
+    */
+   public void setPingPeriod(Long pingPeriod)
+   {
+      if (trace)
+         log.trace("setPingPeriod(" + pingPeriod + ")");
+
+      raProperties.setPingPeriod(pingPeriod);
+   }
+
+   /**
+    * Get connection TTL
+    * @return The value
+    */
+   public Long getConnectionTTL()
+   {
+      if (trace)
+         log.trace("getConnectionTTL()");
+
+      return raProperties.getConnectionTTL();
+   }
+
+   /**
+    * Set connection TTL
+    * @param connectionTTL The value
+    */
+   public void setConnectionTTL(Long connectionTTL)
+   {
+      if (trace)
+         log.trace("setConnectionTTL(" + connectionTTL + ")");
+
+      raProperties.setConnectionTTL(connectionTTL);
+   }
+
+   /**
+    * Get call timeout
+    * @return The value
+    */
+   public Long getCallTimeout()
+   {
+      if (trace)
+         log.trace("getCallTimeout()");
+
+      return raProperties.getCallTimeout();
+   }
+
+   /**
+    * Set call timeout
+    * @param callTimeout The value
+    */
+   public void setCallTimeout(Long callTimeout)
+   {
+      if (trace)
+         log.trace("setCallTimeout(" + callTimeout + ")");
+
+      raProperties.setCallTimeout(callTimeout);
+   }
+
+   /**
+    * Get dups ok batch size
+    * @return The value
+    */
+   public Integer getDupsOKBatchSize()
+   {
+      if (trace)
+         log.trace("getDupsOKBatchSize()");
+
+      return raProperties.getDupsOKBatchSize();
+   }
+
+   /**
+    * Set dups ok batch size
+    * @param dupsOKBatchSize The value
+    */
+   public void setDupsOKBatchSize(Integer dupsOKBatchSize)
+   {
+      if (trace)
+         log.trace("setDupsOKBatchSize(" + dupsOKBatchSize + ")");
+
+      raProperties.setDupsOKBatchSize(dupsOKBatchSize);
+   }
+
+   /**
+    * Get transaction batch size
+    * @return The value
+    */
+   public Integer getTransactionBatchSize()
+   {
+      if (trace)
+         log.trace("getTransactionBatchSize()");
+
+      return raProperties.getTransactionBatchSize();
+   }
+
+   /**
+    * Set transaction batch size
+    * @param transactionBatchSize The value
+    */
+   public void setTransactionBatchSize(Integer transactionBatchSize)
+   {
+      if (trace)
+         log.trace("setTransactionBatchSize(" + transactionBatchSize + ")");
+
+      raProperties.setTransactionBatchSize(transactionBatchSize);
+   }
+
+   /**
+    * Get consumer window size
+    * @return The value
+    */
+   public Integer getConsumerWindowSize()
+   {
+      if (trace)
+         log.trace("getConsumerWindowSize()");
+
+      return raProperties.getConsumerWindowSize();
+   }
+
+   /**
+    * Set consumer window size
+    * @param consumerWindowSize The value
+    */
+   public void setConsumerWindowSize(Integer consumerWindowSize)
+   {
+      if (trace)
+         log.trace("setConsumerWindowSize(" + consumerWindowSize + ")");
+
+      raProperties.setConsumerWindowSize(consumerWindowSize);
+   }
+
+   /**
+    * Get consumer max rate
+    * @return The value
+    */
+   public Integer getConsumerMaxRate()
+   {
+      if (trace)
+         log.trace("getConsumerMaxRate()");
+
+      return raProperties.getConsumerMaxRate();
+   }
+
+   /**
+    * Set consumer max rate
+    * @param consumerMaxRate The value
+    */
+   public void setConsumerMaxRate(Integer consumerMaxRate)
+   {
+      if (trace)
+         log.trace("setConsumerMaxRate(" + consumerMaxRate + ")");
+
+      raProperties.setConsumerMaxRate(consumerMaxRate);
+   }
+
+   /**
+    * Get send window size
+    * @return The value
+    */
+   public Integer getSendWindowSize()
+   {
+      if (trace)
+         log.trace("getSendWindowSize()");
+
+      return raProperties.getSendWindowSize();
+   }
+
+   /**
+    * Set send window size
+    * @param sendWindowSize The value
+    */
+   public void setSendWindowSize(Integer sendWindowSize)
+   {
+      if (trace)
+         log.trace("setSendWindowSize(" + sendWindowSize + ")");
+
+      raProperties.setSendWindowSize(sendWindowSize);
+   }
+
+   /**
+    * Get producer max rate
+    * @return The value
+    */
+   public Integer getProducerMaxRate()
+   {
+      if (trace)
+         log.trace("getProducerMaxRate()");
+
+      return raProperties.getProducerMaxRate();
+   }
+
+   /**
+    * Set producer max rate
+    * @param producerMaxRate The value
+    */
+   public void setProducerMaxRate(Integer producerMaxRate)
+   {
+      if (trace)
+         log.trace("setProducerMaxRate(" + producerMaxRate + ")");
+
+      raProperties.setProducerMaxRate(producerMaxRate);
+   }
+
+   /**
+    * Get min large message size
+    * @return The value
+    */
+   public Integer getMinLargeMessageSize()
+   {
+      if (trace)
+         log.trace("getMinLargeMessageSize()");
+
+      return raProperties.getMinLargeMessageSize();
+   }
+
+   /**
+    * Set min large message size
+    * @param minLargeMessageSize The value
+    */
+   public void setMinLargeMessageSize(Integer minLargeMessageSize)
+   {
+      if (trace)
+         log.trace("setMinLargeMessageSize(" + minLargeMessageSize + ")");
+
+      raProperties.setMinLargeMessageSize(minLargeMessageSize);
+   }
+
+   /**
+    * Get block on acknowledge
+    * @return The value
+    */
+   public Boolean getBlockOnAcknowledge()
+   {
+      if (trace)
+         log.trace("getBlockOnAcknowledge()");
+
+      return raProperties.getBlockOnAcknowledge();
+   }
+
+   /**
+    * Set block on acknowledge
+    * @param blockOnAcknowledge The value
+    */
+   public void setBlockOnAcknowledge(Boolean blockOnAcknowledge)
+   {
+      if (trace)
+         log.trace("setBlockOnAcknowledge(" + blockOnAcknowledge + ")");
+
+      raProperties.setBlockOnAcknowledge(blockOnAcknowledge);
+   }
+
+   /**
+    * Get block on non persistent send
+    * @return The value
+    */
+   public Boolean getBlockOnNonPersistentSend()
+   {
+      if (trace)
+         log.trace("getBlockOnNonPersistentSend()");
+
+      return raProperties.getBlockOnNonPersistentSend();
+   }
+
+   /**
+    * Set block on non persistent send
+    * @param blockOnNonPersistentSend The value
+    */
+   public void setBlockOnNonPersistentSend(Boolean blockOnNonPersistentSend)
+   {
+      if (trace)
+         log.trace("setBlockOnNonPersistentSend(" + blockOnNonPersistentSend + ")");
+
+      raProperties.setBlockOnNonPersistentSend(blockOnNonPersistentSend);
+   }
+
+   /**
+    * Get block on persistent send
+    * @return The value
+    */
+   public Boolean getBlockOnPersistentSend()
+   {
+      if (trace)
+         log.trace("getBlockOnPersistentSend()");
+
+      return raProperties.getBlockOnPersistentSend();
+   }
+
+   /**
+    * Set block on persistent send
+    * @param blockOnPersistentSend The value
+    */
+   public void setBlockOnPersistentSend(Boolean blockOnPersistentSend)
+   {
+      if (trace)
+         log.trace("setBlockOnPersistentSend(" + blockOnPersistentSend + ")");
+
+      raProperties.setBlockOnPersistentSend(blockOnPersistentSend);
+   }
+
+   /**
+    * Get auto group
+    * @return The value
+    */
+   public Boolean getAutoGroup()
+   {
+      if (trace)
+         log.trace("getAutoGroup()");
+
+      return raProperties.getAutoGroup();
+   }
+
+   /**
+    * Set auto group
+    * @param autoGroup The value
+    */
+   public void setAutoGroup(Boolean autoGroup)
+   {
+      if (trace)
+         log.trace("setAutoGroup(" + autoGroup + ")");
+
+      raProperties.setAutoGroup(autoGroup);
+   }
+
+   /**
+    * Get max connections
+    * @return The value
+    */
+   public Integer getMaxConnections()
+   {
+      if (trace)
+         log.trace("getMaxConnections()");
+
+      return raProperties.getMaxConnections();
+   }
+
+   /**
+    * Set max connections
+    * @param maxConnections The value
+    */
+   public void setMaxConnections(Integer maxConnections)
+   {
+      if (trace)
+         log.trace("setMaxConnections(" + maxConnections + ")");
+
+      raProperties.setMaxConnections(maxConnections);
+   }
+
+   /**
+    * Get pre acknowledge
+    * @return The value
+    */
+   public Boolean getPreAcknowledge()
+   {
+      if (trace)
+         log.trace("getPreAcknowledge()");
+
+      return raProperties.getPreAcknowledge();
+   }
+
+   /**
+    * Set pre acknowledge
+    * @param preAcknowledge The value
+    */
+   public void setPreAcknowledge(Boolean preAcknowledge)
+   {
+      if (trace)
+         log.trace("setPreAcknowledge(" + preAcknowledge + ")");
+
+      raProperties.setPreAcknowledge(preAcknowledge);
+   }
+
+   /**
+    * Get retry interval
+    * @return The value
+    */
+   public Long getRetryInterval()
+   {
+      if (trace)
+         log.trace("getRetryInterval()");
+
+      return raProperties.getRetryInterval();
+   }
+
+   /**
+    * Set retry interval
+    * @param retryInterval The value
+    */
+   public void setRetryInterval(Long retryInterval)
+   {
+      if (trace)
+         log.trace("setRetryInterval(" + retryInterval + ")");
+
+      raProperties.setRetryInterval(retryInterval);
+   }
+
+   /**
+    * Get retry interval multiplier
+    * @return The value
+    */
+   public Double getRetryIntervalMultiplier()
+   {
+      if (trace)
+         log.trace("getRetryIntervalMultiplier()");
+
+      return raProperties.getRetryIntervalMultiplier();
+   }
+
+   /**
+    * Set retry interval multiplier
+    * @param retryIntervalMultiplier The value
+    */
+   public void setRetryIntervalMultiplier(Double retryIntervalMultiplier)
+   {
+      if (trace)
+         log.trace("setRetryIntervalMultiplier(" + retryIntervalMultiplier + ")");
+
+      raProperties.setRetryIntervalMultiplier(retryIntervalMultiplier);
+   }
+
+   /**
+    * Get max retries before failover
+    * @return The value
+    */
+   public Integer getMaxRetriesBeforeFailover()
+   {
+      if (trace)
+         log.trace("getMaxRetriesBeforeFailover()");
+
+      return raProperties.getMaxRetriesBeforeFailover();
+   }
+
+   /**
+    * Set max retries before failover
+    * @param maxRetriesBeforeFailover The value
+    */
+   public void setMaxRetriesBeforeFailover(Integer maxRetriesBeforeFailover)
+   {
+      if (trace)
+         log.trace("setMaxRetriesBeforeFailover(" + maxRetriesBeforeFailover + ")");
+
+      raProperties.setMaxRetriesBeforeFailover(maxRetriesBeforeFailover);
+   }
+
+   /**
+    * Get max retries after failover
+    * @return The value
+    */
+   public Integer getMaxRetriesAfterFailover()
+   {
+      if (trace)
+         log.trace("getMaxRetriesAfterFailover()");
+
+      return raProperties.getMaxRetriesAfterFailover();
+   }
+
+   /**
+    * Set max retries after failover
+    * @param maxRetriesAfterFailover The value
+    */
+   public void setMaxRetriesAfterFailover(Integer maxRetriesAfterFailover)
+   {
+      if (trace)
+         log.trace("setMaxRetriesAfterFailover(" + maxRetriesAfterFailover + ")");
+
+      raProperties.setMaxRetriesAfterFailover(maxRetriesAfterFailover);
+   }
+
+   /**
+    * Get the user name
+    * @return The value
+    */
+   public String getUserName()
+   {
+      if (trace)
+         log.trace("getUserName()");
+
+      return raProperties.getUserName();
+   }
+
+   /**
+    * Set the user name
+    * @param userName The value
+    */
+   public void setUserName(String userName)
+   {
+      if (trace)
+         log.trace("setUserName(" + userName + ")");
+
+      raProperties.setUserName(userName);
+   }
+
+   /**
+    * Get the password
+    * @return The value
+    */
+   public String getPassword()
+   {
+      if (trace)
+         log.trace("getPassword()");
+
+      return raProperties.getPassword();
+   }
+
+   /**
+    * Set the password
+    * @param password The value
+    */
+   public void setPassword(String password)
+   {
+      if (trace)
+         log.trace("setPassword(****)");
+
+      raProperties.setPassword(password);
+   }
+   
+   /**
+    * Get the client ID
+    * @return The value
+    */
+   public String getClientID()
+   {
+      if (trace)
+         log.trace("getClientID()");
+
+      return raProperties.getClientID();
+   }
+
+   /**
+    * Set the client ID
+    * @param clientId The client id
+    */
+   public void setClientID(String clientID)
+   {
+      if (trace)
+         log.trace("setClientID(" + clientID + ")");
+
+      raProperties.setClientID(clientID);
+   }
+   
+   /**
+    * Get the use XA flag
+    * @return The value
+    */
+   public Boolean getUseXA()
+   {
+      if (trace)
+         log.trace("getUseXA()");
+
+      return raProperties.getUseXA();
+   }
+
+   /**
+    * Set the use XA flag
+    * @param xa The value
+    */
+   public void setUseXA(Boolean xa)
+   {
+      if (trace)
+         log.trace("setUseXA(" + xa + ")");
+
+      raProperties.setUseXA(xa);
+   }
+
+   /**
     * Indicates whether some other object is "equal to" this one.
     * @param obj Object with which to compare
     * @return True if this object is the same as the obj argument; false otherwise.
     */
-   public boolean equals(Object obj) {
+   public boolean equals(Object obj)
+   {
       if (trace)
          log.trace("equals(" + obj + ")");
 
-      if (!(obj instanceof JBMResourceAdapter)) {
+      if (obj == null)
          return false;
+
+      if (obj instanceof JBMResourceAdapter)
+      {
+         return raProperties.equals(((JBMResourceAdapter)obj).getProperties());
       }
+      else
+      {
+         return false;
+      }
+   }
 
-      return true;
-   }
-   
    /**
     * Return the hash code for the object
     * @return The hash code
     */
-   public int hashCode() {
+   public int hashCode()
+   {
       if (trace)
          log.trace("hashCode()");
 
-      return HASH_CODE;
+      return raProperties.hashCode();
    }
+
+   /**
+    * Get the JBoss connection factory
+    * @return The factory
+    */
+   protected JBossConnectionFactory getJBossConnectionFactory()
+   {
+      if (!configured.get()) {
+         setup();
+      }
+
+      return factory;
+   }
+
+   /**
+    * Get the resource adapter properties
+    * @return The properties
+    */
+   protected JBMRAProperties getProperties()
+   {
+      if (trace)
+         log.trace("getProperties()");
+
+      return raProperties;
+   }
+
+   /**
+    * Setup the factory
+    */
+   protected void setup()
+   {
+      if (getDiscoveryGroupName() != null &&
+          !getDiscoveryGroupName().trim().equals("") &&
+          getDiscoveryGroupPort() != null &&
+          getDiscoveryRefreshTimeout() != null &&
+          getDiscoveryInitialWaitTimeout() != null &&
+          getLoadBalancingPolicyClassName() != null &&
+          getPingPeriod() != null &&
+          getConnectionTTL() != null &&
+          getCallTimeout() != null &&
+          getClientID() != null &&
+          getDupsOKBatchSize() != null &&
+          getTransactionBatchSize() != null &&
+          getConsumerWindowSize() != null &&
+          getConsumerMaxRate() != null &&
+          getSendWindowSize() != null &&
+          getProducerMaxRate() != null &&
+          getMinLargeMessageSize() != null &&
+          getBlockOnAcknowledge() != null &&
+          getBlockOnNonPersistentSend() != null &&
+          getBlockOnPersistentSend() != null &&
+          getAutoGroup() != null &&
+          getMaxConnections() != null &&
+          getPreAcknowledge() != null &&
+          getRetryInterval() != null &&
+          getRetryIntervalMultiplier() != null &&
+          getMaxRetriesBeforeFailover() != null &&
+          getMaxRetriesAfterFailover() != null)
+      {
+         factory = new JBossConnectionFactory(getDiscoveryGroupName(), 
+                                              getDiscoveryGroupPort().intValue(),
+                                              getDiscoveryRefreshTimeout().longValue(),
+                                              getDiscoveryInitialWaitTimeout().longValue(),
+                                              getLoadBalancingPolicyClassName(),
+                                              getPingPeriod().longValue(),
+                                              getConnectionTTL().longValue(),
+                                              getCallTimeout().longValue(),
+                                              getClientID(),
+                                              getDupsOKBatchSize().intValue(),
+                                              getTransactionBatchSize().intValue(),
+                                              getConsumerWindowSize().intValue(),
+                                              getConsumerMaxRate().intValue(),
+                                              getSendWindowSize().intValue(),
+                                              getProducerMaxRate().intValue(),
+                                              getMinLargeMessageSize().intValue(),
+                                              getBlockOnAcknowledge().booleanValue(),
+                                              getBlockOnNonPersistentSend().booleanValue(),
+                                              getBlockOnPersistentSend().booleanValue(),
+                                              getAutoGroup().booleanValue(),
+                                              getMaxConnections().intValue(),
+                                              getPreAcknowledge().booleanValue(),
+                                              getRetryInterval().longValue(),
+                                              getRetryIntervalMultiplier().doubleValue(),
+                                              getMaxRetriesBeforeFailover().intValue(),
+                                              getMaxRetriesAfterFailover().intValue());
+
+         configured.set(true);
+
+      } else if (getDiscoveryGroupName() != null &&
+                 !getDiscoveryGroupName().trim().equals("") &&
+                 getDiscoveryGroupPort() != null &&
+                 getDiscoveryRefreshTimeout() != null &&
+                 getDiscoveryInitialWaitTimeout() != null)
+      {
+         factory = new JBossConnectionFactory(getDiscoveryGroupName(), 
+                                              getDiscoveryGroupPort().intValue(),
+                                              getDiscoveryRefreshTimeout().longValue(),
+                                              getDiscoveryInitialWaitTimeout().longValue());
+
+         configured.set(true);
+
+      } 
+      else if (getDiscoveryGroupName() != null &&
+               !getDiscoveryGroupName().trim().equals("") &&
+               getDiscoveryGroupPort() != null)
+      {
+         factory = new JBossConnectionFactory(getDiscoveryGroupName(), 
+                                              getDiscoveryGroupPort().intValue());
+
+         configured.set(true);
+      }
+      else
+      {
+         log.fatal("Unable to configure phsyical connection factory");
+      }
+   }
 }




More information about the jboss-cvs-commits mailing list