use of org.jboss.as.ee.component.EEModuleClassDescription in project wildfly by wildfly.
the class StartupMergingProcessor method handleAnnotations.
@Override
protected void handleAnnotations(final DeploymentUnit deploymentUnit, final EEApplicationClasses applicationClasses, final DeploymentReflectionIndex deploymentReflectionIndex, final Class<?> componentClass, final SingletonComponentDescription description) throws DeploymentUnitProcessingException {
EEModuleClassDescription clazz = applicationClasses.getClassByName(componentClass.getName());
if (clazz != null) {
final ClassAnnotationInformation<Startup, Object> data = clazz.getAnnotationInformation(Startup.class);
if (data != null) {
if (!data.getClassLevelAnnotations().isEmpty()) {
description.initOnStartup();
description.getModuleDescription().registerStartupBean();
}
}
}
}
use of org.jboss.as.ee.component.EEModuleClassDescription in project wildfly by wildfly.
the class StatefulTimeoutMergingProcessor method handleAnnotations.
@Override
protected void handleAnnotations(final DeploymentUnit deploymentUnit, final EEApplicationClasses applicationClasses, final DeploymentReflectionIndex deploymentReflectionIndex, final Class<?> componentClass, final StatefulComponentDescription componentConfiguration) throws DeploymentUnitProcessingException {
final EEModuleClassDescription clazz = applicationClasses.getClassByName(componentClass.getName());
//we only care about annotations on the bean class itself
if (clazz == null) {
return;
}
final ClassAnnotationInformation<StatefulTimeout, StatefulTimeoutInfo> timeout = clazz.getAnnotationInformation(StatefulTimeout.class);
if (timeout == null) {
return;
}
if (!timeout.getClassLevelAnnotations().isEmpty()) {
componentConfiguration.setStatefulTimeout(timeout.getClassLevelAnnotations().get(0));
}
}
use of org.jboss.as.ee.component.EEModuleClassDescription 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));
}
}
use of org.jboss.as.ee.component.EEModuleClassDescription in project wildfly by wildfly.
the class MdbDeliveryMergingProcessor method handleAnnotations.
@Override
protected void handleAnnotations(final DeploymentUnit deploymentUnit, final EEApplicationClasses applicationClasses, final DeploymentReflectionIndex deploymentReflectionIndex, final Class<?> componentClass, final MessageDrivenComponentDescription componentConfiguration) throws DeploymentUnitProcessingException {
final EEModuleClassDescription clazz = applicationClasses.getClassByName(componentClass.getName());
//we only care about annotations on the bean class itself
if (clazz == null) {
return;
}
final ClassAnnotationInformation<DeliveryActive, Boolean> deliveryActive = clazz.getAnnotationInformation(DeliveryActive.class);
if (deliveryActive != null) {
if (!deliveryActive.getClassLevelAnnotations().isEmpty()) {
componentConfiguration.setDeliveryActive(deliveryActive.getClassLevelAnnotations().get(0));
}
}
final ClassAnnotationInformation<DeliveryGroup, String> deliveryGroup = clazz.getAnnotationInformation(DeliveryGroup.class);
if (deliveryGroup != null) {
if (!deliveryGroup.getClassLevelAnnotations().isEmpty()) {
componentConfiguration.setDeliveryGroup(deliveryGroup.getClassLevelAnnotations().get(0));
}
}
}
use of org.jboss.as.ee.component.EEModuleClassDescription in project wildfly by wildfly.
the class RunAsMergingProcessor method handleAnnotations.
@Override
protected void handleAnnotations(final DeploymentUnit deploymentUnit, final EEApplicationClasses applicationClasses, final DeploymentReflectionIndex deploymentReflectionIndex, final Class<?> componentClass, final EJBComponentDescription componentConfiguration) throws DeploymentUnitProcessingException {
final EEModuleClassDescription clazz = applicationClasses.getClassByName(componentClass.getName());
// we only care about annotations on the bean class itself
if (clazz == null) {
return;
}
final ClassAnnotationInformation<RunAs, String> runAs = clazz.getAnnotationInformation(RunAs.class);
if (runAs == null) {
return;
}
if (!runAs.getClassLevelAnnotations().isEmpty()) {
componentConfiguration.setRunAs(runAs.getClassLevelAnnotations().get(0));
}
final ClassAnnotationInformation<RunAsPrincipal, String> runAsPrincipal = clazz.getAnnotationInformation(RunAsPrincipal.class);
String principal = DEFAULT_RUN_AS_PRINCIPAL;
if (runAsPrincipal != null) {
if (!runAsPrincipal.getClassLevelAnnotations().isEmpty()) {
principal = runAsPrincipal.getClassLevelAnnotations().get(0);
}
}
componentConfiguration.setRunAsPrincipal(principal);
}
Aggregations