diff options
| author | Weston M. Price <wprice@apache.org> | 2012-04-16 14:08:32 +0000 |
|---|---|---|
| committer | Weston M. Price <wprice@apache.org> | 2012-04-16 14:08:32 +0000 |
| commit | 0a6aae2d0be895196e9965de27cf8871c01758db (patch) | |
| tree | 2ca40cd2e96cd9d8156f0a5dd48a9b8d5273ff0d /qpid/java/jca | |
| parent | 8fb01da22414f79461ce421d0af527d3b9fab47a (diff) | |
| download | qpid-python-0a6aae2d0be895196e9965de27cf8871c01758db.tar.gz | |
QPID-3749
-General cleanup of ResourceAdapter
-Removed unused methods
-Fixed typos in ra.xml
-Changed default connectionURL to remove guest/guest
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1326622 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/java/jca')
7 files changed, 59 insertions, 140 deletions
diff --git a/qpid/java/jca/src/main/java/org/apache/qpid/ra/ConnectionFactoryProperties.java b/qpid/java/jca/src/main/java/org/apache/qpid/ra/ConnectionFactoryProperties.java index a7b36bc98c..3bddfd80a4 100644 --- a/qpid/java/jca/src/main/java/org/apache/qpid/ra/ConnectionFactoryProperties.java +++ b/qpid/java/jca/src/main/java/org/apache/qpid/ra/ConnectionFactoryProperties.java @@ -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() diff --git a/qpid/java/jca/src/main/java/org/apache/qpid/ra/QpidRAConnectionRequestInfo.java b/qpid/java/jca/src/main/java/org/apache/qpid/ra/QpidRAConnectionRequestInfo.java index c37a264ebc..779709839a 100644 --- a/qpid/java/jca/src/main/java/org/apache/qpid/ra/QpidRAConnectionRequestInfo.java +++ b/qpid/java/jca/src/main/java/org/apache/qpid/ra/QpidRAConnectionRequestInfo.java @@ -45,7 +45,7 @@ public class QpidRAConnectionRequestInfo implements ConnectionRequestInfo 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 implements ConnectionRequestInfo 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 implements ConnectionRequestInfo { _password = connectionURL.getPassword(); } - if (_clientID == null) + if (_clientId == null) { - _clientID = connectionURL.getClientName(); + _clientId = connectionURL.getClientName(); } } @@ -170,15 +170,15 @@ public class QpidRAConnectionRequestInfo implements ConnectionRequestInfo { 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 implements ConnectionRequestInfo * 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 implements ConnectionRequestInfo { 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 implements ConnectionRequestInfo 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 implements ConnectionRequestInfo { return "QpidRAConnectionRequestInfo[type=" + _type + ", transacted=" + _transacted + ", acknowledgeMode=" + _acknowledgeMode + - ", clientID=" + _clientID + ", userName=" + _userName + ((_password != null) ? ", password=********]" :"]"); + ", clientID=" + _clientId + ", userName=" + _userName + ((_password != null) ? ", password=********]" :"]"); } } diff --git a/qpid/java/jca/src/main/java/org/apache/qpid/ra/QpidRAManagedConnectionFactory.java b/qpid/java/jca/src/main/java/org/apache/qpid/ra/QpidRAManagedConnectionFactory.java index 318485a7f2..8744a9deec 100644 --- a/qpid/java/jca/src/main/java/org/apache/qpid/ra/QpidRAManagedConnectionFactory.java +++ b/qpid/java/jca/src/main/java/org/apache/qpid/ra/QpidRAManagedConnectionFactory.java @@ -365,12 +365,12 @@ public class QpidRAManagedConnectionFactory implements ManagedConnectionFactory, _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); } diff --git a/qpid/java/jca/src/main/java/org/apache/qpid/ra/QpidRAProperties.java b/qpid/java/jca/src/main/java/org/apache/qpid/ra/QpidRAProperties.java index 21f7d2574f..1ded1a8db2 100644 --- a/qpid/java/jca/src/main/java/org/apache/qpid/ra/QpidRAProperties.java +++ b/qpid/java/jca/src/main/java/org/apache/qpid/ra/QpidRAProperties.java @@ -66,34 +66,6 @@ public class QpidRAProperties extends ConnectionFactoryProperties implements Ser } } - /** - * 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()) diff --git a/qpid/java/jca/src/main/java/org/apache/qpid/ra/QpidRASessionFactoryImpl.java b/qpid/java/jca/src/main/java/org/apache/qpid/ra/QpidRASessionFactoryImpl.java index 6d7a8d26bd..f3253e1400 100644 --- a/qpid/java/jca/src/main/java/org/apache/qpid/ra/QpidRASessionFactoryImpl.java +++ b/qpid/java/jca/src/main/java/org/apache/qpid/ra/QpidRASessionFactoryImpl.java @@ -742,7 +742,7 @@ public class QpidRASessionFactoryImpl implements QpidRASessionFactory, Reference 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 implements QpidRASessionFactory, Reference sessionType); info.setUserName(_userName); info.setPassword(_password); - info.setClientID(_clientID); + info.setClientId(_clientID); info.setDefaults(_mcf.getDefaultAMQConnectionFactory().getConnectionURL()); if (_log.isTraceEnabled()) diff --git a/qpid/java/jca/src/main/java/org/apache/qpid/ra/QpidResourceAdapter.java b/qpid/java/jca/src/main/java/org/apache/qpid/ra/QpidResourceAdapter.java index 363af1bbcd..84c1414617 100644 --- a/qpid/java/jca/src/main/java/org/apache/qpid/ra/QpidResourceAdapter.java +++ b/qpid/java/jca/src/main/java/org/apache/qpid/ra/QpidResourceAdapter.java @@ -223,65 +223,6 @@ public class QpidResourceAdapter implements ResourceAdapter, Serializable _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 implements ResourceAdapter, Serializable _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 implements ResourceAdapter, Serializable * * @return The value */ - public Boolean getUseLocalTx() + public Boolean isUseLocalTx() { if (_log.isTraceEnabled()) { _log.trace("getUseLocalTx()"); } - return _raProperties.getUseLocalTx(); + return _raProperties.isUseLocalTx(); } /** diff --git a/qpid/java/jca/src/main/resources/META-INF/ra.xml b/qpid/java/jca/src/main/resources/META-INF/ra.xml index 2c8344c8f0..e95a72fb99 100755 --- a/qpid/java/jca/src/main/resources/META-INF/ra.xml +++ b/qpid/java/jca/src/main/resources/META-INF/ra.xml @@ -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> |
