org.jboss.ejb3.service
Class ServiceContainer

java.lang.Object
  extended by org.jboss.ejb3.EJBContainer
      extended by org.jboss.ejb3.session.SessionContainer
          extended by org.jboss.ejb3.service.ServiceContainer
All Implemented Interfaces:
Container, org.jboss.ejb3.endpoint.Endpoint, org.jboss.ejb3.interceptors.direct.IndirectContainer<EJBContainer,org.jboss.ejb3.interceptors.direct.DirectContainer<EJBContainer>>, JavaEEComponent, org.jboss.ejb3.proxy.spi.container.InvokableContext, org.jboss.ejb3.timerservice.spi.TimedObjectInvoker, ExtendedInjectionContainer, InjectionContainer

public class ServiceContainer
extends SessionContainer
implements org.jboss.ejb3.timerservice.spi.TimedObjectInvoker, org.jboss.ejb3.proxy.spi.container.InvokableContext

Version:
$Revision: 87604 $
Author:
Kabir Khan

Field Summary
 
Fields inherited from class org.jboss.ejb3.session.SessionContainer
proxyDeployer
 
Fields inherited from class org.jboss.ejb3.EJBContainer
assembly, beanClassName, classloader, defaultConstructorIndex, ejbName, enc, encFactory, encInjections, encInjectors, ENTITY_MANAGER_FACTORY, initialContextProperties, injectors, invokeStats, MANAGED_ENTITY_MANAGER_FACTORY, objectName, pool, reinitialize, xml
 
Fields inherited from interface org.jboss.ejb3.Container
ENC_CTX_NAME
 
Constructor Summary
ServiceContainer(MBeanServer server, ClassLoader cl, String beanClassName, String ejbName, org.jboss.aop.Domain domain, Hashtable ctxProperties, Ejb3Deployment deployment, org.jboss.metadata.ejb.jboss.JBossServiceBeanMetaData beanMetaData)
           
 
Method Summary
 void callTimeout(javax.ejb.Timer timer)
           
 void create()
           
 BeanContext<?> createBeanContext()
          Create a bean context for use in a pool.
 Object createLocalProxy(Object id, org.jboss.ejb3.annotation.LocalBinding binding)
           
 Object createRemoteProxy(Object id, org.jboss.ejb3.annotation.RemoteBinding binding)
          Deprecated. 
 Serializable createSession(Class<?>[] initTypes, Object[] initArgs)
          Create session to an EJB bean.
 void destroy()
           
 org.jboss.aop.joinpoint.InvocationResponse dynamicInvoke(org.jboss.aop.joinpoint.Invocation invocation)
          Entry point for remoting-based invocations via InvokableContextClassProxyHack
 Object getAttribute(String attribute)
           
 AttributeList getAttributes(String[] attributes)
           
protected  String getJndiRegistrarBindName()
          Returns the name under which the JNDI Registrar for this container is bound
 Object getMBean()
           
 MBeanInfo getMBeanInfo()
           
 Object getSingleton()
           
 String getTimedObjectId()
           
 javax.ejb.TimerService getTimerService()
           
 javax.ejb.TimerService getTimerService(Object pKey)
          This method is called by EJBTimerServiceImpl to re-establish a persistent timer.
protected  void initBeanContext()
           
 void initializePool()
           
protected  void injectDependencies(BeanContext ctx)
           
 void instantiated()
          After XML processing has been done this allows the container to further initialize the meta data.
 Object invoke(Object proxy, org.jboss.ejb3.common.lang.SerializableMethod method, Object[] args)
          Deprecated. To be removed alongside InvokableContext
 Object invoke(Serializable session, Class<?> invokedBusinessInterface, Method method, Object[] args)
          Invokes upon the specified method, using the specified arguments
 Object invoke(String actionName, Object[] params, String[] signature)
           
 void invokePostConstruct(BeanContext beanContext, Object[] params)
           
 void invokePreDestroy(BeanContext beanContext)
           
 Object localHomeInvoke(Method method, Object[] args)
           
 Object localInvoke(Method method, Object[] args)
          Performs a synchronous or asynchronous local invocation
 Object localInvoke(Object id, Method method, Object[] args)
           
protected  void lockedStart()
           
protected  void lockedStop()
           
 BeanContext<?> peekContext()
           
protected  StatefulContainerInvocation populateInvocation(StatefulContainerInvocation invocation)
          Allow a container sub class to supplement an invocation.
protected  void reinitialize()
           
protected  void removeHandle(javax.ejb.Handle handle)
           
protected  List<Class<?>> resolveBusinessInterfaces()
           
 void setAttribute(Attribute attribute)
           
 AttributeList setAttributes(AttributeList attributes)
           
 void setTimerServiceFactory(org.jboss.ejb3.timerservice.spi.TimerServiceFactory factory)
           
 
Methods inherited from class org.jboss.ejb3.session.SessionContainer
constructProperNoSuchEjbException, createSession, destroySession, getClusterFamilies, getJndiRegistrar, getMetaData, getProxyFactory, getProxyFactory, getProxyFactory, getRemoteBinding, getSessionFactory, getVirtualMethods, hasJNDIBinding, invoke, invokeEJBObjectMethod, isSessionAware, marshallException, marshallResponse, registerWithAopDispatcher, setJndiRegistrar
 
Methods inherited from class org.jboss.ejb3.EJBContainer
checkForDuplicateLocalAndRemoteInterfaces, construct, createInterceptor, createObjectName, createObjectName, destroyBeanContext, findPartitionName, getAdvisor, getAnnotation, getAnnotation, getAnnotation, getAnnotation, getAnnotation, getAnnotation, getAnnotations, getAssemblyDescriptor, getBeanClass, getBeanClassName, getBeanContainer, getBusinessInterfaces, getBusinessObject, getCachedConnectionManager, getClassloader, getClazz, getDependencyPolicy, getDeployment, getDeploymentDescriptorType, getDeploymentPropertyListString, getDeploymentQualifiedName, getDeploymentUnit, getEJBContainer, getEjbJndiName, getEjbJndiName, getEjbName, getEnc, getEncInjections, getEncInjectors, getEnvironmentRefGroup, getHandledCallbacks, getIdentifier, getInitialContext, getInitialContextProperties, getInjectors, getInterceptorRepository, getInvocationLock, getInvokedBusinessInterface, getInvokedInterface, getInvokeStats, getJaccContextId, getMethodInfo, getModule, getName, getNonBridgeMethod, getObjectName, getPartitionName, getPool, getRootFile, getSecurityManager, getTimeoutCallback, getXml, injectBeanContext, invokeCallback, invokeInit, invokePostActivate, invokePostConstruct, invokePrePassivate, isAnnotationPresent, isBusinessMethod, isClustered, popContext, popEnc, processMetadata, pushContext, pushEnc, resolveAnnotation, resolveAnnotation, resolveAnnotation, resolveAnnotation, resolveEjbContainer, resolveEjbContainer, resolveInjectors, resolveMessageDestination, resolvePersistenceUnitSupplier, setAssemblyDescriptor, setCachedConnectionManager, setDirectContainer, setJaccContextId, setTransactionManager, start, stop, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ServiceContainer

public ServiceContainer(MBeanServer server,
                        ClassLoader cl,
                        String beanClassName,
                        String ejbName,
                        org.jboss.aop.Domain domain,
                        Hashtable ctxProperties,
                        Ejb3Deployment deployment,
                        org.jboss.metadata.ejb.jboss.JBossServiceBeanMetaData beanMetaData)
                 throws ClassNotFoundException
Throws:
ClassNotFoundException
Method Detail

callTimeout

public void callTimeout(javax.ejb.Timer timer)
                 throws Exception
Specified by:
callTimeout in interface org.jboss.ejb3.timerservice.spi.TimedObjectInvoker
Throws:
Exception

createBeanContext

public BeanContext<?> createBeanContext()
Description copied from interface: Container
Create a bean context for use in a pool.

Specified by:
createBeanContext in interface Container
Specified by:
createBeanContext in class EJBContainer
Returns:
a ready to use bean context

createSession

public Serializable createSession(Class<?>[] initTypes,
                                  Object[] initArgs)
Description copied from class: SessionContainer
Create session to an EJB bean.

Specified by:
createSession in class SessionContainer
Parameters:
initTypes - the parameter types used by the home's create method
initArgs - the arguments for the home's create method
Returns:
the identifier of the session

getJndiRegistrarBindName

protected String getJndiRegistrarBindName()
Returns the name under which the JNDI Registrar for this container is bound

Specified by:
getJndiRegistrarBindName in class SessionContainer
Returns:

getMBean

public Object getMBean()
Specified by:
getMBean in interface Container

getSingleton

public Object getSingleton()

create

public void create()
            throws Exception
Specified by:
create in interface Container
Overrides:
create in class EJBContainer
Throws:
Exception

instantiated

public void instantiated()
Description copied from class: EJBContainer
After XML processing has been done this allows the container to further initialize the meta data.

Overrides:
instantiated in class SessionContainer

resolveBusinessInterfaces

protected List<Class<?>> resolveBusinessInterfaces()
Overrides:
resolveBusinessInterfaces in class SessionContainer

reinitialize

protected void reinitialize()
Overrides:
reinitialize in class EJBContainer

lockedStart

protected void lockedStart()
                    throws Exception
Overrides:
lockedStart in class SessionContainer
Throws:
Exception

lockedStop

protected void lockedStop()
                   throws Exception
Overrides:
lockedStop in class SessionContainer
Throws:
Exception

destroy

public void destroy()
             throws Exception
Specified by:
destroy in interface Container
Overrides:
destroy in class EJBContainer
Throws:
Exception

initializePool

public void initializePool()
                    throws Exception
Overrides:
initializePool in class EJBContainer
Throws:
Exception

getTimerService

public javax.ejb.TimerService getTimerService()
Specified by:
getTimerService in interface Container

getTimerService

public javax.ejb.TimerService getTimerService(Object pKey)
Description copied from interface: Container
This method is called by EJBTimerServiceImpl to re-establish a persistent timer.

Specified by:
getTimerService in interface Container

invokePostConstruct

public void invokePostConstruct(BeanContext beanContext,
                                Object[] params)
Specified by:
invokePostConstruct in interface Container
Overrides:
invokePostConstruct in class EJBContainer

invokePreDestroy

public void invokePreDestroy(BeanContext beanContext)
Specified by:
invokePreDestroy in interface Container
Overrides:
invokePreDestroy in class EJBContainer

localInvoke

public Object localInvoke(Object id,
                          Method method,
                          Object[] args)
                   throws Throwable
Specified by:
localInvoke in class SessionContainer
Throws:
Throwable

localHomeInvoke

public Object localHomeInvoke(Method method,
                              Object[] args)
                       throws Throwable
Specified by:
localHomeInvoke in class SessionContainer
Throws:
Throwable

localInvoke

public Object localInvoke(Method method,
                          Object[] args)
                   throws Throwable
Performs a synchronous or asynchronous local invocation

Parameters:
provider - If null a synchronous invocation, otherwise an asynchronous
Throws:
Throwable

dynamicInvoke

public org.jboss.aop.joinpoint.InvocationResponse dynamicInvoke(org.jboss.aop.joinpoint.Invocation invocation)
                                                         throws Throwable
Description copied from class: SessionContainer
Entry point for remoting-based invocations via InvokableContextClassProxyHack

Specified by:
dynamicInvoke in interface org.jboss.ejb3.proxy.spi.container.InvokableContext
Specified by:
dynamicInvoke in class SessionContainer
Throws:
Throwable

initBeanContext

protected void initBeanContext()
                        throws RuntimeException
Throws:
RuntimeException

peekContext

public BeanContext<?> peekContext()
Specified by:
peekContext in interface Container
Overrides:
peekContext in class EJBContainer

populateInvocation

protected StatefulContainerInvocation populateInvocation(StatefulContainerInvocation invocation)
Description copied from class: SessionContainer
Allow a container sub class to supplement an invocation. Per default nothing to supplement.

Overrides:
populateInvocation in class SessionContainer
Returns:

injectDependencies

protected void injectDependencies(BeanContext ctx)

getAttribute

public Object getAttribute(String attribute)
                    throws AttributeNotFoundException,
                           MBeanException,
                           ReflectionException
Throws:
AttributeNotFoundException
MBeanException
ReflectionException

setAttribute

public void setAttribute(Attribute attribute)
                  throws AttributeNotFoundException,
                         InvalidAttributeValueException,
                         MBeanException,
                         ReflectionException
Throws:
AttributeNotFoundException
InvalidAttributeValueException
MBeanException
ReflectionException

getAttributes

public AttributeList getAttributes(String[] attributes)

setAttributes

public AttributeList setAttributes(AttributeList attributes)

invoke

@Deprecated
public Object invoke(Object proxy,
                                org.jboss.ejb3.common.lang.SerializableMethod method,
                                Object[] args)
              throws Throwable
Deprecated. To be removed alongside InvokableContext

Specified by:
invoke in interface org.jboss.ejb3.proxy.spi.container.InvokableContext
Throws:
Throwable
See Also:
InvokableContext

invoke

public Object invoke(Serializable session,
                     Class<?> invokedBusinessInterface,
                     Method method,
                     Object[] args)
              throws Throwable
Invokes upon the specified method, using the specified arguments

Specified by:
invoke in interface org.jboss.ejb3.endpoint.Endpoint
Throws:
Throwable
See Also:
Endpoint.invoke(java.io.Serializable, java.lang.Class, java.lang.reflect.Method, java.lang.Object[])

invoke

public Object invoke(String actionName,
                     Object[] params,
                     String[] signature)
              throws MBeanException,
                     ReflectionException
Throws:
MBeanException
ReflectionException

getMBeanInfo

public MBeanInfo getMBeanInfo()

createLocalProxy

public Object createLocalProxy(Object id,
                               org.jboss.ejb3.annotation.LocalBinding binding)
                        throws Exception
Throws:
Exception

createRemoteProxy

@Deprecated
public Object createRemoteProxy(Object id,
                                           org.jboss.ejb3.annotation.RemoteBinding binding)
                         throws Exception
Deprecated. 

Throws:
Exception

getTimedObjectId

public String getTimedObjectId()
Specified by:
getTimedObjectId in interface org.jboss.ejb3.timerservice.spi.TimedObjectInvoker

removeHandle

protected void removeHandle(javax.ejb.Handle handle)
Specified by:
removeHandle in class SessionContainer

setTimerServiceFactory

public void setTimerServiceFactory(org.jboss.ejb3.timerservice.spi.TimerServiceFactory factory)


Copyright © 2010 JBoss, a division of Red Hat, Inc.. All Rights Reserved.