protected List<PoolConfiguration> getMatchingPoolConfigs(String poolName, ManagementRepository repository) { ArrayList<PoolConfiguration> result = new ArrayList<PoolConfiguration>(repository.getDataSources().size()); if (repository.getDataSources() != null) { for (DataSource ds : repository.getDataSources()) { if (poolName.equalsIgnoreCase(ds.getPool().getName())) { result.add(ds.getPoolConfiguration()); } } } result.trimToSize(); return result; }
/** * String representation * @return The string */ @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("DataSource@").append(Integer.toHexString(System.identityHashCode(this))); sb.append(" xa=").append(isXA()); sb.append(" jndiName=").append(getJndiName()); sb.append(" pool=").append(getPool()); sb.append(" poolconfiguration=").append(getPoolConfiguration()); sb.append(" statistics=").append(getStatistics()); sb.append("]"); return sb.toString(); } }
protected List<PoolConfiguration> getMatchingPoolConfigs(String jndiName, ManagementRepository repository) { ArrayList<PoolConfiguration> result = new ArrayList<PoolConfiguration>(repository.getDataSources().size()); if (repository.getDataSources() != null) { for (DataSource ds : repository.getDataSources()) { if (jndiName.equalsIgnoreCase(ds.getJndiName())) { result.add(ds.getPoolConfiguration()); } } } result.trimToSize(); return result; }
protected List<PoolConfiguration> getMatchingPoolConfigs(String poolName, ManagementRepository repository) { ArrayList<PoolConfiguration> result = new ArrayList<PoolConfiguration>(repository.getDataSources().size()); if (repository.getDataSources() != null) { for (DataSource ds : repository.getDataSources()) { if (poolName.equalsIgnoreCase(ds.getPool().getName())) { result.add(ds.getPoolConfiguration()); } } } result.trimToSize(); return result; }
if (mgtDs.getPoolConfiguration() != null) DynamicMBean dsPCDMB = JMX.createMBean(mgtDs.getPoolConfiguration(), "Pool configuration"); ObjectName dsPCON = new ObjectName(dsPCName);