mirror of https://github.com/apache/cloudstack.git
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 <bhaisaab@apache.org>
This commit is contained in:
parent
e5507c3892
commit
ddf9c6586d
|
|
@ -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());
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue