qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From wpr...@apache.org
Subject svn commit: r1326622 - in /qpid/trunk/qpid/java/jca/src/main: java/org/apache/qpid/ra/ resources/META-INF/
Date Mon, 16 Apr 2012 14:08:33 GMT
Author: wprice
Date: Mon Apr 16 14:08:32 2012
New Revision: 1326622

URL: http://svn.apache.org/viewvc?rev=1326622&view=rev
Log:
QPID-3749
    -General cleanup of ResourceAdapter
    -Removed unused methods
    -Fixed typos in ra.xml
    -Changed default connectionURL to remove guest/guest

Modified:
    qpid/trunk/qpid/java/jca/src/main/java/org/apache/qpid/ra/ConnectionFactoryProperties.java
    qpid/trunk/qpid/java/jca/src/main/java/org/apache/qpid/ra/QpidRAConnectionRequestInfo.java
    qpid/trunk/qpid/java/jca/src/main/java/org/apache/qpid/ra/QpidRAManagedConnectionFactory.java
    qpid/trunk/qpid/java/jca/src/main/java/org/apache/qpid/ra/QpidRAProperties.java
    qpid/trunk/qpid/java/jca/src/main/java/org/apache/qpid/ra/QpidRASessionFactoryImpl.java
    qpid/trunk/qpid/java/jca/src/main/java/org/apache/qpid/ra/QpidResourceAdapter.java
    qpid/trunk/qpid/java/jca/src/main/resources/META-INF/ra.xml

Modified: qpid/trunk/qpid/java/jca/src/main/java/org/apache/qpid/ra/ConnectionFactoryProperties.java
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/jca/src/main/java/org/apache/qpid/ra/ConnectionFactoryProperties.java?rev=1326622&r1=1326621&r2=1326622&view=diff
==============================================================================
--- qpid/trunk/qpid/java/jca/src/main/java/org/apache/qpid/ra/ConnectionFactoryProperties.java
(original)
+++ qpid/trunk/qpid/java/jca/src/main/java/org/apache/qpid/ra/ConnectionFactoryProperties.java
Mon Apr 16 14:08:32 2012
@@ -34,7 +34,7 @@ public class ConnectionFactoryProperties
 
    private boolean _hasBeenUpdated = false;
 
-   private String _clientID;
+   private String _clientId;
 
    private String _connectionURL;
 
@@ -56,7 +56,7 @@ public class ConnectionFactoryProperties
       {
          _log.trace("getClientID()");
       }
-      return _clientID;
+      return _clientId;
    }
 
    public void setClientId(final String clientID)
@@ -66,7 +66,7 @@ public class ConnectionFactoryProperties
          _log.trace("setClientID(" + clientID + ")");
       }
       _hasBeenUpdated = true;
-      this._clientID = clientID;
+      this._clientId = clientID;
    }
 
    public boolean isHasBeenUpdated()

Modified: qpid/trunk/qpid/java/jca/src/main/java/org/apache/qpid/ra/QpidRAConnectionRequestInfo.java
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/jca/src/main/java/org/apache/qpid/ra/QpidRAConnectionRequestInfo.java?rev=1326622&r1=1326621&r2=1326622&view=diff
==============================================================================
--- qpid/trunk/qpid/java/jca/src/main/java/org/apache/qpid/ra/QpidRAConnectionRequestInfo.java
(original)
+++ qpid/trunk/qpid/java/jca/src/main/java/org/apache/qpid/ra/QpidRAConnectionRequestInfo.java
Mon Apr 16 14:08:32 2012
@@ -45,7 +45,7 @@ public class QpidRAConnectionRequestInfo
    private String _password;
 
    /** The client id */
-   private String _clientID;
+   private String _clientId;
 
    /** The type */
    private final int _type;
@@ -76,13 +76,13 @@ public class QpidRAConnectionRequestInfo
          final ConnectionURL connectionURL = ra.getDefaultAMQConnectionFactory().getConnectionURL()
;
          _userName = connectionURL.getUsername();
          _password = connectionURL.getPassword();
-         _clientID = connectionURL.getClientName();
+         _clientId = connectionURL.getClientName();
       }
       else
       {
-         _userName = ra.getDefaultUserName();
-         _password = ra.getDefaultPassword();
-         _clientID = ra.getClientId();
+         _userName = ra.getUserName();
+         _password = ra.getPassword();
+         _clientId = ra.getClientId();
       }
       this._type = type;
       _transacted = true;
@@ -142,9 +142,9 @@ public class QpidRAConnectionRequestInfo
       {
          _password = connectionURL.getPassword();
       }
-      if (_clientID == null)
+      if (_clientId == null)
       {
-         _clientID = connectionURL.getClientName();
+         _clientId = connectionURL.getClientName();
       }
    }
 
@@ -170,15 +170,15 @@ public class QpidRAConnectionRequestInfo
       {
          if (_userName == null)
          {
-            _userName = ra.getDefaultUserName();
+            _userName = ra.getUserName();
          }
          if (_password == null)
          {
-            _password = ra.getDefaultPassword();
+            _password = ra.getPassword();
          }
-         if (_clientID == null)
+         if (_clientId == null)
          {
-            _clientID = ra.getClientId();
+            _clientId = ra.getClientId();
          }
       }
    }
@@ -243,28 +243,28 @@ public class QpidRAConnectionRequestInfo
     * Get the client id
     * @return The value
     */
-   public String getClientID()
+   public String getClientId()
    {
       if (_log.isTraceEnabled())
       {
          _log.trace("getClientID()");
       }
 
-      return _clientID;
+      return _clientId;
    }
 
    /**
     * Set the client id
     * @param clientID The value
     */
-   public void setClientID(final String clientID)
+   public void setClientId(final String clientID)
    {
       if (_log.isTraceEnabled())
       {
          _log.trace("setClientID(" + clientID + ")");
       }
 
-      this._clientID = clientID;
+      this._clientId = clientID;
    }
 
    /**
@@ -321,7 +321,7 @@ public class QpidRAConnectionRequestInfo
       {
          QpidRAConnectionRequestInfo you = (QpidRAConnectionRequestInfo)obj;
          return Util.compare(_userName, you.getUserName()) && Util.compare(_password,
you.getPassword()) &&
-                Util.compare(_clientID, you.getClientID()) &&
+                Util.compare(_clientId, you.getClientId()) &&
                 _type == you.getType() &&
                 _transacted == you.isTransacted() &&
                 _acknowledgeMode == you.getAcknowledgeMode();
@@ -343,7 +343,7 @@ public class QpidRAConnectionRequestInfo
 
       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 + (_clientId != null ? _clientId.hashCode() : 0);
       hash += 31 * hash + _type;
       hash += 31 * hash + (_transacted ? 1 : 0);
       hash += 31 * hash + _acknowledgeMode;
@@ -356,6 +356,6 @@ public class QpidRAConnectionRequestInfo
    {
       return "QpidRAConnectionRequestInfo[type=" + _type +
          ", transacted=" + _transacted + ", acknowledgeMode=" + _acknowledgeMode +
-         ", clientID=" + _clientID + ", userName=" + _userName + ((_password != null) ? ",
password=********]" :"]");
+         ", clientID=" + _clientId + ", userName=" + _userName + ((_password != null) ? ",
password=********]" :"]");
    }
 }

Modified: qpid/trunk/qpid/java/jca/src/main/java/org/apache/qpid/ra/QpidRAManagedConnectionFactory.java
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/jca/src/main/java/org/apache/qpid/ra/QpidRAManagedConnectionFactory.java?rev=1326622&r1=1326621&r2=1326622&view=diff
==============================================================================
--- qpid/trunk/qpid/java/jca/src/main/java/org/apache/qpid/ra/QpidRAManagedConnectionFactory.java
(original)
+++ qpid/trunk/qpid/java/jca/src/main/java/org/apache/qpid/ra/QpidRAManagedConnectionFactory.java
Mon Apr 16 14:08:32 2012
@@ -365,12 +365,12 @@ public class QpidRAManagedConnectionFact
       _mcfProperties.setSessionDefaultType(type);
    }
 
-   public String getClientID()
+   public String getClientId()
    {
       return _mcfProperties.getClientId();
    }
 
-   public void setClientID(final String clientID)
+   public void setClientId(final String clientID)
    {
       _mcfProperties.setClientId(clientID);
    }

Modified: qpid/trunk/qpid/java/jca/src/main/java/org/apache/qpid/ra/QpidRAProperties.java
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/jca/src/main/java/org/apache/qpid/ra/QpidRAProperties.java?rev=1326622&r1=1326621&r2=1326622&view=diff
==============================================================================
--- qpid/trunk/qpid/java/jca/src/main/java/org/apache/qpid/ra/QpidRAProperties.java (original)
+++ qpid/trunk/qpid/java/jca/src/main/java/org/apache/qpid/ra/QpidRAProperties.java Mon Apr
16 14:08:32 2012
@@ -66,34 +66,6 @@ public class QpidRAProperties extends Co
       }
    }
 
-   /**
-    * Get the use XA flag
-    * @return The value
-    */
-   public Boolean getUseLocalTx()
-   {
-      if (_log.isTraceEnabled())
-      {
-         _log.trace("getUseLocalTx()");
-      }
-
-      return _localTx;
-   }
-
-   /**
-    * Set the use XA flag
-    * @param localTx The value
-    */
-   public void setUseLocalTx(final Boolean localTx)
-   {
-      if (_log.isTraceEnabled())
-      {
-         _log.trace("setUseLocalTx(" + localTx + ")");
-      }
-
-      this._localTx = localTx;
-   }
-
    public void setTransactionManagerLocatorClass(final String transactionManagerLocatorClass)
    {
       if (_log.isTraceEnabled())

Modified: qpid/trunk/qpid/java/jca/src/main/java/org/apache/qpid/ra/QpidRASessionFactoryImpl.java
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/jca/src/main/java/org/apache/qpid/ra/QpidRASessionFactoryImpl.java?rev=1326622&r1=1326621&r2=1326622&view=diff
==============================================================================
--- qpid/trunk/qpid/java/jca/src/main/java/org/apache/qpid/ra/QpidRASessionFactoryImpl.java
(original)
+++ qpid/trunk/qpid/java/jca/src/main/java/org/apache/qpid/ra/QpidRASessionFactoryImpl.java
Mon Apr 16 14:08:32 2012
@@ -742,7 +742,7 @@ public class QpidRASessionFactoryImpl im
             QpidRAConnectionRequestInfo info = new QpidRAConnectionRequestInfo(sessionType);
             info.setUserName(_userName);
             info.setPassword(_password);
-            info.setClientID(_clientID);
+            info.setClientId(_clientID);
             info.setDefaults(_mcf.getDefaultAMQConnectionFactory().getConnectionURL());
 
             if (_log.isTraceEnabled())
@@ -839,7 +839,7 @@ public class QpidRASessionFactoryImpl im
                                                                                      sessionType);
             info.setUserName(_userName);
             info.setPassword(_password);
-            info.setClientID(_clientID);
+            info.setClientId(_clientID);
             info.setDefaults(_mcf.getDefaultAMQConnectionFactory().getConnectionURL());
 
             if (_log.isTraceEnabled())

Modified: qpid/trunk/qpid/java/jca/src/main/java/org/apache/qpid/ra/QpidResourceAdapter.java
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/jca/src/main/java/org/apache/qpid/ra/QpidResourceAdapter.java?rev=1326622&r1=1326621&r2=1326622&view=diff
==============================================================================
--- qpid/trunk/qpid/java/jca/src/main/java/org/apache/qpid/ra/QpidResourceAdapter.java (original)
+++ qpid/trunk/qpid/java/jca/src/main/java/org/apache/qpid/ra/QpidResourceAdapter.java Mon
Apr 16 14:08:32 2012
@@ -223,65 +223,6 @@ public class QpidResourceAdapter impleme
       _log.info("Qpid resource adapter stopped");
    }
 
-   /**
-    * Get the user name
-    *
-    * @return The value
-    */
-   public String getDefaultUserName()
-   {
-      if (_log.isTraceEnabled())
-      {
-         _log.trace("getUserName()");
-      }
-
-      return _raProperties.getUserName();
-   }
-
-   /**
-    * Set the user name
-    *
-    * @param userName The value
-    */
-   public void setDefaultUserName(final String userName)
-   {
-      if (_log.isTraceEnabled())
-      {
-         _log.trace("setUserName(" + userName + ")");
-      }
-
-      _raProperties.setUserName(userName);
-   }
-
-   /**
-    * Get the password
-    *
-    * @return The value
-    */
-   public String getDefaultPassword()
-   {
-      if (_log.isTraceEnabled())
-      {
-         _log.trace("getPassword()");
-      }
-
-      return _raProperties.getPassword();
-   }
-
-   /**
-    * Set the password
-    *
-    * @param password The value
-    */
-   public void setDefaultPassword(final String password)
-   {
-      if (_log.isTraceEnabled())
-      {
-         _log.trace("setPassword(****)");
-      }
-
-      _raProperties.setPassword(password);
-   }
 
    /**
     * Get the client ID
@@ -403,6 +344,26 @@ public class QpidResourceAdapter impleme
       _raProperties.setPath(path);
    }
 
+   public String getUserName()
+   {
+       return _raProperties.getUserName();
+   }
+
+   public void setUserName(String userName)
+   {
+      _raProperties.setUserName(userName);
+   }
+
+   public String getPassword()
+   {
+       return _raProperties.getPassword();
+   }
+
+   public void setPassword(String password)
+   {
+       _raProperties.setPassword(password);
+   }
+
    /**
     * Get the connection url
     *
@@ -493,14 +454,14 @@ public class QpidResourceAdapter impleme
     *
     * @return The value
     */
-   public Boolean getUseLocalTx()
+   public Boolean isUseLocalTx()
    {
       if (_log.isTraceEnabled())
       {
          _log.trace("getUseLocalTx()");
       }
 
-      return _raProperties.getUseLocalTx();
+      return _raProperties.isUseLocalTx();
    }
 
    /**

Modified: qpid/trunk/qpid/java/jca/src/main/resources/META-INF/ra.xml
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/jca/src/main/resources/META-INF/ra.xml?rev=1326622&r1=1326621&r2=1326622&view=diff
==============================================================================
--- qpid/trunk/qpid/java/jca/src/main/resources/META-INF/ra.xml (original)
+++ qpid/trunk/qpid/java/jca/src/main/resources/META-INF/ra.xml Mon Apr 16 14:08:32 2012
@@ -69,7 +69,7 @@
     </config-property>
 
     <config-property>
-      <description>Interval between setup attempts</description>
+      <description>Interval between setup attempts in milliseconds</description>
       <config-property-name>SetupInterval</config-property-name>
       <config-property-type>java.lang.Long</config-property-type>
       <config-property-value>5000</config-property-value>
@@ -104,10 +104,10 @@
     </config-property>
 
     <config-property>
-      <description>connection URL</description>
+      <description>Connection URL</description>
       <config-property-name>ConnectionURL</config-property-name>
       <config-property-type>java.lang.String</config-property-type>
-      <config-property-value>amqp://guest:guest@/test?brokerlist='tcp://localhost:5672'</config-property-value>
+      <config-property-value>amqp://anonymous:passwd@client/test?brokerlist='tcp://localhost?sasl_mechs='PLAIN''</config-property-value>
     </config-property>
 
     <outbound-resourceadapter>
@@ -116,14 +116,14 @@
 
         <config-property>
           <description>Default session type</description>
-          <config-property-name>sessionDefaultType</config-property-name>
+          <config-property-name>SessionDefaultType</config-property-name>
           <config-property-type>java.lang.String</config-property-type>
           <config-property-value>javax.jms.Queue</config-property-value>
         </config-property>
 
         <config-property>
           <description>Specify lock timeout in seconds</description>
-          <config-property-name>useTryLock</config-property-name>
+          <config-property-name>UseTryLock</config-property-name>
           <config-property-type>java.lang.Integer</config-property-type>
           <config-property-value>0</config-property-value>
         </config-property>
@@ -137,7 +137,7 @@
 
         <config-property>
           <description>Client ID for the connection</description>
-          <config-property-name>ClientID</config-property-name>
+          <config-property-name>ClientId</config-property-name>
           <config-property-type>java.lang.String</config-property-type>
           <config-property-value>client_id</config-property-value>
         </config-property>
@@ -200,38 +200,24 @@
             <adminobject-interface>org.apache.qpid.ra.admin.QpidQueue</adminobject-interface>
             <adminobject-class> org.apache.qpid.ra.admin.QpidQueueImpl</adminobject-class>
             <config-property>
-                <config-property-name>destinationAddress </config-property-name>
-                <config-property-type>java.lang.String </config-property-type>
+                <config-property-name>DestinationAddress </config-property-name>
+                <config-property-type>java.lang.String</config-property-type>
             </config-property>
         </adminobject>
       <adminobject>
             <adminobject-interface>org.apache.qpid.ra.admin.QpidTopic</adminobject-interface>
             <adminobject-class> org.apache.qpid.ra.admin.QpidTopicImpl</adminobject-class>
             <config-property>
-                <config-property-name>destinationAddress </config-property-name>
-                <config-property-type>java.lang.String </config-property-type>
+                <config-property-name>DestinationAddress </config-property-name>
+                <config-property-type>java.lang.String</config-property-type>
             </config-property>
         </adminobject>
-      <!--
-      <adminobject>
-            <adminobject-interface>javax.jms.Destination</adminobject-interface>
-            <adminobject-class> org.apache.qpid.ra.admin.QpidDestinationProxy</adminobject-class>
-            <config-property>
-                <config-property-name>destinationAddress </config-property-name>
-                <config-property-type>java.lang.String </config-property-type>
-            </config-property>
-            <config-property>
-                <config-property-name>destinationType</config-property-name>
-                <config-property-type>java.lang.String </config-property-type>
-            </config-property>
-        </adminobject>
-      -->
       <adminobject>
             <adminobject-interface>javax.jms.ConnectionFactory</adminobject-interface>
             <adminobject-class> org.apache.qpid.ra.admin.QpidConnectionFactoryProxy</adminobject-class>
             <config-property>
-                <config-property-name>connectionURL</config-property-name>
-                <config-property-type>java.lang.String </config-property-type>
+                <config-property-name>ConnectionURL</config-property-name>
+                <config-property-type>java.lang.String</config-property-type>
             </config-property>
         </adminobject>
    </resourceadapter>



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org


Mime
View raw message