com.caucho.ejb.inject
Class SessionRegistrationBean<X,T>

java.lang.Object
  extended by com.caucho.config.inject.AbstractBean<T>
      extended by com.caucho.config.inject.BeanAdapter<X,T>
          extended by com.caucho.ejb.inject.SessionRegistrationBean<X,T>
All Implemented Interfaces:
AnnotatedBean, InjectEnvironmentBean, ObjectProxy, Contextual<T>, Bean<T>

@Module
public class SessionRegistrationBean<X,T>
extends BeanAdapter<X,T>
implements InjectEnvironmentBean

Internal registration for the EJB.


Constructor Summary
SessionRegistrationBean(InjectManager beanManager, AbstractSessionContext<X,T> context, Bean<X> bean, BeanName beanName)
           
 
Method Summary
 T create(CreationalContext<T> env)
          Creates a new instance for the Contextual's type.
 void destroy(T instance, CreationalContext<T> cxt)
          Destroys an instance for the Contextual's type.
 InjectManager getCdiManager()
           
 java.lang.String getName()
          The registration bean is not registered by name
 java.util.Set<java.lang.annotation.Annotation> getQualifiers()
          Returns the bean's qualifier annotations.
 java.util.Set<java.lang.reflect.Type> getTypes()
          Returns the types that the bean exports for bindings.
 
Methods inherited from class com.caucho.config.inject.BeanAdapter
getAnnotated, getBean, getBeanClass, getInjectionPoints, getScope, getStereotypes, isAlternative, isNullable
 
Methods inherited from class com.caucho.config.inject.AbstractBean
calculatePassivationId, createObject, getAnnotatedType, getBeanManager, getId, getInjectionTarget, getJavaClass, introspect, isPassivationCapable, toDisplayString, toDisplayStringImpl, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SessionRegistrationBean

public SessionRegistrationBean(InjectManager beanManager,
                               AbstractSessionContext<X,T> context,
                               Bean<X> bean,
                               BeanName beanName)
Method Detail

getCdiManager

public InjectManager getCdiManager()
Specified by:
getCdiManager in interface InjectEnvironmentBean

getName

public java.lang.String getName()
The registration bean is not registered by name

Specified by:
getName in interface Bean<T>
Overrides:
getName in class BeanAdapter<X,T>

getQualifiers

public java.util.Set<java.lang.annotation.Annotation> getQualifiers()
Description copied from interface: Bean
Returns the bean's qualifier annotations.

Specified by:
getQualifiers in interface Bean<T>
Overrides:
getQualifiers in class BeanAdapter<X,T>

create

public T create(CreationalContext<T> env)
Description copied from interface: Contextual
Creates a new instance for the Contextual's type. If the instance already exists in the CreationalContext, create will return it instead of creating a new instance.
  1. create an instance of the bean
  2. create interceptor and decorator stacks
  3. inject dependencies
  4. set any XML-configured values
  5. call @PostConstruct

Specified by:
create in interface Contextual<T>
Specified by:
create in class BeanAdapter<X,T>
Parameters:
env - the creation context used to support circular references.
Returns:
the new instance

destroy

public void destroy(T instance,
                    CreationalContext<T> cxt)
Description copied from interface: Contextual
Destroys an instance for the Contextual's type.
  1. Call any @Disposal method
  2. Call @PreDestroy methods
  3. Destroy dependent objects

Specified by:
destroy in interface Contextual<T>
Specified by:
destroy in class BeanAdapter<X,T>
Parameters:
instance - the instance to destroy

getTypes

public java.util.Set<java.lang.reflect.Type> getTypes()
Description copied from class: BeanAdapter
Returns the types that the bean exports for bindings.

Specified by:
getTypes in interface Bean<T>
Overrides:
getTypes in class BeanAdapter<X,T>