use of javax.ejb.Stateful in project Payara by payara.
the class StatefulHandler method setEjbDescriptorInfo.
/**
* Set Annotation information to Descriptor.
* This method will also be invoked for an existing descriptor with
* annotation as user may not specific a complete xml.
* @param ejbDesc
* @param ainfo
* @return HandlerProcessingResult
*/
protected HandlerProcessingResult setEjbDescriptorInfo(EjbDescriptor ejbDesc, AnnotationInfo ainfo) throws AnnotationProcessorException {
EjbSessionDescriptor ejbSessionDesc = (EjbSessionDescriptor) ejbDesc;
// set session bean type in case it wasn't set in a sparse ejb-jar.xml.
if (!ejbSessionDesc.isSessionTypeSet()) {
ejbSessionDesc.setSessionType(EjbSessionDescriptor.STATEFUL);
}
Stateful sful = (Stateful) ainfo.getAnnotation();
doDescriptionProcessing(sful.description(), ejbDesc);
doMappedNameProcessing(sful.mappedName(), ejbDesc);
// set passivation capable property in case it wasn't set in ejb-jar.xml
if (!ejbSessionDesc.isPassivationCapableSet()) {
ejbSessionDesc.setPassivationCapable(sful.passivationCapable());
}
return setBusinessAndHomeInterfaces(ejbDesc, ainfo);
}
Aggregations