*/
public void executeMojo() throws MojoExecutionException {
getLog().info("creating [" + getResourceName() + "]");
JdbcPoolConfig jdbcPoolConfig = new JdbcPoolConfig();
jdbcPoolConfig.setDatabaseName(databaseName);
jdbcPoolConfig.setDatasourceClassname(datasourceClassname);
jdbcPoolConfig.setUser(jdbcUsername);
jdbcPoolConfig.setPassword(jdbcPassword);
jdbcPoolConfig.setResType(resourceType);
jdbcPoolConfig.setAllowNonComponentCallers(allowNonComponentCallers);
jdbcPoolConfig.setFailAllConnection(failAllConnection);
jdbcPoolConfig.setIdleTimeoutInSeconds(idleTimeoutInSeconds);
jdbcPoolConfig.setConnectionValidationRequired(
connectionValidationRequired);
jdbcPoolConfig.setIsolationLevelGuaranteed(isolationLevelGuaranteed);
jdbcPoolConfig.setMaxPoolSize(maxPoolSize);
jdbcPoolConfig.setMaxWaitTimeInMillis(maxWaitTimeInMillis);
jdbcPoolConfig.setNonTransactionalConnections(
nonTransactionalConnections);
jdbcPoolConfig.setPoolResizeQuantity(poolResizeQuantity);
jdbcPoolConfig.setSteadyPoolSize(steadyPoolSize);
jdbcPoolConfig.setTransactionIsolationLevel(transactionIsolationLevel);
jdbcPoolConfig.setValidationTableName(validationTableName);
if (!StringUtils.isEmpty(connectionValidationMethod)) {
jdbcPoolConfig.setConnectionValidationMethod(
connectionValidationMethod);
}
if (!StringUtils.isEmpty(transactionIsolationLevel)) {
jdbcPoolConfig.setTransactionIsolationLevel(
transactionIsolationLevel);
}
if (!StringUtils.isEmpty(validationTableName)) {
jdbcPoolConfig.setValidationTableName(validationTableName);
}
List<String> keyValuePair = ClownfishUtil.parseString(properties);
for (String str : keyValuePair) {
String[] tokens = str.split("=");
jdbcPoolConfig.getResourceMap().put("property." + tokens[0],
tokens[1]);
}
getLog().info("jdbc pool config properties: " + jdbcPoolConfig);