Search in sources :

Example 1 with MessageDestinationsMetaData

use of org.jboss.metadata.javaee.spec.MessageDestinationsMetaData in project wildfly by wildfly.

the class AssemblyDescriptorProcessor method deploy.

@Override
public void deploy(DeploymentPhaseContext phaseContext) throws DeploymentUnitProcessingException {
    // get the deployment unit
    final DeploymentUnit deploymentUnit = phaseContext.getDeploymentUnit();
    // find the EJB jar metadata and start processing it
    final EjbJarMetaData ejbJarMetaData = deploymentUnit.getAttachment(EjbDeploymentAttachmentKeys.EJB_JAR_METADATA);
    if (ejbJarMetaData == null) {
        return;
    }
    // process assembly-descriptor stuff
    final AssemblyDescriptorMetaData assemblyDescriptor = ejbJarMetaData.getAssemblyDescriptor();
    if (assemblyDescriptor != null) {
        // get hold of the ejb jar description (to which we'll be adding this assembly description metadata)
        final EjbJarDescription ejbJarDescription = deploymentUnit.getAttachment(EjbDeploymentAttachmentKeys.EJB_JAR_DESCRIPTION);
        final EEModuleDescription eeModuleDescription = deploymentUnit.getAttachment(Attachments.EE_MODULE_DESCRIPTION);
        // process security-role(s)
        this.processSecurityRoles(assemblyDescriptor.getSecurityRoles(), ejbJarDescription);
        final MessageDestinationsMetaData destinations = assemblyDescriptor.getMessageDestinations();
        if (destinations != null) {
            processMessageDestinations(destinations, eeModuleDescription);
        }
    }
}
Also used : EEModuleDescription(org.jboss.as.ee.component.EEModuleDescription) MessageDestinationsMetaData(org.jboss.metadata.javaee.spec.MessageDestinationsMetaData) EjbJarMetaData(org.jboss.metadata.ejb.spec.EjbJarMetaData) EjbJarDescription(org.jboss.as.ejb3.deployment.EjbJarDescription) AssemblyDescriptorMetaData(org.jboss.metadata.ejb.spec.AssemblyDescriptorMetaData) DeploymentUnit(org.jboss.as.server.deployment.DeploymentUnit)

Aggregations

EEModuleDescription (org.jboss.as.ee.component.EEModuleDescription)1 EjbJarDescription (org.jboss.as.ejb3.deployment.EjbJarDescription)1 DeploymentUnit (org.jboss.as.server.deployment.DeploymentUnit)1 AssemblyDescriptorMetaData (org.jboss.metadata.ejb.spec.AssemblyDescriptorMetaData)1 EjbJarMetaData (org.jboss.metadata.ejb.spec.EjbJarMetaData)1 MessageDestinationsMetaData (org.jboss.metadata.javaee.spec.MessageDestinationsMetaData)1