static Map getParamsAsMap(JndiBindingsType.JndiBinding binding) { Map params = new HashMap(); params.put("blocking-timeout-seconds", binding.getBlockingTimeoutSeconds()); params.put("conn-pooled-datasource-class", binding.getConnPooledDatasourceClass()); params.put("connection-url", binding.getConnectionUrl()); params.put("idle-timeout-seconds", binding.getIdleTimeoutSeconds()); params.put("init-pool-size", binding.getInitPoolSize()); params.put("jdbc-driver-class", binding.getJdbcDriverClass()); params.put("jndi-name", binding.getJndiName()); params.put("login-timeout-seconds", binding.getLoginTimeoutSeconds()); params.put("managed-conn-factory-class", binding.getManagedConnFactoryClass()); params.put("max-pool-size", binding.getMaxPoolSize()); params.put("password", binding.getPassword()); params.put("transaction-type", binding.getTransactionType()); params.put("type", binding.getType()); params.put("user-name", binding.getUserName()); params.put("xa-datasource-class", binding.getXaDatasourceClass()); return params; }
private void addDataSourceToResult(JndiBindingsType.JndiBinding binding, CacheConfig cacheConfig, TabularResultModel tabularData) { boolean pooled; String type = binding.getType(); if (DATASOURCE_TYPE.SIMPLE.getType().equals(type)) { pooled = false; } else if (DATASOURCE_TYPE.POOLED.getType().equals(type)) { pooled = true; } else { // skip this binding since it was not created as a data-source return; } String dataSourceName = binding.getJndiName(); tabularData.addRow(dataSourceName, Boolean.toString(pooled), Boolean.toString(isDataSourceUsedByRegion(cacheConfig, dataSourceName)), binding.getConnectionUrl()); }
String type = binding.getType(); if (DATASOURCE_TYPE.SIMPLE.getType().equals(type)) { pooled = false;
if (binding.getJndiName().equals(bindingName) || binding.getJndiName().equals("java:" + bindingName)) { addTableRow(tabularData, "type", binding.getType()); addTableRow(tabularData, "jndi-name", binding.getJndiName()); addTableRow(tabularData, "jdbc-driver-class", binding.getJdbcDriverClass()); addTableRow(tabularData, "connection-url", binding.getConnectionUrl()); if (!"SimpleDataSource".equals(binding.getType())) { if ("ManagedDataSource".equals(binding.getType())) { addTableRow(tabularData, "managed-conn-factory-class", binding.getManagedConnFactoryClass()); } else if ("PooledDataSource".equals(binding.getType())) { addTableRow(tabularData, "conn-pooled-datasource-class", binding.getConnPooledDatasourceClass()); } else if ("XAPooledDataSource".equals(binding.getType())) { addTableRow(tabularData, "xa-datasource-class", binding.getXaDatasourceClass());