You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by ro...@apache.org on 2015/01/20 15:40:45 UTC
[4/9] qpid-jms git commit: always apply the brokerURI property in
consistent order before any other properties
always apply the brokerURI property in consistent order before any other properties
Project: http://git-wip-us.apache.org/repos/asf/qpid-jms/repo
Commit: http://git-wip-us.apache.org/repos/asf/qpid-jms/commit/f5cb862e
Tree: http://git-wip-us.apache.org/repos/asf/qpid-jms/tree/f5cb862e
Diff: http://git-wip-us.apache.org/repos/asf/qpid-jms/diff/f5cb862e
Branch: refs/heads/master
Commit: f5cb862ee8a25f3ed3edb1c3615fcfbd5a00ca49
Parents: ba71f29
Author: Robert Gemmell <ro...@apache.org>
Authored: Tue Jan 20 11:56:13 2015 +0000
Committer: Robert Gemmell <ro...@apache.org>
Committed: Tue Jan 20 11:56:13 2015 +0000
----------------------------------------------------------------------
.../main/java/org/apache/qpid/jms/JmsConnectionFactory.java | 9 +++++++++
1 file changed, 9 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/qpid-jms/blob/f5cb862e/qpid-jms-client/src/main/java/org/apache/qpid/jms/JmsConnectionFactory.java
----------------------------------------------------------------------
diff --git a/qpid-jms-client/src/main/java/org/apache/qpid/jms/JmsConnectionFactory.java b/qpid-jms-client/src/main/java/org/apache/qpid/jms/JmsConnectionFactory.java
index c5b771f..faedb56 100644
--- a/qpid-jms-client/src/main/java/org/apache/qpid/jms/JmsConnectionFactory.java
+++ b/qpid-jms-client/src/main/java/org/apache/qpid/jms/JmsConnectionFactory.java
@@ -48,6 +48,7 @@ public class JmsConnectionFactory extends JNDIStorable implements ConnectionFact
private static final Logger LOG = LoggerFactory.getLogger(JmsConnectionFactory.class);
private static final String CLIENT_ID_PROP = "clientID";
+ private static final String BROKER_URI_PROP = "brokerURI";
private URI brokerURI;
private URI localURI;
@@ -112,6 +113,14 @@ public class JmsConnectionFactory extends JNDIStorable implements ConnectionFact
*/
@Override
protected void buildFromProperties(Map<String, String> map) {
+ // Apply the broker URI in a consistent order before
+ // any other properties, since as it may contain
+ // some options within it.
+ String brokerURI = map.remove(BROKER_URI_PROP);
+ if (brokerURI != null) {
+ setBrokerURI(brokerURI);
+ }
+
PropertyUtil.setProperties(this, map);
}
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org