if (validConnectionChecker.getClassName() != null) { managedConnectionFactory.setValidConnectionCheckerClassName(validConnectionChecker.getClassName()); if (exceptionSorter.getClassName() != null) { managedConnectionFactory.setExceptionSorterClassName(exceptionSorter.getClassName()); if (staleConnectionChecker.getClassName() != null) { managedConnectionFactory.setStaleConnectionCheckerClassName(staleConnectionChecker.getClassName());
return; setStringIfNotNull(context, dataSource.getPool().getCapacity().getIncrementer().getClassName()); } else if (attributeName.equals(org.jboss.as.connector.subsystems.common.pool.Constants.CAPACITY_DECREMENTER_CLASS.getName())) { if (dataSource.getPool() == null || dataSource.getPool().getCapacity() == null || dataSource.getPool().getCapacity().getDecrementer() == null) { return; setStringIfNotNull(context, dataSource.getPool().getCapacity().getDecrementer().getClassName()); return; setStringIfNotNull(context, dataSource.getSecurity().getReauthPlugin().getClassName()); } else if (attributeName.equals(Constants.REAUTHPLUGIN_PROPERTIES.getName())) { if (dataSource.getSecurity() == null) { setStringIfNotNull(context, dataSource.getValidation().getExceptionSorter().getClassName()); } else if (attributeName.equals(Constants.EXCEPTION_SORTER_PROPERTIES.getName())) { if (dataSource.getValidation() == null) { setStringIfNotNull(context, dataSource.getValidation().getStaleConnectionChecker().getClassName()); } else if (attributeName.equals(Constants.STALE_CONNECTION_CHECKER_PROPERTIES.getName())) { if (dataSource.getValidation() == null) { setStringIfNotNull(context, dataSource.getValidation().getValidConnectionChecker().getClassName()); } else if (attributeName.equals(Constants.VALID_CONNECTION_CHECKER_PROPERTIES.getName())) { if (dataSource.getValidation() == null) { setStringIfNotNull(context, ((DsPool) pool).getConnectionListener().getClassName());
setStringIfNotNull(context, dataSource.getXaPool().getCapacity().getIncrementer().getClassName()); } else if (attributeName.equals(org.jboss.as.connector.subsystems.common.pool.Constants.CAPACITY_DECREMENTER_CLASS.getName())) { if (dataSource.getXaPool() == null || dataSource.getXaPool().getCapacity() == null || dataSource.getXaPool().getCapacity().getDecrementer() == null) { return; setStringIfNotNull(context, dataSource.getXaPool().getCapacity().getDecrementer().getClassName()); setStringIfNotNull(context, dataSource.getRecovery().getRecoverPlugin().getClassName()); } else if (attributeName.equals(Constants.RECOVER_PLUGIN_PROPERTIES.getName())) { if(dataSource.getRecovery() == null) { setStringIfNotNull(context, dataSource.getValidation().getExceptionSorter().getClassName()); } else if (attributeName.equals(Constants.EXCEPTION_SORTER_PROPERTIES.getName())) { if (dataSource.getValidation() == null) { setStringIfNotNull(context, dataSource.getValidation().getStaleConnectionChecker().getClassName()); } else if (attributeName.equals(Constants.STALE_CONNECTION_CHECKER_PROPERTIES.getName())) { if (dataSource.getValidation() == null) { setStringIfNotNull(context, dataSource.getValidation().getValidConnectionChecker().getClassName()); } else if (attributeName.equals(Constants.VALID_CONNECTION_CHECKER_PROPERTIES.getName())) { if (dataSource.getValidation() == null) { setStringIfNotNull(context, dataSource.getSecurity().getReauthPlugin().getClassName()); } else if (attributeName.equals(Constants.REAUTHPLUGIN_PROPERTIES.getName())) { if (dataSource.getSecurity() == null) { setStringIfNotNull(context, ((DsXaPool) pool).getConnectionListener().getClassName());
if (pool.getCapacity() != null) { if (pool.getCapacity().getIncrementer() != null) { setAttribute(model, CAPACITY_INCREMENTER_CLASS, pool.getCapacity().getIncrementer().getClassName()); if (pool.getCapacity().getIncrementer().getConfigPropertiesMap() != null) { for (Map.Entry<String, String> config : pool.getCapacity().getIncrementer().getConfigPropertiesMap().entrySet()) { setAttribute(model, CAPACITY_DECREMENTER_CLASS, pool.getCapacity().getDecrementer().getClassName()); if (pool.getCapacity().getDecrementer().getConfigPropertiesMap() != null) { for (Map.Entry<String, String> config : pool.getCapacity().getDecrementer().getConfigPropertiesMap().entrySet()) { final Extension recoverPlugin = recovery.getRecoverPlugin(); if (recoverPlugin != null) { setAttribute(model, RECOVERLUGIN_CLASSNAME, recoverPlugin.getClassName()); if (recoverPlugin.getConfigPropertiesMap() != null) { for (Map.Entry<String, String> config : recoverPlugin.getConfigPropertiesMap().entrySet()) {
sb.append(incrementer.getClassName()).append("\""); sb.append(">"); sb.append(decrementer.getClassName()).append("\""); sb.append(">");
sb.append(recoverPlugin.getClassName()).append("\""); sb.append(">");
sb.append(getReauthPlugin().getClassName()).append("\""); sb.append(">");
sb.append(connectionListener.getClassName()).append("\""); sb.append(">");
sb.append(connectionListener.getClassName()).append("\""); sb.append(">");
sb.append(validConnectionChecker.getClassName()).append("\""); sb.append(">"); sb.append(staleConnectionChecker.getClassName()).append("\""); sb.append(">"); sb.append(exceptionSorter.getClassName()).append("\""); sb.append(">");
if (metadata.getIncrementer() != null && metadata.getIncrementer().getClassName() != null) incrementer = loadIncrementer(metadata.getIncrementer().getClassName()); log.invalidCapacityIncrementer(metadata.getIncrementer().getClassName()); if (metadata.getDecrementer() != null && metadata.getDecrementer().getClassName() != null) decrementer = loadDecrementer(metadata.getDecrementer().getClassName()); log.invalidCapacityDecrementer(metadata.getDecrementer().getClassName()); if (TimedOutDecrementer.class.getName().equals(metadata.getDecrementer().getClassName()) || TimedOutFIFODecrementer.class.getName().equals(metadata.getDecrementer().getClassName()) || MinPoolSizeDecrementer.class.getName().equals(metadata.getDecrementer().getClassName()) || SizeDecrementer.class.getName().equals(metadata.getDecrementer().getClassName())) decrementer = loadDecrementer(metadata.getDecrementer().getClassName()); log.invalidCapacityDecrementer(metadata.getDecrementer().getClassName());
if (ds != null && ds.getValidation() != null && ds.getValidation().getValidConnectionChecker() != null && ds.getValidation().getValidConnectionChecker().getClassName() != null) .getValidConnectionChecker().getClassName())); if (ds != null && ds.getValidation() != null && ds.getValidation().getValidConnectionChecker() != null && ds.getValidation().getValidConnectionChecker().getClassName() != null) ds.getValidation().getExceptionSorter().getClassName() != null) .getExceptionSorter().getClassName())); if (ds != null && ds.getValidation() != null && ds.getValidation().getStaleConnectionChecker() != null && ds.getValidation().getStaleConnectionChecker().getClassName() != null) .getStaleConnectionChecker().getClassName()));
if (validConnectionChecker.getClassName() != null) { managedConnectionFactory.setValidConnectionCheckerClassName(validConnectionChecker.getClassName()); if (exceptionSorter.getClassName() != null) { managedConnectionFactory.setExceptionSorterClassName(exceptionSorter.getClassName()); if (staleConnectionChecker.getClassName() != null) { managedConnectionFactory.setStaleConnectionCheckerClassName(staleConnectionChecker.getClassName());
if (validConnectionChecker.getClassName() != null) { managedConnectionFactory.setValidConnectionCheckerClassName(validConnectionChecker.getClassName()); if (exceptionSorter.getClassName() != null) { managedConnectionFactory.setExceptionSorterClassName(exceptionSorter.getClassName()); if (staleConnectionChecker.getClassName() != null) { managedConnectionFactory.setStaleConnectionCheckerClassName(staleConnectionChecker.getClassName());
return; setStringIfNotNull(context, dataSource.getPool().getCapacity().getIncrementer().getClassName()); } else if (attributeName.equals(org.jboss.as.connector.subsystems.common.pool.Constants.CAPACITY_DECREMENTER_CLASS.getName())) { if (dataSource.getPool() == null || dataSource.getPool().getCapacity() == null || dataSource.getPool().getCapacity().getDecrementer() == null) { return; setStringIfNotNull(context, dataSource.getPool().getCapacity().getDecrementer().getClassName()); return; setStringIfNotNull(context, dataSource.getSecurity().getReauthPlugin().getClassName()); } else if (attributeName.equals(Constants.REAUTHPLUGIN_PROPERTIES.getName())) { if (dataSource.getSecurity() == null) { setStringIfNotNull(context, dataSource.getValidation().getExceptionSorter().getClassName()); } else if (attributeName.equals(Constants.EXCEPTION_SORTER_PROPERTIES.getName())) { if (dataSource.getValidation() == null) { setStringIfNotNull(context, dataSource.getValidation().getStaleConnectionChecker().getClassName()); } else if (attributeName.equals(Constants.STALE_CONNECTION_CHECKER_PROPERTIES.getName())) { if (dataSource.getValidation() == null) { setStringIfNotNull(context, dataSource.getValidation().getValidConnectionChecker().getClassName()); } else if (attributeName.equals(Constants.VALID_CONNECTION_CHECKER_PROPERTIES.getName())) { if (dataSource.getValidation() == null) { setStringIfNotNull(context, ((DsPool) pool).getConnectionListener().getClassName());
return; setStringIfNotNull(context, dataSource.getSecurity().getReauthPlugin().getClassName()); } else if (attributeName.equals(Constants.REAUTHPLUGIN_PROPERTIES.getName())) { if (dataSource.getSecurity() == null) { return; setStringIfNotNull(context, dataSource.getValidation().getExceptionSorter().getClassName()); } else if (attributeName.equals(Constants.EXCEPTION_SORTER_PROPERTIES.getName())) { if (dataSource.getValidation() == null) { return; setStringIfNotNull(context, dataSource.getValidation().getStaleConnectionChecker().getClassName()); } else if (attributeName.equals(Constants.STALE_CONNECTION_CHECKER_PROPERTIES.getName())) { if (dataSource.getValidation() == null) { return; setStringIfNotNull(context, dataSource.getValidation().getValidConnectionChecker().getClassName()); } else if (attributeName.equals(Constants.VALID_CONNECTION_CHECKER_PROPERTIES.getName())) { if (dataSource.getValidation() == null) {
return; setStringIfNotNull(context, dataSource.getRecovery().getRecoverPlugin().getClassName()); } else if (attributeName.equals(Constants.RECOVER_PLUGIN_PROPERTIES.getName())) { if(dataSource.getRecovery() == null) { return; setStringIfNotNull(context, dataSource.getValidation().getExceptionSorter().getClassName()); } else if (attributeName.equals(Constants.EXCEPTION_SORTER_PROPERTIES.getName())) { if (dataSource.getValidation() == null) { return; setStringIfNotNull(context, dataSource.getValidation().getStaleConnectionChecker().getClassName()); } else if (attributeName.equals(Constants.STALE_CONNECTION_CHECKER_PROPERTIES.getName())) { if (dataSource.getValidation() == null) { return; setStringIfNotNull(context, dataSource.getValidation().getValidConnectionChecker().getClassName()); } else if (attributeName.equals(Constants.VALID_CONNECTION_CHECKER_PROPERTIES.getName())) { if (dataSource.getValidation() == null) { setStringIfNotNull(context, dataSource.getSecurity().getReauthPlugin().getClassName()); } else if (attributeName.equals(Constants.REAUTHPLUGIN_PROPERTIES.getName())) { if (dataSource.getSecurity() == null) {
setStringIfNotNull(context, dataSource.getXaPool().getCapacity().getIncrementer().getClassName()); } else if (attributeName.equals(org.jboss.as.connector.subsystems.common.pool.Constants.CAPACITY_DECREMENTER_CLASS.getName())) { if (dataSource.getXaPool() == null || dataSource.getXaPool().getCapacity() == null || dataSource.getXaPool().getCapacity().getDecrementer() == null) { return; setStringIfNotNull(context, dataSource.getXaPool().getCapacity().getDecrementer().getClassName()); setStringIfNotNull(context, dataSource.getRecovery().getRecoverPlugin().getClassName()); } else if (attributeName.equals(Constants.RECOVER_PLUGIN_PROPERTIES.getName())) { if(dataSource.getRecovery() == null) { setStringIfNotNull(context, dataSource.getValidation().getExceptionSorter().getClassName()); } else if (attributeName.equals(Constants.EXCEPTION_SORTER_PROPERTIES.getName())) { if (dataSource.getValidation() == null) { setStringIfNotNull(context, dataSource.getValidation().getStaleConnectionChecker().getClassName()); } else if (attributeName.equals(Constants.STALE_CONNECTION_CHECKER_PROPERTIES.getName())) { if (dataSource.getValidation() == null) { setStringIfNotNull(context, dataSource.getValidation().getValidConnectionChecker().getClassName()); } else if (attributeName.equals(Constants.VALID_CONNECTION_CHECKER_PROPERTIES.getName())) { if (dataSource.getValidation() == null) { setStringIfNotNull(context, dataSource.getSecurity().getReauthPlugin().getClassName()); } else if (attributeName.equals(Constants.REAUTHPLUGIN_PROPERTIES.getName())) { if (dataSource.getSecurity() == null) { setStringIfNotNull(context, ((DsXaPool) pool).getConnectionListener().getClassName());
if (pool.getCapacity() != null) { if (pool.getCapacity().getIncrementer() != null) { setAttribute(model, CAPACITY_INCREMENTER_CLASS, pool.getCapacity().getIncrementer().getClassName()); if (pool.getCapacity().getIncrementer().getConfigPropertiesMap() != null) { for (Map.Entry<String, String> config : pool.getCapacity().getIncrementer().getConfigPropertiesMap().entrySet()) { setAttribute(model, CAPACITY_DECREMENTER_CLASS, pool.getCapacity().getDecrementer().getClassName()); if (pool.getCapacity().getDecrementer().getConfigPropertiesMap() != null) { for (Map.Entry<String, String> config : pool.getCapacity().getDecrementer().getConfigPropertiesMap().entrySet()) { final Extension recoverPlugin = recovery.getRecoverPlugin(); if (recoverPlugin != null) { setAttribute(model, RECOVERLUGIN_CLASSNAME, recoverPlugin.getClassName()); if (recoverPlugin.getConfigPropertiesMap() != null) { for (Map.Entry<String, String> config : recoverPlugin.getConfigPropertiesMap().entrySet()) {
final Extension recoverPlugin = recovery.getRecoverPlugin(); if (recoverPlugin != null) { setAttribute(model, RECOVERLUGIN_CLASSNAME, recoverPlugin.getClassName()); if (recoverPlugin.getConfigPropertiesMap() != null) { for (Map.Entry<String, String> config : recoverPlugin.getConfigPropertiesMap().entrySet()) {