Search in sources :

Example 1 with ConcurrencyManagementType

use of javax.ejb.ConcurrencyManagementType in project wildfly by wildfly.

the class ConcurrencyManagementMergingProcessor method handleAnnotations.

@Override
protected void handleAnnotations(final DeploymentUnit deploymentUnit, final EEApplicationClasses applicationClasses, final DeploymentReflectionIndex deploymentReflectionIndex, final Class<?> componentClass, final SessionBeanComponentDescription componentConfiguration) throws DeploymentUnitProcessingException {
    final EEModuleClassDescription clazz = applicationClasses.getClassByName(componentClass.getName());
    //we only care about annotations on the bean class itself
    if (clazz == null) {
        return;
    }
    ClassAnnotationInformation<ConcurrencyManagement, ConcurrencyManagementType> management = clazz.getAnnotationInformation(ConcurrencyManagement.class);
    if (management == null) {
        return;
    }
    if (!management.getClassLevelAnnotations().isEmpty()) {
        componentConfiguration.setConcurrencyManagementType(management.getClassLevelAnnotations().get(0));
    }
}
Also used : ConcurrencyManagement(javax.ejb.ConcurrencyManagement) ConcurrencyManagementType(javax.ejb.ConcurrencyManagementType) EEModuleClassDescription(org.jboss.as.ee.component.EEModuleClassDescription)

Example 2 with ConcurrencyManagementType

use of javax.ejb.ConcurrencyManagementType in project wildfly by wildfly.

the class ConcurrencyManagementMergingProcessor method handleDeploymentDescriptor.

@Override
protected void handleDeploymentDescriptor(final DeploymentUnit deploymentUnit, final DeploymentReflectionIndex deploymentReflectionIndex, final Class<?> componentClass, final SessionBeanComponentDescription componentConfiguration) throws DeploymentUnitProcessingException {
    if (componentConfiguration.getDescriptorData() == null) {
        return;
    }
    SessionBeanMetaData data = componentConfiguration.getDescriptorData();
    if (data instanceof SessionBean31MetaData) {
        SessionBean31MetaData descriptor = (SessionBean31MetaData) data;
        final ConcurrencyManagementType type = descriptor.getConcurrencyManagementType();
        if (type != null) {
            componentConfiguration.setConcurrencyManagementType(type);
        }
    }
}
Also used : ConcurrencyManagementType(javax.ejb.ConcurrencyManagementType) SessionBeanMetaData(org.jboss.metadata.ejb.spec.SessionBeanMetaData) SessionBean31MetaData(org.jboss.metadata.ejb.spec.SessionBean31MetaData)

Aggregations

ConcurrencyManagementType (javax.ejb.ConcurrencyManagementType)2 ConcurrencyManagement (javax.ejb.ConcurrencyManagement)1 EEModuleClassDescription (org.jboss.as.ee.component.EEModuleClassDescription)1 SessionBean31MetaData (org.jboss.metadata.ejb.spec.SessionBean31MetaData)1 SessionBeanMetaData (org.jboss.metadata.ejb.spec.SessionBeanMetaData)1