/** * 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 ejbSingletonDescriptor = (EjbSessionDescriptor) ejbDesc; Class ejbClass = (Class) ainfo.getAnnotatedElement(); Singleton singleton = (Singleton) ainfo.getAnnotation(); // set session bean type in case it wasn't set in a sparse ejb-jar.xml. if( !ejbSingletonDescriptor.isSessionTypeSet() ) { ejbSingletonDescriptor.setSessionType(EjbSessionDescriptor.SINGLETON); } doDescriptionProcessing(singleton.description(), ejbDesc); doMappedNameProcessing(singleton.mappedName(), ejbDesc); doSingletonSpecificProcessing(ejbSingletonDescriptor, ejbClass); return setBusinessAndHomeInterfaces(ejbDesc, ainfo); }
/** * 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 ejbSingletonDescriptor = (EjbSessionDescriptor) ejbDesc; Class ejbClass = (Class) ainfo.getAnnotatedElement(); Singleton singleton = (Singleton) ainfo.getAnnotation(); // set session bean type in case it wasn't set in a sparse ejb-jar.xml. if( !ejbSingletonDescriptor.isSessionTypeSet() ) { ejbSingletonDescriptor.setSessionType(EjbSessionDescriptor.SINGLETON); } doDescriptionProcessing(singleton.description(), ejbDesc); doMappedNameProcessing(singleton.mappedName(), ejbDesc); doSingletonSpecificProcessing(ejbSingletonDescriptor, ejbClass); return setBusinessAndHomeInterfaces(ejbDesc, ainfo); }
sessionBean.setSessionType(SessionType.SINGLETON); if (singleton.mappedName() != null) { sessionBean.setMappedName(singleton.mappedName());
sessionBean.setSessionType(SessionType.SINGLETON); if (singleton.mappedName() != null) { sessionBean.setMappedName(singleton.mappedName());