private Map<String, String> unwrap(final ModelNode model) { if (!model.hasDefined(PARAMETERS.getName())) { return Collections.emptyMap(); } ModelNode modelProps = model.get(PARAMETERS.getName()); Map<String, String> props = new HashMap<String, String>(); for (Property p : modelProps.asPropertyList()) { props.put(p.getName(), p.getValue().asString()); } return props; } }
if (PoolConfigurationRWHandler.ATTRIBUTES.contains(attribute.getName())) { resourceRegistration.registerReadWriteAttribute(attribute, PoolConfigurationRWHandler.PoolConfigurationReadHandler.INSTANCE, PoolConfigurationRWHandler.LocalAndXaDataSourcePoolConfigurationWriteHandler.INSTANCE); } else {
if (PoolConfigurationRWHandler.ATTRIBUTES.contains(attribute.getName())) { resourceRegistration.registerReadWriteAttribute(attribute, PoolConfigurationRWHandler.PoolConfigurationReadHandler.INSTANCE, PoolConfigurationRWHandler.LocalAndXaDataSourcePoolConfigurationWriteHandler.INSTANCE); } else {
configAddress.add(XADATASOURCE_PROPERTIES.getName(), name); configAddress.protect();
configAddress.add(CONNECTION_PROPERTIES.getName(), name); configAddress.protect();
private void handleDatasourceAttribute(final String attributeName, final OperationContext context, final DataSource dataSource) { if (attributeName.equals(Constants.CONNECTION_URL.getName())) { setStringIfNotNull(context, dataSource.getConnectionUrl()); } else if (attributeName.equals(Constants.CONNECTION_PROPERTIES.getName())) { final Map<String, String> propertiesMap = dataSource.getConnectionProperties(); if (propertiesMap == null) { } else if (attributeName.equals(org.jboss.as.connector.subsystems.common.pool.Constants.CAPACITY_INCREMENTER_PROPERTIES.getName())) { Pool pool = dataSource.getPool(); if (pool == null || pool.getCapacity() == null || pool.getCapacity().getIncrementer() == null) } else if (attributeName.equals(org.jboss.as.connector.subsystems.common.pool.Constants.CAPACITY_DECREMENTER_PROPERTIES.getName())) { Pool pool = dataSource.getPool(); if (pool == null || pool.getCapacity() == null || pool.getCapacity().getDecrementer() == null) } else if (attributeName.equals(Constants.REAUTHPLUGIN_PROPERTIES.getName())) { if (dataSource.getSecurity() == null) { return; } else if (attributeName.equals(Constants.EXCEPTION_SORTER_PROPERTIES.getName())) { if (dataSource.getValidation() == null) { return; } else if (attributeName.equals(Constants.STALE_CONNECTION_CHECKER_PROPERTIES.getName())) { if (dataSource.getValidation() == null) { return; } else if (attributeName.equals(Constants.VALID_CONNECTION_CHECKER_PROPERTIES.getName())) { if (dataSource.getValidation() == null) { return;
configAddress.add(XADATASOURCE_PROPERTIES.getName(), name); configAddress.protect();
configAddress.add(CONNECTION_PROPERTIES.getName(), name); configAddress.protect();
} else if (attributeName.equals(org.jboss.as.connector.subsystems.common.pool.Constants.CAPACITY_INCREMENTER_PROPERTIES.getName())) { XaPool pool = dataSource.getXaPool(); if (pool == null || pool.getCapacity() == null || pool.getCapacity().getIncrementer() == null) } else if (attributeName.equals(org.jboss.as.connector.subsystems.common.pool.Constants.CAPACITY_DECREMENTER_PROPERTIES.getName())) { XaPool pool = dataSource.getXaPool(); if (pool == null || pool.getCapacity() == null || pool.getCapacity().getDecrementer() == null) } else if (attributeName.equals(Constants.RECOVER_PLUGIN_PROPERTIES.getName())) { if(dataSource.getRecovery() == null) { return; } else if (attributeName.equals(Constants.EXCEPTION_SORTER_PROPERTIES.getName())) { if (dataSource.getValidation() == null) { return; } else if (attributeName.equals(Constants.STALE_CONNECTION_CHECKER_PROPERTIES.getName())) { if (dataSource.getValidation() == null) { return; } else if (attributeName.equals(Constants.VALID_CONNECTION_CHECKER_PROPERTIES.getName())) { if (dataSource.getValidation() == null) { return; } else if (attributeName.equals(Constants.REAUTHPLUGIN_PROPERTIES.getName())) { if (dataSource.getSecurity() == null) { return; } else if (attributeName.equals(Constants.CONNECTION_LISTENER_PROPERTIES.getName())) {
configAddress.add(XADATASOURCE_PROPERTIES.getName(), name); configAddress.protect();
DRIVER_CLASS.marshallAsElement(dataSourceNode, writer); DATASOURCE_CLASS.marshallAsElement(dataSourceNode, writer); if (dataSourceNode.hasDefined(CONNECTION_PROPERTIES.getName())) { for (Property connectionProperty : dataSourceNode.get(CONNECTION_PROPERTIES.getName()).asPropertyList()) { writeProperty(writer, dataSourceNode, connectionProperty.getName(), connectionProperty .getValue().get("value").asString(), DataSource.Tag.CONNECTION_PROPERTY.getLocalName()); if (dataSourceNode.hasDefined(XADATASOURCE_PROPERTIES.getName())) { for (Property prop : dataSourceNode.get(XADATASOURCE_PROPERTIES.getName()).asPropertyList()) { writeProperty(writer, dataSourceNode, prop.getName(), prop .getValue().get("value").asString(), XaDataSource.Tag.XA_DATASOURCE_PROPERTY.getLocalName()); if (dataSourceNode.hasDefined(CONNECTION_LISTENER_PROPERTIES.getName())) { for (Property connectionProperty : dataSourceNode.get(CONNECTION_LISTENER_PROPERTIES.getName()) .asPropertyList()) { writeProperty(writer, dataSourceNode, connectionProperty.getName(), connectionProperty if (dataSourceNode.hasDefined(REAUTHPLUGIN_PROPERTIES.getName())) { for (Property connectionProperty : dataSourceNode.get(REAUTHPLUGIN_PROPERTIES.getName()).asPropertyList()) { writeProperty(writer, dataSourceNode, connectionProperty.getName(), connectionProperty .getValue().asString(), org.jboss.jca.common.api.metadata.common.Extension.Attribute.CLASS_NAME.getLocalName(), dataSourceNode.get(RECOVER_PLUGIN_CLASSNAME.getName()).asString()); if (dataSourceNode.hasDefined(RECOVER_PLUGIN_PROPERTIES.getName())) { for (Property connectionProperty : dataSourceNode.get(RECOVER_PLUGIN_PROPERTIES.getName()).asPropertyList()) { writeProperty(writer, dataSourceNode, connectionProperty.getName(), connectionProperty .getValue().asString(),
configAddress.add(CONNECTION_PROPERTIES.getName(), name); configAddress.protect();
configAddress.add(XADATASOURCE_PROPERTIES.getName(), name); configAddress.protect();
configAddress.add(CONNECTION_PROPERTIES.getName(), name); configAddress.protect();
if (pool.getCapacity().getIncrementer().getConfigPropertiesMap() != null) { for (Map.Entry<String, String> config : pool.getCapacity().getIncrementer().getConfigPropertiesMap().entrySet()) { model.get(CAPACITY_INCREMENTER_PROPERTIES.getName(), config.getKey()).set(config.getValue()); if (pool.getCapacity().getDecrementer().getConfigPropertiesMap() != null) { for (Map.Entry<String, String> config : pool.getCapacity().getDecrementer().getConfigPropertiesMap().entrySet()) { model.get(CAPACITY_DECREMENTER_PROPERTIES.getName(), config.getKey()).set(config.getValue()); if (recoverPlugin.getConfigPropertiesMap() != null) { for (Map.Entry<String, String> config : recoverPlugin.getConfigPropertiesMap().entrySet()) { model.get(RECOVERLUGIN_PROPERTIES.getName(), config.getKey()).set(config.getValue());
|| conDef.hasDefined(RECOVERLUGIN_PROPERTIES.getName()) || conDef.hasDefined(NO_RECOVERY.getName()) || conDef.hasDefined(ELYTRON_ENABLED.getName())) { streamWriter.writeEndElement(); if (conDef.hasDefined(RECOVERLUGIN_CLASSNAME.getName()) || conDef.hasDefined(RECOVERLUGIN_PROPERTIES.getName())) { streamWriter.writeStartElement(Recovery.Tag.RECOVER_PLUGIN.getLocalName()); RECOVERLUGIN_CLASSNAME.marshallAsAttribute(conDef, streamWriter); if (conDef.hasDefined(RECOVERLUGIN_PROPERTIES.getName())) { for (Property property : conDef.get(RECOVERLUGIN_PROPERTIES.getName()).asPropertyList()) { writeProperty(streamWriter, conDef, property.getName(), property .getValue().asString(), org.jboss.jca.common.api.metadata.common.Extension.Tag.CONFIG_PROPERTY.getLocalName());
private Map<String, String> unwrap(final ModelNode model) { if (!model.hasDefined(PARAMETERS.getName())) { return Collections.emptyMap(); } ModelNode modelProps = model.get(PARAMETERS.getName()); Map<String, String> props = new HashMap<String, String>(); for (Property p : modelProps.asPropertyList()) { props.put(p.getName(), p.getValue().asString()); } return props; } }
private Map<String, String> unwrap(final ModelNode model) { if (!model.hasDefined(PARAMETERS.getName())) { return Collections.emptyMap(); } ModelNode modelProps = model.get(PARAMETERS.getName()); Map<String, String> props = new HashMap<String, String>(); for (Property p : modelProps.asPropertyList()) { props.put(p.getName(), p.getValue().asString()); } return props; } }
public Map<String, String> unwrap(final OperationContext context, final ModelNode model) throws OperationFailedException { if (!model.hasDefined(getName())) { return new HashMap<String, String>(); } ModelNode modelProps = model.get(getName()); Map<String, String> props = new HashMap<String, String>(); for (Property p : modelProps.asPropertyList()) { props.put(p.getName(), context.resolveExpressions(p.getValue()).asString()); } return props; }
public Map<String, String> unwrap(final OperationContext context, final ModelNode model) throws OperationFailedException { if (!model.hasDefined(getName())) { return new HashMap<String, String>(); } ModelNode modelProps = model.get(getName()); Map<String, String> props = new HashMap<String, String>(); for (Property p : modelProps.asPropertyList()) { props.put(p.getName(), context.resolveExpressions(p.getValue()).asString()); } return props; }