Resources resources = getRuntime().getResources(poolInfo);
ResourcePool resourcePool = null;
if (resources != null) {
resourcePool = (ResourcePool) ConnectorsUtil.getResourceByName(resources, ResourcePool.class, poolInfo.getName());
if (resourcePool != null) {
ResourceDeployer deployer = getRuntime().getResourceDeployer(resourcePool);
if (deployer != null && deployer.supportsDynamicReconfiguration() &&
ConnectorsUtil.isDynamicReconfigurationEnabled(resourcePool)) {
Object o = env.get(ConnectorConstants.DYNAMIC_RECONFIGURATION_PROXY_CALL);
if (o == null || Boolean.valueOf(o.toString()).equals(false)) {
//TODO use list ? (even in the ResourceDeployer API)
Class[] classes = deployer.getProxyClassesForDynamicReconfiguration();
Class[] proxyClasses = new Class[classes.length + 1];
for (int i = 0; i < classes.length; i++) {
proxyClasses[i] = classes[i];
}
proxyClasses[proxyClasses.length - 1] = DynamicallyReconfigurableResource.class;