Package org.apache.openejb
Class BeanContext
java.lang.Object
org.apache.openejb.DeploymentContext
org.apache.openejb.BeanContext
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interface
static interface
static interface
static class
This ManagedBean is added to all EjbModules to effectively create a sharable "comp" namespace which can be used in for components with undefined namespace such as CDIstatic class
static final class
static interface
static interface
static interface
class
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionBeanContext
(String id, Context jndiContext, ModuleContext moduleContext, Class beanClass, Class homeInterface, Class remoteInterface, Class localHomeInterface, Class localInterface, Class proxy, Class serviceEndpointInterface, List<Class> businessLocals, List<Class> businessRemotes, Class pkClass, BeanType componentType, boolean localBean, boolean passivable) BeanContext
(String id, Context jndiContext, ModuleContext moduleContext, Class beanClass, Class mdbInterface, Map<String, String> activationProperties) -
Method Summary
Modifier and TypeMethodDescriptionvoid
addApplicationException
(Class exception, boolean rollback, boolean inherited) void
addCdiMethodInterceptor
(Method method, InterceptorData interceptor) void
addFirstSystemInterceptor
(Object interceptor) void
addSecurityRoleReference
(String roleName, String roleLink) void
addSystemInterceptor
(Object interceptor) void
addUserInterceptor
(Object interceptor) void
void
getAccessTimeout
(Method beanMethod) getBusinessLocalHome
(Class mainInterface) getBusinessLocalHome
(List<Class> interfaces, Class mainInterface) getBusinessRemoteHome
(Class mainInterface) getBusinessRemoteHome
(List<Class> interfaces, Class mainInterface) jakarta.ejb.LockType
getConcurrencyAttribute
(Method beanMethod) jakarta.ejb.EJBHome
jakarta.ejb.EJBLocalHome
Index<jakarta.persistence.EntityManagerFactory,
BeanContext.EntityManagerConfiguration> When an instance of an EJB is instantiated, everything in this list is also instatiated and tied to the bean instance.getInterface
(InterfaceType interfaceType) getInterfaces
(InterfaceType interfaceType) getInterfaceType
(Class clazz) jakarta.ejb.LockType
getMatchingBeanMethod
(Method interfaceMethod) getMatchingPostCreateMethod
(Method createMethod) getMethodContext
(Method method) getMethodInterceptors
(Method method) getObjectInterface
(Class homeInterface) Class<?>
getRunAs()
getSecurityRoleReference
(String roleName) getTransactionType
(Method method) getTransactionType
(Method method, InterfaceType interfaceType) org.apache.webbeans.config.WebBeansContext
<T> void
inject
(T instance, jakarta.enterprise.context.spi.CreationalContext<T> ctx) boolean
isAsynchronous
(Method method) boolean
boolean
boolean
boolean
isCmp2()
boolean
boolean
boolean
isHidden()
boolean
boolean
boolean
boolean
boolean
boolean
isRemoteQueryResults
(String methodSignature) boolean
void
mapMethods
(Method interfaceMethod, Method beanMethod) void
boolean
retainIfExeption
(Method removeMethod) TODO: Move to MethodContextvoid
setAbstractSchemaName
(String abstractSchemaName) void
setAccessTimeout
(Duration accessTimeout) void
setBeanManagedConcurrency
(boolean beanManagedConcurrency) void
setBeanManagedTransaction
(boolean value) void
setCallbackInterceptors
(List<InterceptorData> callbackInterceptors) void
setCdiInterceptors
(List<InterceptorData> cdiInterceptors) void
setCmp2
(boolean cmp2) void
setCmpImplClass
(Class cmpImplClass) void
setContainer
(Container container) void
setContainerData
(Object containerData) void
setDestinationId
(String destinationId) void
setDestroyed
(boolean destroyed) void
setEjbName
(String ejbName) void
setEjbTimeout
(Method ejbTimeout) void
setEjbTimerService
(EjbTimerService ejbTimerService) void
setExtendedEntityManagerFactories
(Index<jakarta.persistence.EntityManagerFactory, BeanContext.EntityManagerConfiguration> extendedEntityManagerFactories) void
setHidden
(boolean hidden) void
setIsReentrant
(boolean reentrant) void
setKeyGenerator
(KeyGenerator keyGenerator) void
setLoadOnStartup
(boolean loadOnStartup) void
setMethodConcurrencyAttribute
(Method method, jakarta.ejb.LockType concurrencyAttribute) void
setMethodInterceptors
(Method method, List<InterceptorData> interceptors) void
setMethodTransactionAttribute
(Method method, TransactionType transactionType) TODO: Move to MethodContextvoid
setMethodTransactionAttribute
(Method method, TransactionType transactionType, String view) TODO: Move to MethodContextvoid
setPrimaryKeyField
(String primaryKeyField) void
setRemoteQueryResults
(String methodSignature) void
setRetainIfExeption
(Method removeMethod, boolean retain) TODO: Move to MethodContextvoid
void
setRunAsUser
(String runAsUser) void
setStatefulTimeout
(Duration statefulTimeout) void
setTransactionPolicyFactory
(TransactionPolicyFactory transactionPolicyFactory) void
stop()
toString()
Methods inherited from class org.apache.openejb.DeploymentContext
get, getId, getOptions, getProperties, set
-
Field Details
-
USER_INTERCEPTOR_KEY
- See Also:
-
USER_INTERCEPTOR_SEPARATOR
- See Also:
-
-
Constructor Details
-
BeanContext
public BeanContext(String id, Context jndiContext, ModuleContext moduleContext, Class beanClass, Class homeInterface, Class remoteInterface, Class localHomeInterface, Class localInterface, Class proxy, Class serviceEndpointInterface, List<Class> businessLocals, List<Class> businessRemotes, Class pkClass, BeanType componentType, boolean localBean, boolean passivable) throws SystemException - Throws:
SystemException
-
BeanContext
public BeanContext(String id, Context jndiContext, ModuleContext moduleContext, Class beanClass, Class mdbInterface, Map<String, String> activationProperties) throws SystemException- Throws:
SystemException
-
-
Method Details
-
isDynamicallyImplemented
public boolean isDynamicallyImplemented() -
mergeOWBAndOpenEJBInfo
public void mergeOWBAndOpenEJBInfo() -
getInterface
-
getInterfaces
-
getInterfaceType
-
addApplicationException
-
getExceptionType
-
getContainerData
-
setContainerData
-
getClassLoader
-
getJndiContext
-
getModuleContext
-
isDestroyed
public boolean isDestroyed() -
setDestroyed
public void setDestroyed(boolean destroyed) -
getInjections
-
getExtendedEntityManagerFactories
public Index<jakarta.persistence.EntityManagerFactory,BeanContext.EntityManagerConfiguration> getExtendedEntityManagerFactories() -
setExtendedEntityManagerFactories
public void setExtendedEntityManagerFactories(Index<jakarta.persistence.EntityManagerFactory, BeanContext.EntityManagerConfiguration> extendedEntityManagerFactories) -
setContainer
-
getComponentType
-
getConcurrencyAttribute
-
getLockType
public jakarta.ejb.LockType getLockType() -
getTransactionType
-
getTransactionType
-
getTransactionType
-
getTransactionPolicyFactory
-
setTransactionPolicyFactory
-
getContainer
-
getDeploymentID
-
isBeanManagedTransaction
public boolean isBeanManagedTransaction() -
isBeanManagedConcurrency
public boolean isBeanManagedConcurrency() -
getHomeInterface
-
getRemoteInterface
-
getLocalHomeInterface
-
getLocalInterface
-
getBeanClass
-
getBusinessLocalInterface
-
getBusinessRemoteInterface
-
getBusinessLocalInterfaces
-
getBusinessRemoteInterfaces
-
getMdbInterface
-
getServiceEndpointInterface
-
getActivationProperties
-
getPrimaryKeyClass
-
getEJBHome
public jakarta.ejb.EJBHome getEJBHome() -
getEJBLocalHome
public jakarta.ejb.EJBLocalHome getEJBLocalHome() -
getBusinessLocalHome
-
getBusinessLocalBeanHome
-
getBusinessLocalHome
-
getBusinessLocalHome
public BeanContext.BusinessLocalHome getBusinessLocalHome(List<Class> interfaces, Class mainInterface) -
getBusinessRemoteHome
-
getBusinessRemoteHome
-
getBusinessRemoteHome
public BeanContext.BusinessRemoteHome getBusinessRemoteHome(List<Class> interfaces, Class mainInterface) -
getDestinationId
-
setDestinationId
-
setBeanManagedTransaction
public void setBeanManagedTransaction(boolean value) -
setBeanManagedConcurrency
public void setBeanManagedConcurrency(boolean beanManagedConcurrency) -
getJndiEnc
-
isReentrant
public boolean isReentrant() -
setIsReentrant
public void setIsReentrant(boolean reentrant) -
getMatchingBeanMethod
-
getMethodContext
-
iteratorMethodContext
-
setMethodConcurrencyAttribute
-
setMethodTransactionAttribute
public void setMethodTransactionAttribute(Method method, TransactionType transactionType) throws OpenEJBException TODO: Move to MethodContext- Throws:
OpenEJBException
-
setMethodTransactionAttribute
public void setMethodTransactionAttribute(Method method, TransactionType transactionType, String view) throws OpenEJBException TODO: Move to MethodContext- Throws:
OpenEJBException
-
getRemoveMethods
-
setRetainIfExeption
TODO: Move to MethodContext -
retainIfExeption
TODO: Move to MethodContext -
getInstanceScopedInterceptors
When an instance of an EJB is instantiated, everything in this list is also instatiated and tied to the bean instance. Per spec, interceptors are supposed to have the same lifecycle as the bean they wrap. OpenEJB has the concept of interceptors which do not share the same lifecycle as the bean instance -- they may be instantiated elsewhere and simply applied to the bean. The impact is that these interceptors must be multithreaded. It also means we do not add these interceptors to this list and expose them via different means.- Returns:
- standard interceptors sharing the bean lifecycle
-
addSystemInterceptor
-
addFirstSystemInterceptor
-
addUserInterceptor
-
getUserAndSystemInterceptors
-
getCallbackInterceptors
-
setCallbackInterceptors
-
getCdiInterceptors
-
setCdiInterceptors
-
getMethodInterceptors
-
getInterceptorData
-
addCdiMethodInterceptor
-
setMethodInterceptors
-
createMethodMap
- Throws:
SystemException
-
mapMethods
-
getObjectInterface
-
getCreateMethod
-
getMatchingPostCreateMethod
-
isAsynchronous
-
isCmp2
public boolean isCmp2() -
setCmp2
public void setCmp2(boolean cmp2) -
getPrimaryKeyField
-
setPrimaryKeyField
-
getKeyGenerator
-
setKeyGenerator
-
setRemoteQueryResults
-
isRemoteQueryResults
-
getCmpImplClass
-
setCmpImplClass
-
getAbstractSchemaName
-
setAbstractSchemaName
-
getEjbTimeout
-
setEjbTimeout
-
getEjbTimerService
-
setEjbTimerService
-
getEjbName
-
getModuleID
-
getModuleName
-
getRunAs
-
getRunAsUser
-
setEjbName
-
setRunAs
-
setRunAsUser
-
toString
-
isLoadOnStartup
public boolean isLoadOnStartup() -
setLoadOnStartup
public void setLoadOnStartup(boolean loadOnStartup) -
getDependsOn
-
isSessionSynchronized
public boolean isSessionSynchronized() -
isLocalbean
public boolean isLocalbean() -
getBusinessLocalBeanInterface
-
getAccessTimeout
-
getAccessTimeout
-
setAccessTimeout
-
getStatefulTimeout
-
setStatefulTimeout
-
getManagedClass
-
newInstance
- Throws:
Exception
-
inject
public <T> void inject(T instance, jakarta.enterprise.context.spi.CreationalContext<T> ctx) -
getWebBeansContext
public org.apache.webbeans.config.WebBeansContext getWebBeansContext() -
getAsynchronousClasses
-
getAsynchronousMethodSignatures
-
createAsynchronousMethodSet
public void createAsynchronousMethodSet() -
getProxyClass
-
isCdiCompatible
public boolean isCdiCompatible() -
isHidden
public boolean isHidden() -
setHidden
public void setHidden(boolean hidden) -
isPassivatingScope
public boolean isPassivatingScope() -
isPassivable
public boolean isPassivable() -
stop
public void stop() -
addSecurityRoleReference
-
getSecurityRoleReference
-