use of org.jboss.metadata.ejb.spec.StatefulTimeoutMetaData in project wildfly by wildfly.
the class StatefulTimeoutMergingProcessor method handleDeploymentDescriptor.
@Override
protected void handleDeploymentDescriptor(final DeploymentUnit deploymentUnit, final DeploymentReflectionIndex deploymentReflectionIndex, final Class<?> componentClass, final StatefulComponentDescription componentConfiguration) throws DeploymentUnitProcessingException {
final SessionBeanMetaData data = componentConfiguration.getDescriptorData();
if (data == null) {
return;
}
if (data instanceof SessionBean31MetaData) {
SessionBean31MetaData sessionBean31MetaData = (SessionBean31MetaData) data;
final StatefulTimeoutMetaData statefulTimeout = sessionBean31MetaData.getStatefulTimeout();
if (statefulTimeout != null) {
TimeUnit unit = TimeUnit.MINUTES;
if (statefulTimeout.getUnit() != null) {
unit = statefulTimeout.getUnit();
}
componentConfiguration.setStatefulTimeout(new StatefulTimeoutInfo(statefulTimeout.getTimeout(), unit));
}
}
}
Aggregations