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 jndiName, ManagementRepository repository) {
   ArrayList<PoolConfiguration> result =
       new ArrayList<PoolConfiguration>(repository.getConnectors().size());
   if (repository.getConnectors() != null) {
     for (Connector conn : repository.getConnectors()) {
       if (jndiName.equalsIgnoreCase(conn.getUniqueId())) {
         if (conn.getConnectionFactories() == null
             || conn.getConnectionFactories().get(0) == null) continue;
         PoolConfiguration pc = conn.getConnectionFactories().get(0).getPoolConfiguration();
         result.add(pc);
       }
     }
   }
   result.trimToSize();
   return result;
 }