|
|
@@ -136,8 +136,9 @@ public class ResourceFactory {
|
|
|
for (Entry<String, DataServer> entry : Config.nodes().dataServers().entrySet()) {
|
|
|
DruidDataSourceC3P0Adapter dataSource = new DruidDataSourceC3P0Adapter();
|
|
|
String url = "jdbc:h2:tcp://" + entry.getKey() + ":" + entry.getValue().getTcpPort()
|
|
|
- + "/X;DEFAULT_LOCK_TIMEOUT=99999999;JMX=" + (entry.getValue().getJmxEnable() ? "TRUE" : "FALSE")
|
|
|
- + ";CACHE_SIZE=" + (entry.getValue().getCacheSize() * 1024);
|
|
|
+ + "/X;DEFAULT_LOCK_TIMEOUT=" + entry.getValue().getLockTimeout() + ";JMX="
|
|
|
+ + (entry.getValue().getJmxEnable() ? "TRUE" : "FALSE") + ";CACHE_SIZE="
|
|
|
+ + (entry.getValue().getCacheSize() * 1024);
|
|
|
dataSource.setJdbcUrl(url);
|
|
|
dataSource.setDriverClass(SlicePropertiesBuilder.driver_h2);
|
|
|
dataSource.setPreferredTestQuery(SlicePropertiesBuilder.validationQueryOfUrl(url));
|
|
|
@@ -165,8 +166,9 @@ public class ResourceFactory {
|
|
|
BasicDataSource dataSource = new BasicDataSource();
|
|
|
|
|
|
String url = "jdbc:h2:tcp://" + entry.getKey() + ":" + entry.getValue().getTcpPort()
|
|
|
- + "/X;DEFAULT_LOCK_TIMEOUT=99999999;JMX=" + (entry.getValue().getJmxEnable() ? "TRUE" : "FALSE")
|
|
|
- + ";CACHE_SIZE=" + (entry.getValue().getCacheSize() * 1024);
|
|
|
+ + "/X;DEFAULT_LOCK_TIMEOUT=" + entry.getValue().getLockTimeout() + ";JMX="
|
|
|
+ + (entry.getValue().getJmxEnable() ? "TRUE" : "FALSE") + ";CACHE_SIZE="
|
|
|
+ + (entry.getValue().getCacheSize() * 1024);
|
|
|
dataSource.setDriverClassName(SlicePropertiesBuilder.driver_h2);
|
|
|
dataSource.setUrl(url);
|
|
|
dataSource.setInitialSize(0);
|
|
|
@@ -189,8 +191,9 @@ public class ResourceFactory {
|
|
|
for (Entry<String, DataServer> entry : Config.nodes().dataServers().entrySet()) {
|
|
|
DruidDataSource dataSource = new DruidDataSource();
|
|
|
String url = "jdbc:h2:tcp://" + entry.getKey() + ":" + entry.getValue().getTcpPort()
|
|
|
- + "/X;DEFAULT_LOCK_TIMEOUT=99999999;JMX=" + (entry.getValue().getJmxEnable() ? "TRUE" : "FALSE")
|
|
|
- + ";CACHE_SIZE=" + (entry.getValue().getCacheSize() * 1024);
|
|
|
+ + "/X;DEFAULT_LOCK_TIMEOUT=" + entry.getValue().getLockTimeout() + ";JMX="
|
|
|
+ + (entry.getValue().getJmxEnable() ? "TRUE" : "FALSE") + ";CACHE_SIZE="
|
|
|
+ + (entry.getValue().getCacheSize() * 1024);
|
|
|
dataSource.setDriverClassName(SlicePropertiesBuilder.driver_h2);
|
|
|
dataSource.setUrl(url);
|
|
|
dataSource.setInitialSize(0);
|