activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chir...@apache.org
Subject git commit: Support configuring a connectUrl on the leveldb store in case your running in a system like OpenShift where clients connect to a different ip:port from the one that the sever binds.
Date Wed, 27 Aug 2014 17:08:20 GMT
Repository: activemq
Updated Branches:
  refs/heads/trunk b9696ac80 -> b76d8318d


Support configuring a connectUrl on the leveldb store in case your running in a system like
OpenShift where clients connect to a different ip:port from the one that the sever binds.


Project: http://git-wip-us.apache.org/repos/asf/activemq/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq/commit/b76d8318
Tree: http://git-wip-us.apache.org/repos/asf/activemq/tree/b76d8318
Diff: http://git-wip-us.apache.org/repos/asf/activemq/diff/b76d8318

Branch: refs/heads/trunk
Commit: b76d8318d7b87f6d121d485a62ea63e7601d574e
Parents: b9696ac
Author: Hiram Chirino <hiram@hiramchirino.com>
Authored: Tue Aug 26 17:04:25 2014 -0400
Committer: Hiram Chirino <hiram@hiramchirino.com>
Committed: Wed Aug 27 13:08:01 2014 -0400

----------------------------------------------------------------------
 .../leveldb/replicated/ElectingLevelDBStore.scala     | 14 +++++++++++---
 1 file changed, 11 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq/blob/b76d8318/activemq-leveldb-store/src/main/scala/org/apache/activemq/leveldb/replicated/ElectingLevelDBStore.scala
----------------------------------------------------------------------
diff --git a/activemq-leveldb-store/src/main/scala/org/apache/activemq/leveldb/replicated/ElectingLevelDBStore.scala
b/activemq-leveldb-store/src/main/scala/org/apache/activemq/leveldb/replicated/ElectingLevelDBStore.scala
index 9a1852e..fe20530 100644
--- a/activemq-leveldb-store/src/main/scala/org/apache/activemq/leveldb/replicated/ElectingLevelDBStore.scala
+++ b/activemq-leveldb-store/src/main/scala/org/apache/activemq/leveldb/replicated/ElectingLevelDBStore.scala
@@ -78,6 +78,10 @@ class ElectingLevelDBStore extends ProxyLevelDBStore {
 
   @BeanProperty
   var hostname: String = _
+
+  @BeanProperty
+  var connectUrl: String = _
+
   @BeanProperty
   var bind = "tcp://0.0.0.0:61619"
 
@@ -371,10 +375,14 @@ class ElectingLevelDBStore extends ProxyLevelDBStore {
   }
 
   def address(port: Int) = {
-    if (hostname == null) {
-      hostname = machine_hostname
+    if( connectUrl==null ) {
+      if (hostname == null) {
+        hostname = machine_hostname
+      }
+      "tcp://" + hostname + ":" + port
+    } else {
+      connectUrl;
     }
-    "tcp://" + hostname + ":" + port
   }
 
   override def size: Long = {


Mime
View raw message