use of org.jboss.metadata.ejb.spec.ConcurrentMethodMetaData in project wildfly by wildfly.
the class EjbConcurrencyMergingProcessor method handleDeploymentDescriptor.
protected void handleDeploymentDescriptor(final DeploymentUnit deploymentUnit, final DeploymentReflectionIndex deploymentReflectionIndex, final Class<?> componentClass, final SessionBeanComponentDescription componentConfiguration) throws DeploymentUnitProcessingException {
if (componentConfiguration.getDescriptorData() == null) {
return;
}
SessionBeanMetaData sessionBeanMetaData = componentConfiguration.getDescriptorData();
if (sessionBeanMetaData instanceof SessionBean31MetaData) {
SessionBean31MetaData descriptor = (SessionBean31MetaData) sessionBeanMetaData;
// handle lock
if (descriptor.getLockType() != null) {
componentConfiguration.setBeanLevelLockType(componentConfiguration.getEJBClassName(), descriptor.getLockType());
}
// handle access timeout
if (descriptor.getAccessTimeout() != null) {
componentConfiguration.setBeanLevelAccessTimeout(componentConfiguration.getEJBClassName(), new AccessTimeoutDetails(descriptor.getAccessTimeout().getTimeout(), descriptor.getAccessTimeout().getUnit()));
}
final ConcurrentMethodsMetaData methods = descriptor.getConcurrentMethods();
if (methods != null) {
for (final ConcurrentMethodMetaData method : methods) {
final Method realMethod = resolveMethod(deploymentReflectionIndex, componentClass, componentClass, method.getMethod());
final MethodIdentifier methodIdentifier = MethodIdentifier.getIdentifierForMethod(realMethod);
if (method.getLockType() != null) {
componentConfiguration.setLockType(method.getLockType(), methodIdentifier);
}
if (method.getAccessTimeout() != null) {
componentConfiguration.setAccessTimeout(new AccessTimeoutDetails(method.getAccessTimeout().getTimeout(), method.getAccessTimeout().getUnit()), methodIdentifier);
}
}
}
}
}
Aggregations