Skip to content

Commit

Permalink
Use XaPool / DsXaPool allways.
Browse files Browse the repository at this point in the history
  • Loading branch information
Frank Langelage authored and Frank Langelage committed Jul 12, 2015
1 parent fff1ee1 commit 99e4b1d
Showing 1 changed file with 6 additions and 8 deletions.
Expand Up @@ -29,9 +29,7 @@
import org.jboss.as.controller.PathAddress; import org.jboss.as.controller.PathAddress;
import org.jboss.as.controller.descriptions.ModelDescriptionConstants; import org.jboss.as.controller.descriptions.ModelDescriptionConstants;
import org.jboss.dmr.ModelNode; import org.jboss.dmr.ModelNode;
import org.jboss.jca.common.api.metadata.common.Pool;
import org.jboss.jca.common.api.metadata.common.XaPool; import org.jboss.jca.common.api.metadata.common.XaPool;
import org.jboss.jca.common.api.metadata.ds.DsPool;
import org.jboss.jca.common.api.metadata.ds.DsXaPool; import org.jboss.jca.common.api.metadata.ds.DsXaPool;
import org.jboss.jca.common.api.metadata.ds.XaDataSource; import org.jboss.jca.common.api.metadata.ds.XaDataSource;


Expand Down Expand Up @@ -128,11 +126,11 @@ private void handleDatasourceAttribute(final String attributeName, final Operati
setStringIfNotNull(context, dataSource.getXaPool().getCapacity().getDecrementer().getClassName()); setStringIfNotNull(context, dataSource.getXaPool().getCapacity().getDecrementer().getClassName());


} else if (attributeName.equals(org.jboss.as.connector.subsystems.common.pool.Constants.CAPACITY_INCREMENTER_PROPERTIES.getName())) { } else if (attributeName.equals(org.jboss.as.connector.subsystems.common.pool.Constants.CAPACITY_INCREMENTER_PROPERTIES.getName())) {
Pool pool = dataSource.getXaPool(); XaPool pool = dataSource.getXaPool();
if (pool == null || ((DsPool) pool).getCapacity() == null || ((DsPool) pool).getCapacity().getIncrementer() == null) if (pool == null || ((DsXaPool) pool).getCapacity() == null || ((DsXaPool) pool).getCapacity().getIncrementer() == null)
return; return;


final Map<String, String> propertiesMap = ((DsPool) pool).getCapacity().getIncrementer().getConfigPropertiesMap(); final Map<String, String> propertiesMap = ((DsXaPool) pool).getCapacity().getIncrementer().getConfigPropertiesMap();
if (propertiesMap == null) { if (propertiesMap == null) {
return; return;
} }
Expand All @@ -142,11 +140,11 @@ private void handleDatasourceAttribute(final String attributeName, final Operati




} else if (attributeName.equals(org.jboss.as.connector.subsystems.common.pool.Constants.CAPACITY_DECREMENTER_PROPERTIES.getName())) { } else if (attributeName.equals(org.jboss.as.connector.subsystems.common.pool.Constants.CAPACITY_DECREMENTER_PROPERTIES.getName())) {
Pool pool = dataSource.getXaPool(); XaPool pool = dataSource.getXaPool();
if (pool == null || ((DsPool) pool).getCapacity() == null || ((DsPool) pool).getCapacity().getDecrementer() == null) if (pool == null || ((DsXaPool) pool).getCapacity() == null || ((DsXaPool) pool).getCapacity().getDecrementer() == null)
return; return;


final Map<String, String> propertiesMap = ((DsPool) pool).getCapacity().getDecrementer().getConfigPropertiesMap(); final Map<String, String> propertiesMap = ((DsXaPool) pool).getCapacity().getDecrementer().getConfigPropertiesMap();
if (propertiesMap == null) { if (propertiesMap == null) {
return; return;
} }
Expand Down

0 comments on commit 99e4b1d

Please sign in to comment.