Class BeanContext


public class BeanContext extends DeploymentContext
  • Field Details

  • Constructor Details

  • Method Details

    • isDynamicallyImplemented

      public boolean isDynamicallyImplemented()
    • mergeOWBAndOpenEJBInfo

      public void mergeOWBAndOpenEJBInfo()
    • getInterface

      public Class getInterface(InterfaceType interfaceType)
    • getInterfaces

      public List<Class> getInterfaces(InterfaceType interfaceType)
    • getInterfaceType

      public InterfaceType getInterfaceType(Class clazz)
    • addApplicationException

      public void addApplicationException(Class exception, boolean rollback, boolean inherited)
    • getExceptionType

      public ExceptionType getExceptionType(Throwable e)
    • getContainerData

      public Object getContainerData()
    • setContainerData

      public void setContainerData(Object containerData)
    • getClassLoader

      public ClassLoader getClassLoader()
    • getJndiContext

      public Context getJndiContext()
    • getModuleContext

      public ModuleContext getModuleContext()
    • isDestroyed

      public boolean isDestroyed()
    • setDestroyed

      public void setDestroyed(boolean destroyed)
    • getInjections

      public List<Injection> getInjections()
    • getExtendedEntityManagerFactories

      public Index<jakarta.persistence.EntityManagerFactory,BeanContext.EntityManagerConfiguration> getExtendedEntityManagerFactories()
    • setExtendedEntityManagerFactories

      public void setExtendedEntityManagerFactories(Index<jakarta.persistence.EntityManagerFactory,BeanContext.EntityManagerConfiguration> extendedEntityManagerFactories)
    • setContainer

      public void setContainer(Container container)
    • getComponentType

      public BeanType getComponentType()
    • getConcurrencyAttribute

      public jakarta.ejb.LockType getConcurrencyAttribute(Method beanMethod)
    • getLockType

      public jakarta.ejb.LockType getLockType()
    • getTransactionType

      public TransactionType getTransactionType(Method method)
    • getTransactionType

      public TransactionType getTransactionType(Method method, InterfaceType interfaceType)
    • getTransactionType

      public TransactionType getTransactionType()
    • getTransactionPolicyFactory

      public TransactionPolicyFactory getTransactionPolicyFactory()
    • setTransactionPolicyFactory

      public void setTransactionPolicyFactory(TransactionPolicyFactory transactionPolicyFactory)
    • getContainer

      public Container getContainer()
    • getDeploymentID

      public Object getDeploymentID()
    • isBeanManagedTransaction

      public boolean isBeanManagedTransaction()
    • isBeanManagedConcurrency

      public boolean isBeanManagedConcurrency()
    • getHomeInterface

      public Class getHomeInterface()
    • getRemoteInterface

      public Class getRemoteInterface()
    • getLocalHomeInterface

      public Class getLocalHomeInterface()
    • getLocalInterface

      public Class getLocalInterface()
    • getBeanClass

      public Class getBeanClass()
    • getBusinessLocalInterface

      public Class getBusinessLocalInterface()
    • getBusinessRemoteInterface

      public Class getBusinessRemoteInterface()
    • getBusinessLocalInterfaces

      public List<Class> getBusinessLocalInterfaces()
    • getBusinessRemoteInterfaces

      public List<Class> getBusinessRemoteInterfaces()
    • getMdbInterface

      public Class getMdbInterface()
    • getServiceEndpointInterface

      public Class getServiceEndpointInterface()
    • getActivationProperties

      public Map<String,String> getActivationProperties()
    • getPrimaryKeyClass

      public Class getPrimaryKeyClass()
    • getEJBHome

      public jakarta.ejb.EJBHome getEJBHome()
    • getEJBLocalHome

      public jakarta.ejb.EJBLocalHome getEJBLocalHome()
    • getBusinessLocalHome

      public BeanContext.BusinessLocalHome getBusinessLocalHome()
    • getBusinessLocalBeanHome

      public BeanContext.BusinessLocalBeanHome getBusinessLocalBeanHome()
    • getBusinessLocalHome

      public BeanContext.BusinessLocalHome getBusinessLocalHome(Class mainInterface)
    • getBusinessLocalHome

      public BeanContext.BusinessLocalHome getBusinessLocalHome(List<Class> interfaces, Class mainInterface)
    • getBusinessRemoteHome

      public BeanContext.BusinessRemoteHome getBusinessRemoteHome()
    • getBusinessRemoteHome

      public BeanContext.BusinessRemoteHome getBusinessRemoteHome(Class mainInterface)
    • getBusinessRemoteHome

      public BeanContext.BusinessRemoteHome getBusinessRemoteHome(List<Class> interfaces, Class mainInterface)
    • getDestinationId

      public String getDestinationId()
    • setDestinationId

      public void setDestinationId(String destinationId)
    • setBeanManagedTransaction

      public void setBeanManagedTransaction(boolean value)
    • setBeanManagedConcurrency

      public void setBeanManagedConcurrency(boolean beanManagedConcurrency)
    • getJndiEnc

      public Context getJndiEnc()
    • isReentrant

      public boolean isReentrant()
    • setIsReentrant

      public void setIsReentrant(boolean reentrant)
    • getMatchingBeanMethod

      public Method getMatchingBeanMethod(Method interfaceMethod)
    • getMethodContext

      public MethodContext getMethodContext(Method method)
    • iteratorMethodContext

      public Iterator<Map.Entry<Method,MethodContext>> iteratorMethodContext()
    • setMethodConcurrencyAttribute

      public void setMethodConcurrencyAttribute(Method method, jakarta.ejb.LockType concurrencyAttribute)
    • 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

      public List<Method> getRemoveMethods()
    • setRetainIfExeption

      public void setRetainIfExeption(Method removeMethod, boolean retain)
      TODO: Move to MethodContext
    • retainIfExeption

      public boolean retainIfExeption(Method removeMethod)
      TODO: Move to MethodContext
    • getInstanceScopedInterceptors

      public Set<InterceptorData> 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

      public void addSystemInterceptor(Object interceptor)
    • addFirstSystemInterceptor

      public void addFirstSystemInterceptor(Object interceptor)
    • addUserInterceptor

      public void addUserInterceptor(Object interceptor)
    • getUserAndSystemInterceptors

      public List<InterceptorInstance> getUserAndSystemInterceptors()
    • getCallbackInterceptors

      public List<InterceptorData> getCallbackInterceptors()
    • setCallbackInterceptors

      public void setCallbackInterceptors(List<InterceptorData> callbackInterceptors)
    • getCdiInterceptors

      public List<InterceptorData> getCdiInterceptors()
    • setCdiInterceptors

      public void setCdiInterceptors(List<InterceptorData> cdiInterceptors)
    • getMethodInterceptors

      public List<InterceptorData> getMethodInterceptors(Method method)
    • getInterceptorData

      public List<InterceptorData> getInterceptorData()
    • addCdiMethodInterceptor

      public void addCdiMethodInterceptor(Method method, InterceptorData interceptor)
    • setMethodInterceptors

      public void setMethodInterceptors(Method method, List<InterceptorData> interceptors)
    • createMethodMap

      public void createMethodMap() throws SystemException
      Throws:
      SystemException
    • mapMethods

      public void mapMethods(Method interfaceMethod, Method beanMethod)
    • getObjectInterface

      public List<Class> getObjectInterface(Class homeInterface)
    • getCreateMethod

      public Method getCreateMethod()
    • getMatchingPostCreateMethod

      public Method getMatchingPostCreateMethod(Method createMethod)
    • isAsynchronous

      public boolean isAsynchronous(Method method)
    • isCmp2

      public boolean isCmp2()
    • setCmp2

      public void setCmp2(boolean cmp2)
    • getPrimaryKeyField

      public String getPrimaryKeyField()
    • setPrimaryKeyField

      public void setPrimaryKeyField(String primaryKeyField)
    • getKeyGenerator

      public KeyGenerator getKeyGenerator()
    • setKeyGenerator

      public void setKeyGenerator(KeyGenerator keyGenerator)
    • setRemoteQueryResults

      public void setRemoteQueryResults(String methodSignature)
    • isRemoteQueryResults

      public boolean isRemoteQueryResults(String methodSignature)
    • getCmpImplClass

      public Class getCmpImplClass()
    • setCmpImplClass

      public void setCmpImplClass(Class cmpImplClass)
    • getAbstractSchemaName

      public String getAbstractSchemaName()
    • setAbstractSchemaName

      public void setAbstractSchemaName(String abstractSchemaName)
    • getEjbTimeout

      public Method getEjbTimeout()
    • setEjbTimeout

      public void setEjbTimeout(Method ejbTimeout)
    • getEjbTimerService

      public EjbTimerService getEjbTimerService()
    • setEjbTimerService

      public void setEjbTimerService(EjbTimerService ejbTimerService)
    • getEjbName

      public String getEjbName()
    • getModuleID

      public String getModuleID()
    • getModuleName

      public String getModuleName()
    • getRunAs

      public String getRunAs()
    • getRunAsUser

      public String getRunAsUser()
    • setEjbName

      public void setEjbName(String ejbName)
    • setRunAs

      public void setRunAs(String runAs)
    • setRunAsUser

      public void setRunAsUser(String runAsUser)
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • isLoadOnStartup

      public boolean isLoadOnStartup()
    • setLoadOnStartup

      public void setLoadOnStartup(boolean loadOnStartup)
    • getDependsOn

      public Set<String> getDependsOn()
    • isSessionSynchronized

      public boolean isSessionSynchronized()
    • isLocalbean

      public boolean isLocalbean()
    • getBusinessLocalBeanInterface

      public Class getBusinessLocalBeanInterface()
    • getAccessTimeout

      public Duration getAccessTimeout(Method beanMethod)
    • getAccessTimeout

      public Duration getAccessTimeout()
    • setAccessTimeout

      public void setAccessTimeout(Duration accessTimeout)
    • getStatefulTimeout

      public Duration getStatefulTimeout()
    • setStatefulTimeout

      public void setStatefulTimeout(Duration statefulTimeout)
    • getManagedClass

      public Class<Object> getManagedClass()
    • newInstance

      public InstanceContext newInstance() throws Exception
      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

      public Set<Class<?>> getAsynchronousClasses()
    • getAsynchronousMethodSignatures

      public Set<String> getAsynchronousMethodSignatures()
    • createAsynchronousMethodSet

      public void createAsynchronousMethodSet()
    • getProxyClass

      public Class<?> 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

      public void addSecurityRoleReference(String roleName, String roleLink)
    • getSecurityRoleReference

      public String getSecurityRoleReference(String roleName)