use of org.jboss.dmr.Property in project wildfly by wildfly.
the class EJB3SubsystemXMLPersister method writeProfiles.
private void writeProfiles(final XMLExtendedStreamWriter writer, final ModelNode model) throws XMLStreamException {
final List<Property> profiles = model.get(REMOTING_PROFILE).asPropertyList();
for (final Property property : profiles) {
writer.writeStartElement(PROFILE);
writer.writeAttribute(EJB3SubsystemXMLAttribute.NAME.getLocalName(), property.getName());
final ModelNode profileNode = property.getValue();
RemotingProfileResourceDefinition.EXCLUDE_LOCAL_RECEIVER.marshallAsAttribute(profileNode, writer);
RemotingProfileResourceDefinition.LOCAL_RECEIVER_PASS_BY_VALUE.marshallAsAttribute(profileNode, writer);
if (profileNode.hasDefined(REMOTING_EJB_RECEIVER)) {
writeRemotingEjbReceivers(writer, profileNode);
}
if (profileNode.hasDefined(REMOTE_HTTP_CONNECTION)) {
writeRemoteHttpConnection(writer, profileNode);
}
StaticEJBDiscoveryDefinition.INSTANCE.marshallAsElement(profileNode, writer);
writer.writeEndElement();
}
}
use of org.jboss.dmr.Property in project wildfly by wildfly.
the class EJB3SubsystemXMLPersister method writeClusterPassivationStores.
/**
* Persist as a passivation-store using relevant attributes
*/
private void writeClusterPassivationStores(XMLExtendedStreamWriter writer, ModelNode model) throws XMLStreamException {
if (model.hasDefined(EJB3SubsystemModel.CLUSTER_PASSIVATION_STORE)) {
List<Property> caches = model.get(EJB3SubsystemModel.CLUSTER_PASSIVATION_STORE).asPropertyList();
for (Property property : caches) {
// <strict-max-pool>
writer.writeStartElement(EJB3SubsystemXMLElement.CLUSTER_PASSIVATION_STORE.getLocalName());
ModelNode store = property.getValue();
writer.writeAttribute(EJB3SubsystemXMLAttribute.NAME.getLocalName(), property.getName());
LegacyPassivationStoreResourceDefinition.IDLE_TIMEOUT.marshallAsAttribute(store, writer);
LegacyPassivationStoreResourceDefinition.IDLE_TIMEOUT_UNIT.marshallAsAttribute(store, writer);
ClusterPassivationStoreResourceDefinition.MAX_SIZE.marshallAsAttribute(store, writer);
ClusterPassivationStoreResourceDefinition.CACHE_CONTAINER.marshallAsAttribute(store, writer);
ClusterPassivationStoreResourceDefinition.BEAN_CACHE.marshallAsAttribute(store, writer);
ClusterPassivationStoreResourceDefinition.CLIENT_MAPPINGS_CACHE.marshallAsAttribute(store, writer);
ClusterPassivationStoreResourceDefinition.PASSIVATE_EVENTS_ON_REPLICATE.marshallAsAttribute(store, writer);
writer.writeEndElement();
}
}
}
use of org.jboss.dmr.Property in project wildfly by wildfly.
the class EJB3SubsystemXMLPersister method writeBeanInstancePools.
private void writeBeanInstancePools(final XMLExtendedStreamWriter writer, final ModelNode beanInstancePoolModelNode) throws XMLStreamException {
if (beanInstancePoolModelNode.hasDefined(EJB3SubsystemModel.STRICT_MAX_BEAN_INSTANCE_POOL)) {
final List<Property> strictMaxPools = beanInstancePoolModelNode.get(EJB3SubsystemModel.STRICT_MAX_BEAN_INSTANCE_POOL).asPropertyList();
for (Property property : strictMaxPools) {
// <strict-max-pool>
writer.writeStartElement(EJB3SubsystemXMLElement.STRICT_MAX_POOL.getLocalName());
// contents of strict-max-pool
this.writeStrictMaxPoolConfig(writer, property);
// </strict-max-pool>
writer.writeEndElement();
}
}
}
use of org.jboss.dmr.Property in project wildfly by wildfly.
the class EJB3SubsystemXMLPersister method writeRemotingEjbReceivers.
private void writeRemotingEjbReceivers(final XMLExtendedStreamWriter writer, final ModelNode profileNode) throws XMLStreamException {
final List<Property> receivers = profileNode.get(REMOTING_EJB_RECEIVER).asPropertyList();
for (final Property property : receivers) {
writer.writeStartElement(REMOTING_EJB_RECEIVER);
writer.writeAttribute(EJB3SubsystemXMLAttribute.NAME.getLocalName(), property.getName());
final ModelNode receiverNode = property.getValue();
RemotingEjbReceiverDefinition.OUTBOUND_CONNECTION_REF.marshallAsAttribute(receiverNode, writer);
RemotingEjbReceiverDefinition.CONNECT_TIMEOUT.marshallAsAttribute(receiverNode, writer);
if (receiverNode.hasDefined(CHANNEL_CREATION_OPTIONS)) {
writeChannelCreationOptions(writer, receiverNode.get(CHANNEL_CREATION_OPTIONS));
}
writer.writeEndElement();
}
}
use of org.jboss.dmr.Property in project wildfly by wildfly.
the class EJB3SubsystemXMLPersister method writeDatabaseDataStores.
private void writeDatabaseDataStores(final XMLExtendedStreamWriter writer, final ModelNode timerServiceModel) throws XMLStreamException {
if (timerServiceModel.hasDefined(EJB3SubsystemModel.DATABASE_DATA_STORE)) {
List<Property> stores = timerServiceModel.get(EJB3SubsystemModel.DATABASE_DATA_STORE).asPropertyList();
for (Property property : stores) {
writer.writeStartElement(EJB3SubsystemXMLElement.DATABASE_DATA_STORE.getLocalName());
ModelNode store = property.getValue();
writer.writeAttribute(EJB3SubsystemXMLAttribute.NAME.getLocalName(), property.getName());
DatabaseDataStoreResourceDefinition.DATASOURCE_JNDI_NAME.marshallAsAttribute(store, writer);
DatabaseDataStoreResourceDefinition.DATABASE.marshallAsAttribute(store, writer);
DatabaseDataStoreResourceDefinition.PARTITION.marshallAsAttribute(store, writer);
DatabaseDataStoreResourceDefinition.REFRESH_INTERVAL.marshallAsAttribute(store, writer);
DatabaseDataStoreResourceDefinition.ALLOW_EXECUTION.marshallAsAttribute(store, writer);
writer.writeEndElement();
}
}
}
Aggregations