This is an automated email from the ASF dual-hosted git repository.
jchen21 pushed a commit to branch feature/GEODE-6511
in repository https://gitbox.apache.org/repos/asf/geode.git
The following commit(s) were added to refs/heads/feature/GEODE-6511 by this
push:
new fa7c131 wip
fa7c131 is described below
commit fa7c131f2d8195f1faa735bba2f7d7eab3b74bb2
Author: Ben Ross <[email protected]>
AuthorDate: Tue Mar 12 11:00:54 2019 -0700
wip
Co-authored-by: Ben Ross <[email protected]>
Co-authored-by: Jianxia Chen <[email protected]>
---
.../jdbc/internal/cli/CreateDataSourceCommand.java | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
diff --git
a/geode-connectors/src/main/java/org/apache/geode/connectors/jdbc/internal/cli/CreateDataSourceCommand.java
b/geode-connectors/src/main/java/org/apache/geode/connectors/jdbc/internal/cli/CreateDataSourceCommand.java
index 3524084..c4b1255 100644
---
a/geode-connectors/src/main/java/org/apache/geode/connectors/jdbc/internal/cli/CreateDataSourceCommand.java
+++
b/geode-connectors/src/main/java/org/apache/geode/connectors/jdbc/internal/cli/CreateDataSourceCommand.java
@@ -82,7 +82,6 @@ public class CreateDataSourceCommand extends
SingleGfshCommand {
operation = ResourcePermission.Operation.MANAGE)
public ResultModel createDataSource(
@CliOption(key = POOLED_DATA_SOURCE_FACTORY_CLASS,
- unspecifiedDefaultValue = DEFAULT_POOLED_DATA_SOURCE_FACTORY_CLASS,
help = POOLED_DATA_SOURCE_FACTORY_CLASS__HELP) String
pooledDataSourceFactoryClass,
@CliOption(key = URL, mandatory = true,
help = URL__HELP) String url,
@@ -90,14 +89,19 @@ public class CreateDataSourceCommand extends
SingleGfshCommand {
@CliOption(key = USERNAME, help = USERNAME__HELP) String username,
@CliOption(key = PASSWORD, help = PASSWORD__HELP) String password,
@CliOption(key = CliStrings.IFNOTEXISTS, help = IFNOTEXISTS__HELP,
- specifiedDefaultValue = "true", unspecifiedDefaultValue = "true")
boolean ifNotExists,
+ specifiedDefaultValue = "true", unspecifiedDefaultValue = "false")
boolean ifNotExists,
@CliOption(key = POOLED, help = POOLED__HELP,
- specifiedDefaultValue = "true", unspecifiedDefaultValue = "false")
boolean pooled,
+ specifiedDefaultValue = "true", unspecifiedDefaultValue = "true")
boolean pooled,
@CliOption(key = POOL_PROPERTIES, optionContext =
"splittingRegex=,(?![^{]*\\})",
help = POOL_PROPERTIES_HELP) PoolProperty[] poolProperties) {
JndiBindingsType.JndiBinding configuration = new
JndiBindingsType.JndiBinding();
- configuration.setConnPooledDatasourceClass(pooledDataSourceFactoryClass);
+ if (pooled) {
+ if (pooledDataSourceFactoryClass == null) {
+ pooledDataSourceFactoryClass =
DEFAULT_POOLED_DATA_SOURCE_FACTORY_CLASS;
+ }
+ configuration.setConnPooledDatasourceClass(pooledDataSourceFactoryClass);
+ }
configuration.setConnectionUrl(url);
configuration.setJndiName(name);
configuration.setPassword(password);