Class BaseEjbBean<T>
- java.lang.Object
-
- org.apache.webbeans.component.BeanAttributesImpl<T>
-
- org.apache.webbeans.component.AbstractOwbBean<T>
-
- org.apache.webbeans.component.InjectionTargetBean<T>
-
- org.apache.webbeans.ejb.common.component.BaseEjbBean<T>
-
- All Implemented Interfaces:
Serializable,javax.enterprise.context.spi.Contextual<T>,javax.enterprise.inject.spi.Bean<T>,javax.enterprise.inject.spi.BeanAttributes<T>,javax.enterprise.inject.spi.PassivationCapable,org.apache.webbeans.component.EnterpriseBeanMarker,org.apache.webbeans.component.OwbBean<T>
public abstract class BaseEjbBean<T> extends org.apache.webbeans.component.InjectionTargetBean<T> implements org.apache.webbeans.component.EnterpriseBeanMarkerDefines bean contract for the session beans.- Version:
- $Rev$ $Date$
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected javax.enterprise.inject.spi.SessionBeanTypeejbTypeSession bean typestatic Object[]OBJECT_EMPTY
-
Constructor Summary
Constructors Modifier Constructor Description protectedBaseEjbBean(org.apache.webbeans.config.WebBeansContext webBeansContext, javax.enterprise.inject.spi.SessionBeanType type, javax.enterprise.inject.spi.AnnotatedType<T> annotatedType, javax.enterprise.inject.spi.BeanAttributes<T> beanAttributes, Class<T> beanClass, org.apache.webbeans.container.InjectionTargetFactoryImpl<T> factory)Creates a new instance of the session bean.protectedBaseEjbBean(org.apache.webbeans.config.WebBeansContext webBeansContext, javax.enterprise.inject.spi.SessionBeanType type, javax.enterprise.inject.spi.AnnotatedType<T> annotatedType, org.apache.webbeans.component.BeanAttributesImpl<T> beanAttributes, Class<T> beanClass)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddDependentSFSB(Object dependentSFSB, Object proxy)Keep track of which proxies have gotten EJB objects out of a contextprotected voiddestroyStatefulSessionBeanInstance(T proxyInstance, Object ejbInstance)Called when we must ask the container to remove a specificList<Class<?>>getBusinessLocalInterfaces()Subclasses must override this to return local interfaces.ObjectgetDependentSFSBForProxy(Object proxy)StringgetEjbName()Subclasses must override this to return ejb namejavax.enterprise.inject.spi.SessionBeanTypegetEjbType()Gets ejb session type.List<Method>getRemoveMethods()Subclasses can override this.booleanisPassivationCapable()booleanneedsBeanLocalViewAddedToTypes()voidremoveDependentSFSB(Object proxy)Call after observing an @Remove method on an EJB instance-
Methods inherited from class org.apache.webbeans.component.InjectionTargetBean
defineInterceptorsIfNeeded, getAnnotatedType, getInjectionTarget, getProducer, providedId
-
Methods inherited from class org.apache.webbeans.component.AbstractOwbBean
addToStringInfo, create, destroy, equals, getBeanClass, getId, getInjectionPoints, getLogger, getReturnType, getWebBeansContext, getWebBeansType, hashCode, isDependent, isEnabled, isSpecializedBean, setEnabled, setSpecializedBean, toString
-
Methods inherited from class org.apache.webbeans.component.BeanAttributesImpl
getName, getQualifiers, getScope, getStereotypes, getTypes, isAlternative, isNullable
-
-
-
-
Field Detail
-
OBJECT_EMPTY
public static final Object[] OBJECT_EMPTY
-
ejbType
protected final javax.enterprise.inject.spi.SessionBeanType ejbType
Session bean type
-
-
Constructor Detail
-
BaseEjbBean
protected BaseEjbBean(org.apache.webbeans.config.WebBeansContext webBeansContext, javax.enterprise.inject.spi.SessionBeanType type, javax.enterprise.inject.spi.AnnotatedType<T> annotatedType, javax.enterprise.inject.spi.BeanAttributes<T> beanAttributes, Class<T> beanClass, org.apache.webbeans.container.InjectionTargetFactoryImpl<T> factory)Creates a new instance of the session bean.- Parameters:
webBeansContext-
-
-
Method Detail
-
isPassivationCapable
public boolean isPassivationCapable()
-
destroyStatefulSessionBeanInstance
protected void destroyStatefulSessionBeanInstance(T proxyInstance, Object ejbInstance)
Called when we must ask the container to remove a specific- Parameters:
proxyInstance- The contextual referenceejbInstance- The underlying EJB instance to be removed
-
getRemoveMethods
public List<Method> getRemoveMethods()
Subclasses can override this.- Returns:
- remove methods
-
getBusinessLocalInterfaces
public List<Class<?>> getBusinessLocalInterfaces()
Subclasses must override this to return local interfaces.- Returns:
- local business interfaces.
-
getEjbName
public String getEjbName()
Subclasses must override this to return ejb name- Returns:
- ejb name
-
getEjbType
public javax.enterprise.inject.spi.SessionBeanType getEjbType()
Gets ejb session type.- Returns:
- type of the ejb
-
addDependentSFSB
public void addDependentSFSB(Object dependentSFSB, Object proxy)
Keep track of which proxies have gotten EJB objects out of a context- Parameters:
dependentSFSB- The dependent SFSB acquired from the EJB containerproxy- The OWB proxy instance whose method handler acquired the dependnet SFSB
-
removeDependentSFSB
public void removeDependentSFSB(Object proxy)
Call after observing an @Remove method on an EJB instance- Parameters:
proxy- the proxy instance the dependent SFSB is associated with
-
getDependentSFSBForProxy
public Object getDependentSFSBForProxy(Object proxy)
- Parameters:
proxy- an instance of our own proxy- Returns:
- the underlying EJB instance associated with the proxy
-
needsBeanLocalViewAddedToTypes
public boolean needsBeanLocalViewAddedToTypes()
- Returns:
- true if the bean supports a no-interface (bean-class) local view but the container does not return it in the list of business local interfaces.
-
-