You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by bh...@apache.org on 2013/01/18 04:10:01 UTC

git commit: Transaction: cosmetics fix

Updated Branches:
  refs/heads/javelin e5507c389 -> ddf9c6586


Transaction: cosmetics fix

The default data source assumption is that db server is on localhost, port 3306
and has user cloud and password cloud. The static variables rely on hardcoded
db.properties file only. We need to fix it

Signed-off-by: Rohit Yadav <bh...@apache.org>


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

Branch: refs/heads/javelin
Commit: ddf9c6586d99e7fbad532352fd98187da53e7687
Parents: e5507c3
Author: Rohit Yadav <bh...@apache.org>
Authored: Thu Jan 17 19:06:54 2013 -0800
Committer: Rohit Yadav <bh...@apache.org>
Committed: Thu Jan 17 19:09:38 2013 -0800

----------------------------------------------------------------------
 utils/src/com/cloud/utils/db/Transaction.java |   14 +++++++-------
 1 files changed, 7 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/ddf9c658/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 eaa31f6..bcb78d7 100755
--- a/utils/src/com/cloud/utils/db/Transaction.java
+++ b/utils/src/com/cloud/utils/db/Transaction.java
@@ -1116,13 +1116,13 @@ public class Transaction {
     }
 
     private static DataSource getDefaultDataSource(final String database) {
-   final GenericObjectPool connectionPool = new GenericObjectPool(null, 5);
-   final ConnectionFactory connectionFactory = new DriverManagerConnectionFactory(
-       "jdbc:mysql://localhost:3306/" + database, "cloud", "cloud");
-   final PoolableConnectionFactory poolableConnectionFactory = new PoolableConnectionFactory(
-       connectionFactory, connectionPool, null, null, false, true);
-   return new PoolingDataSource(
-       /* connectionPool */poolableConnectionFactory.getPool());
+        final GenericObjectPool connectionPool = new GenericObjectPool(null, 5);
+        final ConnectionFactory connectionFactory = new DriverManagerConnectionFactory(
+           "jdbc:mysql://localhost:3306/" + database, "cloud", "cloud");
+        final PoolableConnectionFactory poolableConnectionFactory = new PoolableConnectionFactory(
+           connectionFactory, connectionPool, null, null, false, true);
+        return new PoolingDataSource(
+           /* connectionPool */poolableConnectionFactory.getPool());
     }
     
 }