cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bfede...@apache.org
Subject [39/50] [abbrv] git commit: updated refs/heads/ui-ucs to 9334dab
Date Tue, 09 Jul 2013 20:46:21 GMT
Summary: usage db connection missing url parameters property

Detail: users should be able to add url parameters to the usage database
connection string, just like with the cloud database

BUG-ID: CLOUDSTACK-3410
Bugfix-for: 4.2
Signed-off-by: Marcus Sorensen <marcus@betterservers.com> 1373350596 -0600


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

Branch: refs/heads/ui-ucs
Commit: 97f1e88314ec07bc85c64491819c4473c317a708
Parents: 6f9d5db
Author: Marcus Sorensen <marcus@betterservers.com>
Authored: Tue Jul 9 00:16:36 2013 -0600
Committer: Marcus Sorensen <marcus@betterservers.com>
Committed: Tue Jul 9 00:16:36 2013 -0600

----------------------------------------------------------------------
 client/tomcatconf/db.properties.in            | 1 +
 utils/src/com/cloud/utils/db/Transaction.java | 3 ++-
 2 files changed, 3 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/97f1e883/client/tomcatconf/db.properties.in
----------------------------------------------------------------------
diff --git a/client/tomcatconf/db.properties.in b/client/tomcatconf/db.properties.in
index e159907..b0cb22b 100644
--- a/client/tomcatconf/db.properties.in
+++ b/client/tomcatconf/db.properties.in
@@ -64,6 +64,7 @@ db.usage.maxActive=100
 db.usage.maxIdle=30
 db.usage.maxWait=10000
 db.usage.autoReconnect=true
+db.usage.url.params=
 
 # awsapi database settings
 db.awsapi.username=@DBUSER@

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/97f1e883/utils/src/com/cloud/utils/db/Transaction.java
----------------------------------------------------------------------
diff --git a/utils/src/com/cloud/utils/db/Transaction.java b/utils/src/com/cloud/utils/db/Transaction.java
index 9113aca..37ea8cf 100755
--- a/utils/src/com/cloud/utils/db/Transaction.java
+++ b/utils/src/com/cloud/utils/db/Transaction.java
@@ -1103,12 +1103,13 @@ public class Transaction {
             final int usagePort = Integer.parseInt(dbProps.getProperty("db.usage.port"));
             final String usageDbName = dbProps.getProperty("db.usage.name");
             final boolean usageAutoReconnect = Boolean.parseBoolean(dbProps.getProperty("db.usage.autoReconnect"));
+            final String usageUrl = dbProps.getProperty("db.usage.url.params");
 
             final GenericObjectPool usageConnectionPool = new GenericObjectPool(null, usageMaxActive,
GenericObjectPool.DEFAULT_WHEN_EXHAUSTED_ACTION,
                     usageMaxWait, usageMaxIdle);
 
             final ConnectionFactory usageConnectionFactory = new DriverManagerConnectionFactory("jdbc:mysql://"
+ usageHost + ":" + usagePort + "/" + usageDbName +
-                    "?autoReconnect=" + usageAutoReconnect, usageUsername, usagePassword);
+                    "?autoReconnect=" + usageAutoReconnect + (usageUrl != null ? "&"
+ usageUrl : ""), usageUsername, usagePassword);
 
             final PoolableConnectionFactory usagePoolableConnectionFactory = new PoolableConnectionFactory(usageConnectionFactory,
usageConnectionPool,
                     new StackKeyedObjectPoolFactory(), null, false, false);


Mime
View raw message