Class SessionBean<T>

  • Type Parameters:
    T - The type (class) of the bean
    All Implemented Interfaces:
    javax.enterprise.context.spi.Contextual<T>, javax.enterprise.inject.spi.Bean<T>, javax.enterprise.inject.spi.BeanAttributes<T>, javax.enterprise.inject.spi.PassivationCapable, DecorableBean<T>
    Direct Known Subclasses:
    NewSessionBean

    public class SessionBean<T>
    extends AbstractClassBean<T>
    An enterprise bean representation
    Author:
    Pete Muir, Ales Justin
    • Constructor Detail

      • SessionBean

        protected SessionBean​(javax.enterprise.inject.spi.BeanAttributes<T> attributes,
                              EnhancedAnnotatedType<T> type,
                              InternalEjbDescriptor<T> ejbDescriptor,
                              org.jboss.weld.serialization.spi.BeanIdentifier identifier,
                              BeanManagerImpl manager)
        Constructor
        Parameters:
        type - The type of the bean
        manager - The Bean manager
    • Method Detail

      • of

        public static <T> SessionBean<T> of​(javax.enterprise.inject.spi.BeanAttributes<T> attributes,
                                            InternalEjbDescriptor<T> ejbDescriptor,
                                            BeanManagerImpl beanManager,
                                            EnhancedAnnotatedType<T> type)
        Creates a simple, annotation defined Enterprise Web Bean using the annotations specified on type
        Type Parameters:
        T - The type
        Parameters:
        beanManager - the current manager
        type - the AnnotatedType to use
        Returns:
        An Enterprise Web Bean
      • checkConflictingRoles

        protected void checkConflictingRoles()
        Validates for non-conflicting roles
      • checkScopeAllowed

        protected void checkScopeAllowed()
        Check that the scope type is allowed by the stereotypes on the bean and the bean type
      • create

        public T create​(javax.enterprise.context.spi.CreationalContext<T> creationalContext)
        Creates an instance of the bean
        Returns:
        The instance
      • destroy

        public void destroy​(T instance,
                            javax.enterprise.context.spi.CreationalContext<T> creationalContext)
        Specified by:
        destroy in interface javax.enterprise.context.spi.Contextual<T>
        Overrides:
        destroy in class RIBean<T>
      • isClientCanCallRemoveMethods

        public boolean isClientCanCallRemoveMethods()
      • checkObserverMethods

        protected void checkObserverMethods()
        If there are any observer methods, they must be static or business methods.
      • getBusinessMethodSignatures

        protected Set<MethodSignature> getBusinessMethodSignatures()
      • createReference

        public org.jboss.weld.ejb.api.SessionObjectReference createReference()
      • isProxyable

        public boolean isProxyable()
        Specified by:
        isProxyable in class RIBean<T>
      • initializeAfterBeanDiscovery

        public void initializeAfterBeanDiscovery()
        Description copied from class: RIBean
        In particular cases, the deployer must perform some initialization operations only after all beans have been deployed (e.g. for initializing decorators taking into account the possibility of having custom decorators which are deployed through portable extensions)
        Overrides:
        initializeAfterBeanDiscovery in class AbstractBean<T,​Class<T>>
      • registerInterceptors

        protected void registerInterceptors()