|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jboss.ejb3.EJBContainer
public abstract class EJBContainer
Comment
Field Summary | |
---|---|
protected org.jboss.metadata.ejb.jboss.JBossAssemblyDescriptorMetaData |
assembly
|
protected String |
beanClassName
|
protected ClassLoader |
classloader
|
protected int |
defaultConstructorIndex
|
protected String |
ejbName
|
protected Context |
enc
|
protected EjbEncFactory |
encFactory
|
protected Map<String,Map<AccessibleObject,Injector>> |
encInjections
|
protected Map<String,EncInjector> |
encInjectors
|
static String |
ENTITY_MANAGER_FACTORY
|
protected Hashtable |
initialContextProperties
|
protected List<Injector> |
injectors
|
protected InvocationStatistics |
invokeStats
|
static String |
MANAGED_ENTITY_MANAGER_FACTORY
|
protected ObjectName |
objectName
|
protected Pool |
pool
|
protected boolean |
reinitialize
|
protected org.jboss.metadata.ejb.jboss.JBossEnterpriseBeanMetaData |
xml
|
Fields inherited from interface org.jboss.ejb3.Container |
---|
ENC_CTX_NAME |
Constructor Summary | |
---|---|
EJBContainer(String name,
org.jboss.aop.Domain domain,
ClassLoader cl,
String beanClassName,
String ejbName,
Hashtable ctxProperties,
Ejb3Deployment deployment,
org.jboss.metadata.ejb.jboss.JBossEnterpriseBeanMetaData beanMetaData)
|
Method Summary | ||
---|---|---|
protected void |
checkForDuplicateLocalAndRemoteInterfaces()
Ensures that the bean does not implement any one interface as both @Local and @Remote EJBTHREE-1025 |
|
protected Object |
construct()
|
|
void |
create()
|
|
abstract BeanContext<?> |
createBeanContext()
Create a bean context for use in a pool. |
|
Object |
createInterceptor(Class<?> interceptorClass)
Do not call, for BeanContainer. |
|
String |
createObjectName(String ejbName)
Create an object name for the given EJB name in the same JavaEE module. |
|
String |
createObjectName(String unitName,
String ejbName)
Create an object name for the given EJB name in another JavaEE module. |
|
void |
destroy()
|
|
void |
destroyBeanContext(org.jboss.ejb3.interceptors.container.BeanContext<?> ctx)
Do nothing. |
|
protected void |
findPartitionName()
|
|
org.jboss.aop.Advisor |
getAdvisor()
Deprecated. |
|
|
getAnnotation(Class<T> annotationType)
|
|
|
getAnnotation(Class<T> annotationType,
Class<?> clazz)
If class has container overridable annotations, this method will discover those overriden annotations. |
|
|
getAnnotation(Class<T> annotationType,
Class<?> clazz,
Field field)
If class has container overridable annotations, this method will discover those overriden annotations. |
|
|
getAnnotation(Class<T> annotationType,
Class<?> clazz,
Method method)
If class has container overridable annotations, this method will discover those overriden annotations. |
|
|
getAnnotation(Class<T> annotationType,
Field field)
|
|
|
getAnnotation(Class<T> annotationType,
Method method)
|
|
org.jboss.aop.annotation.AnnotationRepository |
getAnnotations()
Deprecated. |
|
org.jboss.metadata.ejb.jboss.JBossAssemblyDescriptorMetaData |
getAssemblyDescriptor()
|
|
Class<?> |
getBeanClass()
|
|
String |
getBeanClassName()
|
|
protected BeanContainer |
getBeanContainer()
|
|
List<Class<?>> |
getBusinessInterfaces()
Return all the business interfaces implemented by this bean. |
|
|
getBusinessObject(BeanContext<?> beanContext,
Class<T> businessInterface)
|
|
org.jboss.jca.spi.ComponentStack |
getCachedConnectionManager()
|
|
ClassLoader |
getClassloader()
|
|
Class<?> |
getClazz()
Deprecated. use getBeanClass |
|
DependencyPolicy |
getDependencyPolicy()
|
|
Ejb3Deployment |
getDeployment()
|
|
String |
getDeploymentDescriptorType()
For error messages |
|
String |
getDeploymentPropertyListString()
Returns a String identifier for this bean that is qualified by the deployment, and hence should be unique across deployments. |
|
String |
getDeploymentQualifiedName()
|
|
DeploymentUnit |
getDeploymentUnit()
|
|
static
|
getEJBContainer(org.jboss.aop.Advisor advisor)
|
|
String |
getEjbJndiName(Class businessInterface)
|
|
String |
getEjbJndiName(String link,
Class businessInterface)
|
|
String |
getEjbName()
|
|
Context |
getEnc()
|
|
Map<String,Map<AccessibleObject,Injector>> |
getEncInjections()
|
|
Map<String,EncInjector> |
getEncInjectors()
|
|
org.jboss.metadata.javaee.spec.Environment |
getEnvironmentRefGroup()
|
|
protected Class[] |
getHandledCallbacks()
|
|
String |
getIdentifier()
Some identifier that can be used in error messages |
|
InitialContext |
getInitialContext()
|
|
Hashtable |
getInitialContextProperties()
|
|
List<Injector> |
getInjectors()
|
|
InterceptorInfoRepository |
getInterceptorRepository()
|
|
Lock |
getInvocationLock()
|
|
Object |
getInvokedBusinessInterface(BeanContext beanContext)
|
|
protected Object |
getInvokedInterface(Method method)
|
|
InvocationStatistics |
getInvokeStats()
|
|
String |
getJaccContextId()
|
|
protected org.jboss.aop.MethodInfo |
getMethodInfo(Method method)
Deprecated. |
|
JavaEEModule |
getModule()
Returns the module of which this component is a part. |
|
String |
getName()
|
|
protected Method |
getNonBridgeMethod(Method bridgeMethod)
|
|
ObjectName |
getObjectName()
|
|
String |
getPartitionName()
Gets the name of the cluster partition with which this container is associated. |
|
Pool |
getPool()
|
|
org.jboss.virtual.VirtualFile |
getRootFile()
|
|
|
getSecurityManager(Class<T> type)
Get the security manager associated with a container. |
|
protected Method |
getTimeoutCallback(org.jboss.metadata.ejb.spec.NamedMethodMetaData timeoutMethodMetaData,
Class<?> beanClass)
|
|
List<Method> |
getVirtualMethods()
Do not call, used by BeanContainer. |
|
org.jboss.metadata.ejb.jboss.JBossEnterpriseBeanMetaData |
getXml()
|
|
abstract boolean |
hasJNDIBinding(String jndiName)
|
|
protected void |
initializePool()
|
|
void |
injectBeanContext(BeanContext<?> beanContext)
Note this method is a WIP. |
|
void |
instantiated()
After XML processing has been done this allows the container to further initialize the meta data. |
|
protected void |
invokeCallback(BeanContext<?> beanContext,
Class<? extends Annotation> callbackAnnotationClass)
Note that this method is a WIP. |
|
void |
invokeInit(Object bean,
Class[] initParameterTypes,
Object[] initParameterValues)
|
|
void |
invokePostActivate(BeanContext beanContext)
|
|
void |
invokePostConstruct(BeanContext<?> beanContext)
|
|
void |
invokePostConstruct(BeanContext beanContext,
Object[] params)
Deprecated. |
|
void |
invokePreDestroy(BeanContext beanContext)
|
|
void |
invokePrePassivate(BeanContext beanContext)
|
|
boolean |
isAnnotationPresent(Class<? extends Annotation> annotationType)
|
|
boolean |
isBusinessMethod(Method businessMethod)
Is the method a business method of this container. |
|
boolean |
isClustered()
|
|
protected void |
lockedStart()
|
|
protected void |
lockedStop()
|
|
BeanContext<?> |
peekContext()
|
|
BeanContext<?> |
popContext()
|
|
protected void |
popEnc()
Pops EJB's ENC from the stack. |
|
void |
processMetadata()
introspects EJB container to find all dependencies and initialize any extra metadata. |
|
void |
pushContext(BeanContext<?> beanContext)
|
|
protected void |
pushEnc()
Makes sure that EJB's ENC is available Delegates to whatever implementation is used to push the ENC of the EJB onto the stack |
|
protected void |
reinitialize()
|
|
Object |
resolveAnnotation(Class annotationType)
Deprecated. use getAnnotation |
|
Object |
resolveAnnotation(Field field,
Class annotationType)
Deprecated. use getAnnotation |
|
Object |
resolveAnnotation(Method method,
Class annotationType)
Deprecated. use getAnnotation |
|
Object |
resolveAnnotation(Method m,
Class[] annotationChoices)
Deprecated. this is going to be gone soon |
|
protected abstract List<Class<?>> |
resolveBusinessInterfaces()
|
|
Container |
resolveEjbContainer(Class businessIntf)
|
|
Container |
resolveEjbContainer(String link,
Class businessIntf)
|
|
protected void |
resolveInjectors()
|
|
String |
resolveMessageDestination(String link)
Find a message destination in a deployment. |
|
String |
resolvePersistenceUnitSupplier(String unitName)
Find the MC bean that supplies the specified persistence unit. |
|
void |
setAssemblyDescriptor(org.jboss.metadata.ejb.jboss.JBossAssemblyDescriptorMetaData assembly)
Deprecated. |
|
void |
setCachedConnectionManager(org.jboss.jca.spi.ComponentStack ccm)
|
|
void |
setDirectContainer(org.jboss.ejb3.interceptors.direct.DirectContainer<EJBContainer> container)
|
|
void |
setJaccContextId(String jaccContextId)
|
|
void |
setTransactionManager(TransactionManager tm)
|
|
void |
start()
|
|
void |
stop()
|
|
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.jboss.ejb3.Container |
---|
getMBean, getTimerService, getTimerService |
Field Detail |
---|
protected EjbEncFactory encFactory
protected Pool pool
protected String ejbName
protected ObjectName objectName
protected int defaultConstructorIndex
protected String beanClassName
protected ClassLoader classloader
protected List<Injector> injectors
protected Context enc
protected Hashtable initialContextProperties
protected Map<String,EncInjector> encInjectors
protected org.jboss.metadata.ejb.jboss.JBossEnterpriseBeanMetaData xml
protected org.jboss.metadata.ejb.jboss.JBossAssemblyDescriptorMetaData assembly
protected Map<String,Map<AccessibleObject,Injector>> encInjections
protected InvocationStatistics invokeStats
protected boolean reinitialize
public static final String MANAGED_ENTITY_MANAGER_FACTORY
public static final String ENTITY_MANAGER_FACTORY
Constructor Detail |
---|
public EJBContainer(String name, org.jboss.aop.Domain domain, ClassLoader cl, String beanClassName, String ejbName, Hashtable ctxProperties, Ejb3Deployment deployment, org.jboss.metadata.ejb.jboss.JBossEnterpriseBeanMetaData beanMetaData) throws ClassNotFoundException
name
- Advisor namemanager
- Domain to get interceptor bindings fromcl
- the EJB's classloaderbeanClassName
- ejbName
- ctxProperties
- interceptorRepository
- deployment
- beanMetaData
- the meta data for this bean or null
ClassNotFoundException
Method Detail |
---|
public abstract BeanContext<?> createBeanContext()
Container
createBeanContext
in interface Container
public String createObjectName(String ejbName)
JavaEEComponent
createObjectName
in interface JavaEEComponent
public Object createInterceptor(Class<?> interceptorClass) throws InstantiationException, IllegalAccessException
IllegalAccessException
InstantiationException
public String createObjectName(String unitName, String ejbName)
JavaEEComponent
createObjectName
in interface JavaEEComponent
public void destroyBeanContext(org.jboss.ejb3.interceptors.container.BeanContext<?> ctx)
ctx
- @Deprecated public org.jboss.aop.Advisor getAdvisor()
@Deprecated public org.jboss.aop.annotation.AnnotationRepository getAnnotations()
protected BeanContainer getBeanContainer()
public Class<?> getClazz()
public static <C extends EJBContainer> C getEJBContainer(org.jboss.aop.Advisor advisor)
public String getName()
getName
in interface Container
public void pushContext(BeanContext<?> beanContext)
pushContext
in interface Container
protected void pushEnc()
public BeanContext<?> peekContext()
peekContext
in interface Container
public BeanContext<?> popContext()
popContext
in interface Container
protected void popEnc()
public org.jboss.metadata.javaee.spec.Environment getEnvironmentRefGroup()
getEnvironmentRefGroup
in interface InjectionContainer
public List<Injector> getInjectors()
getInjectors
in interface InjectionContainer
public String getJaccContextId()
public List<Method> getVirtualMethods()
public void setJaccContextId(String jaccContextId)
public org.jboss.virtual.VirtualFile getRootFile()
getRootFile
in interface InjectionContainer
public List<Class<?>> getBusinessInterfaces()
public String getDeploymentQualifiedName()
public String getDeploymentPropertyListString()
getEjbName()
. The "ear=foo.ear" portion is ommitted
if the bean is not packaged in an ear.
public DeploymentUnit getDeploymentUnit()
public Ejb3Deployment getDeployment()
public DependencyPolicy getDependencyPolicy()
getDependencyPolicy
in interface Container
getDependencyPolicy
in interface InjectionContainer
public boolean isAnnotationPresent(Class<? extends Annotation> annotationType)
public boolean isBusinessMethod(Method businessMethod)
businessMethod
- the method in question
public void processMetadata()
processMetadata
in interface Container
dependencyPolicy
- protected void checkForDuplicateLocalAndRemoteInterfaces() throws javax.ejb.EJBException
javax.ejb.EJBException
- If the bean does implements any one interface as both @Local and @Remotepublic org.jboss.metadata.ejb.jboss.JBossEnterpriseBeanMetaData getXml()
public org.jboss.metadata.ejb.jboss.JBossAssemblyDescriptorMetaData getAssemblyDescriptor()
@Deprecated public void setAssemblyDescriptor(org.jboss.metadata.ejb.jboss.JBossAssemblyDescriptorMetaData assembly)
protected abstract List<Class<?>> resolveBusinessInterfaces()
public InterceptorInfoRepository getInterceptorRepository()
public Map<String,EncInjector> getEncInjectors()
getEncInjectors
in interface InjectionContainer
public org.jboss.jca.spi.ComponentStack getCachedConnectionManager()
public ClassLoader getClassloader()
getClassloader
in interface InjectionContainer
public InitialContext getInitialContext()
getInitialContext
in interface Container
public Map<String,Map<AccessibleObject,Injector>> getEncInjections()
getEncInjections
in interface InjectionContainer
public Context getEnc()
getEnc
in interface Container
getEnc
in interface InjectionContainer
public Hashtable getInitialContextProperties()
getInitialContextProperties
in interface Container
public ObjectName getObjectName()
getObjectName
in interface Container
public String getEjbName()
getEjbName
in interface Container
public String getBeanClassName()
public Class<?> getBeanClass()
getBeanClass
in interface Container
public Pool getPool()
getPool
in interface Container
public String getPartitionName()
EJBContainer.start()
is completed.
null
if the container is not clusteredprotected Object construct()
protected void reinitialize()
public void create() throws Exception
create
in interface Container
Exception
public final void start() throws Exception
start
in interface Container
Exception
protected void lockedStart() throws Exception
Exception
public final void stop() throws Exception
stop
in interface Container
Exception
protected void lockedStop() throws Exception
Exception
public void destroy() throws Exception
destroy
in interface Container
Exception
public <T> T getSecurityManager(Class<T> type)
Container
getSecurityManager
in interface Container
type
- the type to cast to
protected Method getTimeoutCallback(org.jboss.metadata.ejb.spec.NamedMethodMetaData timeoutMethodMetaData, Class<?> beanClass)
protected void initializePool() throws Exception
Exception
public void injectBeanContext(BeanContext<?> beanContext)
injectBeanContext
in interface Container
protected void invokeCallback(BeanContext<?> beanContext, Class<? extends Annotation> callbackAnnotationClass)
beanContext
- callbackAnnotationClass
- on of PostConstruct, PreDestroy, PostActivate or PrePassivatepublic void invokePostConstruct(BeanContext<?> beanContext)
@Deprecated public void invokePostConstruct(BeanContext beanContext, Object[] params)
invokePostConstruct
in interface Container
public void invokePreDestroy(BeanContext beanContext)
invokePreDestroy
in interface Container
public void invokePostActivate(BeanContext beanContext)
invokePostActivate
in interface Container
public void invokePrePassivate(BeanContext beanContext)
invokePrePassivate
in interface Container
public void invokeInit(Object bean, Class[] initParameterTypes, Object[] initParameterValues)
invokeInit
in interface Container
protected void resolveInjectors() throws Exception
Exception
protected Class[] getHandledCallbacks()
protected void findPartitionName()
public <T> T getBusinessObject(BeanContext<?> beanContext, Class<T> businessInterface) throws IllegalStateException
IllegalStateException
public Object getInvokedBusinessInterface(BeanContext beanContext) throws IllegalStateException
IllegalStateException
protected Object getInvokedInterface(Method method)
public Container resolveEjbContainer(String link, Class businessIntf)
resolveEjbContainer
in interface InjectionContainer
public Container resolveEjbContainer(Class businessIntf) throws NameNotFoundException
resolveEjbContainer
in interface InjectionContainer
NameNotFoundException
public String resolveMessageDestination(String link)
InjectionContainer
resolveMessageDestination
in interface InjectionContainer
link
- the message destination name
public String resolvePersistenceUnitSupplier(String unitName)
ExtendedInjectionContainer
resolvePersistenceUnitSupplier
in interface ExtendedInjectionContainer
unitName
- the name of the persistence unit
public <T extends Annotation> T getAnnotation(Class<T> annotationType)
public <T extends Annotation> T getAnnotation(Class<T> annotationType, Class<?> clazz)
InjectionContainer
getAnnotation
in interface InjectionContainer
public <T extends Annotation> T getAnnotation(Class<T> annotationType, Class<?> clazz, Method method)
InjectionContainer
getAnnotation
in interface InjectionContainer
public <T extends Annotation> T getAnnotation(Class<T> annotationType, Method method)
getAnnotation
in interface InjectionContainer
public <T extends Annotation> T getAnnotation(Class<T> annotationType, Class<?> clazz, Field field)
InjectionContainer
getAnnotation
in interface InjectionContainer
public <T extends Annotation> T getAnnotation(Class<T> annotationType, Field field)
getAnnotation
in interface InjectionContainer
public Object resolveAnnotation(Class annotationType)
public Object resolveAnnotation(Field field, Class annotationType)
public Object resolveAnnotation(Method method, Class annotationType)
public Object resolveAnnotation(Method m, Class[] annotationChoices)
public String getIdentifier()
InjectionContainer
getIdentifier
in interface InjectionContainer
public String getDeploymentDescriptorType()
InjectionContainer
getDeploymentDescriptorType
in interface InjectionContainer
public String getEjbJndiName(Class businessInterface) throws NameNotFoundException
getEjbJndiName
in interface InjectionContainer
NameNotFoundException
public String getEjbJndiName(String link, Class businessInterface)
getEjbJndiName
in interface InjectionContainer
public InvocationStatistics getInvokeStats()
getInvokeStats
in interface Container
@Deprecated protected org.jboss.aop.MethodInfo getMethodInfo(Method method)
public boolean isClustered()
isClustered
in interface Container
public JavaEEModule getModule()
JavaEEComponent
getModule
in interface JavaEEComponent
public abstract boolean hasJNDIBinding(String jndiName)
hasJNDIBinding
in interface InjectionContainer
public void instantiated()
public void setCachedConnectionManager(org.jboss.jca.spi.ComponentStack ccm)
public void setDirectContainer(org.jboss.ejb3.interceptors.direct.DirectContainer<EJBContainer> container)
setDirectContainer
in interface org.jboss.ejb3.interceptors.direct.IndirectContainer<EJBContainer,org.jboss.ejb3.interceptors.direct.DirectContainer<EJBContainer>>
protected Method getNonBridgeMethod(Method bridgeMethod)
public Lock getInvocationLock()
public void setTransactionManager(TransactionManager tm)
public String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |