org.apache.openejb.core
Class CoreDeploymentInfo
java.lang.Object
org.apache.openejb.core.CoreDeploymentInfo
- All Implemented Interfaces:
- DeploymentInfo
public class CoreDeploymentInfo
- extends Object
- implements DeploymentInfo
Constructor Summary |
CoreDeploymentInfo(DeploymentContext context,
Class beanClass,
Class homeInterface,
Class remoteInterface,
Class localHomeInterface,
Class localInterface,
Class serviceEndpointInterface,
List<Class> businessLocals,
List<Class> businessRemotes,
Class pkClass,
BeanType componentType)
|
CoreDeploymentInfo(DeploymentContext context,
Class beanClass,
Class mdbInterface,
Map<String,String> activationProperties)
|
Method Summary |
void |
addApplicationException(Class exception,
boolean rollback)
|
void |
addQuery(Method queryMethod,
String queryString)
|
void |
addSecurityRoleReference(String securityRoleReference,
String linkedRoleName)
|
void |
addSystemInterceptor(Object interceptor)
|
void |
appendMethodPermissions(Method m,
List<String> roleNames)
|
void |
createMethodMap()
|
protected String |
extractHomeBeanMethodName(String methodName)
|
|
get(Class<T> type)
|
String |
getAbstractSchemaName()
|
Map<String,String> |
getActivationProperties()
|
List<Method> |
getAroundInvoke()
|
Collection<String> |
getAuthorizedRoles(Method method)
|
String[] |
getAuthorizedRoles(String action)
|
Class |
getBeanClass()
|
DeploymentInfo.BusinessLocalBeanHome |
getBusinessLocalBeanHome()
|
Class |
getBusinessLocalBeanInterface()
|
DeploymentInfo.BusinessLocalHome |
getBusinessLocalHome()
|
DeploymentInfo.BusinessLocalHome |
getBusinessLocalHome(List<Class> interfaces)
|
Class |
getBusinessLocalInterface()
|
List<Class> |
getBusinessLocalInterfaces()
|
DeploymentInfo.BusinessRemoteHome |
getBusinessRemoteHome()
|
DeploymentInfo.BusinessRemoteHome |
getBusinessRemoteHome(List<Class> interfaces)
|
Class |
getBusinessRemoteInterface()
|
List<Class> |
getBusinessRemoteInterfaces()
|
List<InterceptorData> |
getCallbackInterceptors()
|
ClassLoader |
getClassLoader()
|
Class |
getCmpImplClass()
|
String[] |
getCmrFields()
|
BeanType |
getComponentType()
|
byte |
getConcurrencyAttribute(Method method)
|
Container |
getContainer()
|
Object |
getContainerData()
|
Method |
getCreateMethod()
|
Set<String> |
getDependsOn()
|
Object |
getDeploymentID()
|
String |
getDestinationId()
|
javax.ejb.EJBHome |
getEJBHome()
|
javax.ejb.EJBLocalHome |
getEJBLocalHome()
|
String |
getEjbName()
|
Method |
getEjbTimeout()
|
EjbTimerService |
getEjbTimerService()
|
ExceptionType |
getExceptionType(Throwable e)
|
Index<javax.persistence.EntityManagerFactory,Map> |
getExtendedEntityManagerFactories()
|
Class |
getHomeInterface()
|
List<Injection> |
getInjections()
|
Set<InterceptorData> |
getInstanceScopedInterceptors()
When an instance of an EJB is instantiated, everything in this list
is also instatiated and tied to the bean instance. |
Class |
getInterface(InterfaceType interfaceType)
|
List<Class> |
getInterfaces(InterfaceType interfaceType)
|
InterfaceType |
getInterfaceType(Class clazz)
|
String |
getJarPath()
|
Context |
getJndiEnc()
|
KeyGenerator |
getKeyGenerator()
|
Class |
getLocalHomeInterface()
|
Class |
getLocalInterface()
|
Method |
getMatchingBeanMethod(Method interfaceMethod)
|
Method |
getMatchingPostCreateMethod(Method createMethod)
|
Class |
getMdbInterface()
|
List<InterceptorData> |
getMethodInterceptors(Method method)
|
List<MethodSchedule> |
getMethodSchedules()
|
String |
getModuleID()
|
List<Class> |
getObjectInterface(Class homeInterface)
|
List<Method> |
getPostActivate()
|
List<Method> |
getPostConstruct()
|
List<Method> |
getPreDestroy()
|
List<Method> |
getPrePassivate()
|
Class |
getPrimaryKeyClass()
|
String |
getPrimaryKeyField()
|
Properties |
getProperties()
|
String |
getQuery(Method queryMethod)
|
Class |
getRemoteInterface()
|
List<Method> |
getRemoveMethods()
|
String |
getRunAs()
|
String |
getSecurityRole(String securityRoleReference)
|
Class |
getServiceEndpointInterface()
|
List<InterceptorInstance> |
getSystemInterceptors()
|
TransactionPolicyFactory |
getTransactionPolicyFactory()
|
TransactionType |
getTransactionType(Method method)
|
boolean |
isBeanManagedConcurrency()
|
boolean |
isBeanManagedTransaction()
|
boolean |
isCmp2()
|
boolean |
isDestroyed()
|
boolean |
isLoadOnStartup()
|
boolean |
isLocalbean()
|
boolean |
isReentrant()
|
boolean |
isRemoteQueryResults(String methodSignature)
|
boolean |
isSessionSynchronized()
|
void |
mapMethods(Method interfaceMethod,
Method beanMethod)
|
boolean |
retainIfExeption(Method removeMethod)
|
|
set(Class<T> type,
T value)
|
void |
setAbstractSchemaName(String abstractSchemaName)
|
void |
setActivationProperties(Map<String,String> activationProperties)
|
void |
setBeanManagedConcurrency(boolean beanManagedConcurrency)
|
void |
setBeanManagedTransaction(boolean value)
|
void |
setCallbackInterceptors(List<InterceptorData> callbackInterceptors)
|
void |
setCmp2(boolean cmp2)
|
void |
setCmpImplClass(Class cmpImplClass)
|
void |
setCmrFields(String[] cmrFields)
|
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<javax.persistence.EntityManagerFactory,Map> extendedEntityManagerFactories)
|
void |
setIsReentrant(boolean reentrant)
|
void |
setJarPath(String jarPath)
|
void |
setKeyGenerator(KeyGenerator keyGenerator)
|
void |
setLoadOnStartup(boolean loadOnStartup)
|
void |
setLocalbean(boolean localbean)
|
void |
setMethodConcurrencyAttribute(Method method,
String concurrencyAttribute)
|
void |
setMethodInterceptors(Method method,
List<InterceptorData> interceptors)
|
void |
setMethodSchedules(List<MethodSchedule> schedules)
|
void |
setMethodTransactionAttribute(Method method,
String transAttribute)
|
void |
setModuleId(String moduleId)
|
void |
setPrimaryKeyField(String primaryKeyField)
|
void |
setRemoteQueryResults(String methodSignature)
|
void |
setRetainIfExeption(Method removeMethod,
boolean retain)
|
void |
setRunAs(String runAs)
|
void |
setServiceEndpointInterface(Class serviceEndpointInterface)
|
void |
setTransactionPolicyFactory(TransactionPolicyFactory transactionPolicyFactory)
|
String |
toString()
|
CoreDeploymentInfo
public CoreDeploymentInfo(DeploymentContext context,
Class beanClass,
Class homeInterface,
Class remoteInterface,
Class localHomeInterface,
Class localInterface,
Class serviceEndpointInterface,
List<Class> businessLocals,
List<Class> businessRemotes,
Class pkClass,
BeanType componentType)
throws SystemException
- Throws:
SystemException
CoreDeploymentInfo
public CoreDeploymentInfo(DeploymentContext context,
Class beanClass,
Class mdbInterface,
Map<String,String> activationProperties)
throws SystemException
- Throws:
SystemException
getInterface
public Class getInterface(InterfaceType interfaceType)
- Specified by:
getInterface
in interface DeploymentInfo
getInterfaces
public List<Class> getInterfaces(InterfaceType interfaceType)
- Specified by:
getInterfaces
in interface DeploymentInfo
getInterfaceType
public InterfaceType getInterfaceType(Class clazz)
- Specified by:
getInterfaceType
in interface DeploymentInfo
addApplicationException
public void addApplicationException(Class exception,
boolean rollback)
getExceptionType
public ExceptionType getExceptionType(Throwable e)
- Specified by:
getExceptionType
in interface DeploymentInfo
isDestroyed
public boolean isDestroyed()
- Specified by:
isDestroyed
in interface DeploymentInfo
setDestroyed
public void setDestroyed(boolean destroyed)
get
public <T> T get(Class<T> type)
- Specified by:
get
in interface DeploymentInfo
set
public <T> T set(Class<T> type,
T value)
- Specified by:
set
in interface DeploymentInfo
getProperties
public Properties getProperties()
- Specified by:
getProperties
in interface DeploymentInfo
getInjections
public List<Injection> getInjections()
- Specified by:
getInjections
in interface DeploymentInfo
getExtendedEntityManagerFactories
public Index<javax.persistence.EntityManagerFactory,Map> getExtendedEntityManagerFactories()
setExtendedEntityManagerFactories
public void setExtendedEntityManagerFactories(Index<javax.persistence.EntityManagerFactory,Map> extendedEntityManagerFactories)
getContainerData
public Object getContainerData()
setContainerData
public void setContainerData(Object containerData)
setContainer
public void setContainer(Container container)
- Specified by:
setContainer
in interface DeploymentInfo
getComponentType
public BeanType getComponentType()
- Specified by:
getComponentType
in interface DeploymentInfo
getConcurrencyAttribute
public byte getConcurrencyAttribute(Method method)
getTransactionType
public TransactionType getTransactionType(Method method)
- Specified by:
getTransactionType
in interface DeploymentInfo
getTransactionPolicyFactory
public TransactionPolicyFactory getTransactionPolicyFactory()
- Specified by:
getTransactionPolicyFactory
in interface DeploymentInfo
setTransactionPolicyFactory
public void setTransactionPolicyFactory(TransactionPolicyFactory transactionPolicyFactory)
getAuthorizedRoles
public Collection<String> getAuthorizedRoles(Method method)
- Specified by:
getAuthorizedRoles
in interface DeploymentInfo
getAuthorizedRoles
public String[] getAuthorizedRoles(String action)
- Specified by:
getAuthorizedRoles
in interface DeploymentInfo
getContainer
public Container getContainer()
- Specified by:
getContainer
in interface DeploymentInfo
getDeploymentID
public Object getDeploymentID()
- Specified by:
getDeploymentID
in interface DeploymentInfo
isBeanManagedTransaction
public boolean isBeanManagedTransaction()
- Specified by:
isBeanManagedTransaction
in interface DeploymentInfo
isBeanManagedConcurrency
public boolean isBeanManagedConcurrency()
- Specified by:
isBeanManagedConcurrency
in interface DeploymentInfo
getHomeInterface
public Class getHomeInterface()
- Specified by:
getHomeInterface
in interface DeploymentInfo
getRemoteInterface
public Class getRemoteInterface()
- Specified by:
getRemoteInterface
in interface DeploymentInfo
getLocalHomeInterface
public Class getLocalHomeInterface()
- Specified by:
getLocalHomeInterface
in interface DeploymentInfo
getLocalInterface
public Class getLocalInterface()
- Specified by:
getLocalInterface
in interface DeploymentInfo
getBeanClass
public Class getBeanClass()
- Specified by:
getBeanClass
in interface DeploymentInfo
getBusinessLocalInterface
public Class getBusinessLocalInterface()
- Specified by:
getBusinessLocalInterface
in interface DeploymentInfo
getBusinessRemoteInterface
public Class getBusinessRemoteInterface()
- Specified by:
getBusinessRemoteInterface
in interface DeploymentInfo
getBusinessLocalInterfaces
public List<Class> getBusinessLocalInterfaces()
- Specified by:
getBusinessLocalInterfaces
in interface DeploymentInfo
getBusinessRemoteInterfaces
public List<Class> getBusinessRemoteInterfaces()
- Specified by:
getBusinessRemoteInterfaces
in interface DeploymentInfo
getMdbInterface
public Class getMdbInterface()
- Specified by:
getMdbInterface
in interface DeploymentInfo
getServiceEndpointInterface
public Class getServiceEndpointInterface()
- Specified by:
getServiceEndpointInterface
in interface DeploymentInfo
getActivationProperties
public Map<String,String> getActivationProperties()
- Specified by:
getActivationProperties
in interface DeploymentInfo
setActivationProperties
public void setActivationProperties(Map<String,String> activationProperties)
getPrimaryKeyClass
public Class getPrimaryKeyClass()
- Specified by:
getPrimaryKeyClass
in interface DeploymentInfo
getEJBHome
public javax.ejb.EJBHome getEJBHome()
- Specified by:
getEJBHome
in interface DeploymentInfo
getEJBLocalHome
public javax.ejb.EJBLocalHome getEJBLocalHome()
- Specified by:
getEJBLocalHome
in interface DeploymentInfo
getBusinessLocalHome
public DeploymentInfo.BusinessLocalHome getBusinessLocalHome()
- Specified by:
getBusinessLocalHome
in interface DeploymentInfo
getBusinessLocalBeanHome
public DeploymentInfo.BusinessLocalBeanHome getBusinessLocalBeanHome()
- Specified by:
getBusinessLocalBeanHome
in interface DeploymentInfo
getBusinessLocalHome
public DeploymentInfo.BusinessLocalHome getBusinessLocalHome(List<Class> interfaces)
- Specified by:
getBusinessLocalHome
in interface DeploymentInfo
getBusinessRemoteHome
public DeploymentInfo.BusinessRemoteHome getBusinessRemoteHome()
- Specified by:
getBusinessRemoteHome
in interface DeploymentInfo
getBusinessRemoteHome
public DeploymentInfo.BusinessRemoteHome getBusinessRemoteHome(List<Class> interfaces)
- Specified by:
getBusinessRemoteHome
in interface DeploymentInfo
getDestinationId
public String getDestinationId()
- Specified by:
getDestinationId
in interface DeploymentInfo
setDestinationId
public void setDestinationId(String destinationId)
setBeanManagedTransaction
public void setBeanManagedTransaction(boolean value)
setBeanManagedConcurrency
public void setBeanManagedConcurrency(boolean beanManagedConcurrency)
getJndiEnc
public Context getJndiEnc()
- Specified by:
getJndiEnc
in interface DeploymentInfo
getClassLoader
public ClassLoader getClassLoader()
- Specified by:
getClassLoader
in interface DeploymentInfo
isReentrant
public boolean isReentrant()
- Specified by:
isReentrant
in interface DeploymentInfo
setIsReentrant
public void setIsReentrant(boolean reentrant)
getMatchingBeanMethod
public Method getMatchingBeanMethod(Method interfaceMethod)
appendMethodPermissions
public void appendMethodPermissions(Method m,
List<String> roleNames)
getSecurityRole
public String getSecurityRole(String securityRoleReference)
- Specified by:
getSecurityRole
in interface DeploymentInfo
addSecurityRoleReference
public void addSecurityRoleReference(String securityRoleReference,
String linkedRoleName)
setMethodConcurrencyAttribute
public void setMethodConcurrencyAttribute(Method method,
String concurrencyAttribute)
setMethodTransactionAttribute
public void setMethodTransactionAttribute(Method method,
String transAttribute)
throws OpenEJBException
- Throws:
OpenEJBException
getAroundInvoke
public List<Method> getAroundInvoke()
- Specified by:
getAroundInvoke
in interface DeploymentInfo
getPostConstruct
public List<Method> getPostConstruct()
- Specified by:
getPostConstruct
in interface DeploymentInfo
getPreDestroy
public List<Method> getPreDestroy()
- Specified by:
getPreDestroy
in interface DeploymentInfo
getPostActivate
public List<Method> getPostActivate()
- Specified by:
getPostActivate
in interface DeploymentInfo
getPrePassivate
public List<Method> getPrePassivate()
- Specified by:
getPrePassivate
in interface DeploymentInfo
getRemoveMethods
public List<Method> getRemoveMethods()
- Specified by:
getRemoveMethods
in interface DeploymentInfo
setRetainIfExeption
public void setRetainIfExeption(Method removeMethod,
boolean retain)
retainIfExeption
public boolean retainIfExeption(Method removeMethod)
- Specified by:
retainIfExeption
in interface DeploymentInfo
getMethodSchedules
public List<MethodSchedule> getMethodSchedules()
- Specified by:
getMethodSchedules
in interface DeploymentInfo
setMethodSchedules
public void setMethodSchedules(List<MethodSchedule> schedules)
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)
getSystemInterceptors
public List<InterceptorInstance> getSystemInterceptors()
getCallbackInterceptors
public List<InterceptorData> getCallbackInterceptors()
setCallbackInterceptors
public void setCallbackInterceptors(List<InterceptorData> callbackInterceptors)
getMethodInterceptors
public List<InterceptorData> getMethodInterceptors(Method method)
- Specified by:
getMethodInterceptors
in interface DeploymentInfo
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)
- Specified by:
getObjectInterface
in interface DeploymentInfo
extractHomeBeanMethodName
protected String extractHomeBeanMethodName(String methodName)
getCreateMethod
public Method getCreateMethod()
getMatchingPostCreateMethod
public Method getMatchingPostCreateMethod(Method createMethod)
isCmp2
public boolean isCmp2()
setCmp2
public void setCmp2(boolean cmp2)
getPrimaryKeyField
public String getPrimaryKeyField()
- Specified by:
getPrimaryKeyField
in interface DeploymentInfo
setPrimaryKeyField
public void setPrimaryKeyField(String primaryKeyField)
getCmrFields
public String[] getCmrFields()
setCmrFields
public void setCmrFields(String[] cmrFields)
getKeyGenerator
public KeyGenerator getKeyGenerator()
setKeyGenerator
public void setKeyGenerator(KeyGenerator keyGenerator)
addQuery
public void addQuery(Method queryMethod,
String queryString)
getQuery
public String getQuery(Method queryMethod)
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)
setJarPath
public void setJarPath(String jarPath)
getJarPath
public String getJarPath()
getEjbTimeout
public Method getEjbTimeout()
- Specified by:
getEjbTimeout
in interface DeploymentInfo
setEjbTimeout
public void setEjbTimeout(Method ejbTimeout)
getEjbTimerService
public EjbTimerService getEjbTimerService()
- Specified by:
getEjbTimerService
in interface DeploymentInfo
setEjbTimerService
public void setEjbTimerService(EjbTimerService ejbTimerService)
getEjbName
public String getEjbName()
- Specified by:
getEjbName
in interface DeploymentInfo
getModuleID
public String getModuleID()
- Specified by:
getModuleID
in interface DeploymentInfo
getRunAs
public String getRunAs()
- Specified by:
getRunAs
in interface DeploymentInfo
setEjbName
public void setEjbName(String ejbName)
setModuleId
public void setModuleId(String moduleId)
setRunAs
public void setRunAs(String runAs)
toString
public String toString()
- Overrides:
toString
in class Object
setServiceEndpointInterface
public void setServiceEndpointInterface(Class serviceEndpointInterface)
isLoadOnStartup
public boolean isLoadOnStartup()
- Specified by:
isLoadOnStartup
in interface DeploymentInfo
setLoadOnStartup
public void setLoadOnStartup(boolean loadOnStartup)
getDependsOn
public Set<String> getDependsOn()
- Specified by:
getDependsOn
in interface DeploymentInfo
isSessionSynchronized
public boolean isSessionSynchronized()
- Specified by:
isSessionSynchronized
in interface DeploymentInfo
isLocalbean
public boolean isLocalbean()
setLocalbean
public void setLocalbean(boolean localbean)
getBusinessLocalBeanInterface
public Class getBusinessLocalBeanInterface()
- Specified by:
getBusinessLocalBeanInterface
in interface DeploymentInfo
Copyright © 1999-2013 The Apache OpenEJB development community. All Rights Reserved.