org.wildfly.extension.clustering.ejb.DistributableEjbXMLDescriptionFactory Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of wildfly-clustering-ejb-extension Show documentation
Show all versions of wildfly-clustering-ejb-extension Show documentation
Installs an extension that provides the distributable-ejb subsystem, that defines a set of profiles for use by distributable ejb applications.
/*
* Copyright The WildFly Authors
* SPDX-License-Identifier: Apache-2.0
*/
package org.wildfly.extension.clustering.ejb;
import static org.jboss.as.controller.PersistentResourceXMLDescription.builder;
import java.util.function.Function;
import java.util.stream.Stream;
import org.jboss.as.clustering.controller.Attribute;
import org.jboss.as.controller.PersistentResourceXMLDescription;
/**
* Parser description for the distributable-ejb subsystem.
* @author Paul Ferraro
* @author Richard Achmatowicz
*/
public enum DistributableEjbXMLDescriptionFactory implements Function {
INSTANCE;
@Override
public PersistentResourceXMLDescription apply(DistributableEjbSubsystemSchema schema) {
return builder(DistributableEjbResourceDefinition.PATH, schema.getNamespace()).addAttributes(Attribute.stream(DistributableEjbResourceDefinition.Attribute.class))
.addChild(builder(InfinispanBeanManagementResourceDefinition.WILDCARD_PATH).addAttributes(Stream.concat(Attribute.stream(BeanManagementResourceDefinition.Attribute.class), Attribute.stream(InfinispanBeanManagementResourceDefinition.Attribute.class))))
.addChild(builder(LocalClientMappingsRegistryProviderResourceDefinition.PATH).setXmlElementName("local-client-mappings-registry"))
.addChild(builder(InfinispanClientMappingsRegistryProviderResourceDefinition.PATH).addAttributes(Attribute.stream(InfinispanClientMappingsRegistryProviderResourceDefinition.Attribute.class)).setXmlElementName("infinispan-client-mappings-registry"))
.addChild(builder(InfinispanTimerManagementResourceDefinition.WILDCARD_PATH).addAttributes(Attribute.stream(InfinispanTimerManagementResourceDefinition.Attribute.class)).setXmlElementName("infinispan-timer-management"))
.build();
}
}