Creates a new instance of StatefulHandler
Create a new EjbDescriptor for a given elementName and AnnotationInfo.paramelementNameparamainforeturna new EjbDescriptor AnnotatedElement ae = ainfo.getAnnotatedElement(); Class ejbClass = (Class)ae; EjbSessionDescriptor newDescriptor = new EjbSessionDescriptor(); newDescriptor.setName(elementName); newDescriptor.setEjbClassName(ejbClass.getName()); newDescriptor.setSessionType(EjbSessionDescriptor.STATEFUL); return newDescriptor;
AnnotatedElement ae = ainfo.getAnnotatedElement(); Class ejbClass = (Class)ae; EjbSessionDescriptor newDescriptor = new EjbSessionDescriptor(); newDescriptor.setName(elementName); newDescriptor.setEjbClassName(ejbClass.getName()); newDescriptor.setSessionType(EjbSessionDescriptor.STATEFUL); return newDescriptor;
Return the name attribute of given annotation.paramannotationreturnname Stateful sfAn = (Stateful)annotation; return sfAn.name();
Stateful sfAn = (Stateful)annotation; return sfAn.name();
returnthe annoation type this annotation handler is handling return Stateful.class;
return Stateful.class;
Check if the given EjbDescriptor matches the given Annotation.paramejbDescparamannotationreturnboolean check for validity of EjbDescriptor return EjbSessionDescriptor.TYPE.equals(ejbDesc.getType());
return EjbSessionDescriptor.TYPE.equals(ejbDesc.getType());
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.paramejbDescparamainforeturnHandlerProcessingResult EjbSessionDescriptor ejbSessionDesc = (EjbSessionDescriptor)ejbDesc; ejbSessionDesc.setStateless(false); Stateful sful = (Stateful) ainfo.getAnnotation(); doDescriptionProcessing(sful.description(), ejbDesc); doMappedNameProcessing(sful.mappedName(), ejbDesc); return setBusinessAndHomeInterfaces(ejbDesc, ainfo);
EjbSessionDescriptor ejbSessionDesc = (EjbSessionDescriptor)ejbDesc; ejbSessionDesc.setStateless(false); Stateful sful = (Stateful) ainfo.getAnnotation(); doDescriptionProcessing(sful.description(), ejbDesc); doMappedNameProcessing(sful.mappedName(), ejbDesc); return setBusinessAndHomeInterfaces(ejbDesc, ainfo);