org.jboss.ejb
Class MessageDrivenContainer

java.lang.Object
  extended by org.jboss.mx.util.JBossNotificationBroadcasterSupport
      extended by org.jboss.system.ServiceMBeanSupport
          extended by org.jboss.ejb.Container
              extended by org.jboss.ejb.MessageDrivenContainer
All Implemented Interfaces:
javax.management.MBeanRegistration, javax.management.NotificationBroadcaster, javax.management.NotificationEmitter, AllowedOperationsFlags, ContainerMBean, EJBProxyFactoryContainer, InstancePoolContainer, MessageDrivenContainerMBean, org.jboss.system.Service, org.jboss.system.ServiceMBean

public class MessageDrivenContainer
extends Container
implements EJBProxyFactoryContainer, InstancePoolContainer, MessageDrivenContainerMBean

The container for MessageDriven beans.

Version:
$Revision: 57209 $
Author:
Peter Antman., Rickard Öberg, Marc Fleury, Daniel OConnor, Jason Dillon, Scott Stark

Nested Class Summary
 
Nested classes/interfaces inherited from class org.jboss.ejb.Container
Container.AbstractContainerInterceptor
 
Field Summary
protected  Map beanMapping
          These are the mappings between the remote interface methods and the bean methods.
protected  InstancePool instancePool
          This is the instancepool that is to be used.
protected  Interceptor interceptor
          This is the first interceptor in the chain.
protected  long messageCount
           
 
Fields inherited from class org.jboss.ejb.Container
BASE_EJB_CONTAINER_NAME, beanClass, classLoader, createCount, EJB_CONTAINER_QUERY_NAME, EJB_TIMEOUT, ejbModule, EJBOBJECT_REMOVE, homeInterface, invokeStats, isJaccEnabled, jaccContextID, localClassLoader, localHomeInterface, localInterface, localProxyFactory, lockManager, marshalledInvocationMapping, metaData, ORB_NAME, proxyFactories, proxyFactoryTL, remoteInterface, removeCount, rm, securityProxy, sm, tm, webClassLoader
 
Fields inherited from class org.jboss.system.ServiceMBeanSupport
log, server, SERVICE_CONTROLLER_SIG, serviceName
 
Fields inherited from interface org.jboss.system.ServiceMBean
CREATE_EVENT, CREATED, DESTROY_EVENT, DESTROYED, FAILED, REGISTERED, START_EVENT, STARTED, STARTING, states, STOP_EVENT, STOPPED, STOPPING, UNREGISTERED
 
Fields inherited from interface org.jboss.ejb.AllowedOperationsFlags
IN_AFTER_BEGIN, IN_AFTER_COMPLETION, IN_BEFORE_COMPLETION, IN_BUSINESS_METHOD, IN_EJB_ACTIVATE, IN_EJB_CREATE, IN_EJB_FIND, IN_EJB_HOME, IN_EJB_LOAD, IN_EJB_PASSIVATE, IN_EJB_POST_CREATE, IN_EJB_REMOVE, IN_EJB_STORE, IN_EJB_TIMEOUT, IN_INTERCEPTOR_METHOD, IN_SERVICE_ENDPOINT_METHOD, IN_SET_ENTITY_CONTEXT, IN_SET_MESSAGE_DRIVEN_CONTEXT, IN_SET_SESSION_CONTEXT, IN_UNSET_ENTITY_CONTEXT, NOT_ALLOWED
 
Constructor Summary
MessageDrivenContainer()
           
 
Method Summary
 void addInterceptor(Interceptor in)
           
 javax.ejb.EJBObject createHome()
           
protected  void createService()
          The EJBDeployer calls this method.
protected  void destroyService()
          A default implementation of destroying the container service (no-op).
 javax.ejb.EJBMetaData getEJBMetaDataHome()
           
 Class getHomeClass()
          EJBProxyFactoryContainer - not needed, should we skip inherit this or just throw Error??
 javax.ejb.HomeHandle getHomeHandleHome()
           
 InstancePool getInstancePool()
          Get the instance pool for the container.
 Interceptor getInterceptor()
           
 Class getLocalClass()
          ???
 Class getLocalHomeClass()
          ???
 LocalProxyFactory getLocalProxyFactory()
          ???
 long getMessageCount()
           
 Class getRemoteClass()
          ???
 Object internalInvoke(Invocation mi)
          This method does invocation interpositioning of tx and security, retrieves the instance from an object table, and invokes the method on the particular instance
 Object internalInvokeHome(Invocation mi)
          This method is called when a method call comes in on the Home object.
 void removeHome(javax.ejb.Handle handle)
           
 void removeHome(Object primaryKey)
           
 void setInstancePool(InstancePool instancePool)
           
protected  void startService()
          A default implementation of starting the container service.
protected  void stopService()
          A default implementation of stopping the container service (no-op).
 
Methods inherited from class org.jboss.ejb.Container
addProxyFactory, createBeanClassInstance, getBeanClass, getBeanMetaData, getClassLoader, getCreateCount, getDeploymentInfo, getEjbModule, getEnvContext, getInvokeStats, getJaccContextID, getJmxName, getLocalClassLoader, getLockManager, getMessageDestination, getMethodPermissions, getProxyFactory, getRealmMapping, getRemoveCount, getSecurityManager, getSecurityProxy, getTimerService, getTransactionManager, getWebClassLoader, invoke, isCallByValue, isJaccEnabled, lookupProxyFactory, removeTimerService, restoreTimers, setBeanMetaData, setClassLoader, setDeploymentInfo, setEjbModule, setJaccContextID, setJaccEnabled, setLocalClassLoader, setLockManager, setProxyFactory, setRealmMapping, setSecurityManager, setSecurityProxy, setTransactionManager, setWebClassLoader
 
Methods inherited from class org.jboss.system.ServiceMBeanSupport
create, destroy, getLog, getName, getNextNotificationSequenceNumber, getObjectName, getServer, getServiceName, getState, getStateString, jbossInternalCreate, jbossInternalDescription, jbossInternalDestroy, jbossInternalLifecycle, jbossInternalStart, jbossInternalStop, postDeregister, postRegister, preDeregister, preRegister, start, stop
 
Methods inherited from class org.jboss.mx.util.JBossNotificationBroadcasterSupport
addNotificationListener, getNotificationInfo, handleNotification, nextNotificationSequenceNumber, removeNotificationListener, removeNotificationListener, sendNotification
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.jboss.ejb.EJBProxyFactoryContainer
getProxyFactory
 
Methods inherited from interface org.jboss.ejb.ContainerMBean
getBeanMetaData, getCreateCount, getEjbModule, getEnvContext, getInvokeStats, getRemoveCount, getTimerService, invoke, removeTimerService
 
Methods inherited from interface org.jboss.system.ServiceMBean
getName, getState, getStateString, jbossInternalLifecycle
 
Methods inherited from interface org.jboss.system.Service
create, destroy, start, stop
 

Field Detail

beanMapping

protected Map beanMapping
These are the mappings between the remote interface methods and the bean methods.


instancePool

protected InstancePool instancePool
This is the instancepool that is to be used.


interceptor

protected Interceptor interceptor
This is the first interceptor in the chain. The last interceptor must be provided by the container itself.


messageCount

protected long messageCount
Constructor Detail

MessageDrivenContainer

public MessageDrivenContainer()
Method Detail

getLocalProxyFactory

public LocalProxyFactory getLocalProxyFactory()
Description copied from interface: EJBProxyFactoryContainer
???

Specified by:
getLocalProxyFactory in interface EJBProxyFactoryContainer
Returns:
???

setInstancePool

public void setInstancePool(InstancePool instancePool)

getInstancePool

public InstancePool getInstancePool()
Description copied from interface: InstancePoolContainer
Get the instance pool for the container.

Specified by:
getInstancePool in interface InstancePoolContainer
Returns:
The instance pool for the container.

addInterceptor

public void addInterceptor(Interceptor in)
Specified by:
addInterceptor in class Container

getInterceptor

public Interceptor getInterceptor()

getMessageCount

public long getMessageCount()
Specified by:
getMessageCount in interface MessageDrivenContainerMBean
Returns:
the number of messages delivered

getHomeClass

public Class getHomeClass()
EJBProxyFactoryContainer - not needed, should we skip inherit this or just throw Error??

Specified by:
getHomeClass in interface EJBProxyFactoryContainer
Overrides:
getHomeClass in class Container
Returns:
???

getRemoteClass

public Class getRemoteClass()
Description copied from interface: EJBProxyFactoryContainer
???

Specified by:
getRemoteClass in interface EJBProxyFactoryContainer
Overrides:
getRemoteClass in class Container
Returns:
???

getLocalClass

public Class getLocalClass()
Description copied from interface: EJBProxyFactoryContainer
???

Specified by:
getLocalClass in interface EJBProxyFactoryContainer
Overrides:
getLocalClass in class Container
Returns:
???

getLocalHomeClass

public Class getLocalHomeClass()
Description copied from interface: EJBProxyFactoryContainer
???

Specified by:
getLocalHomeClass in interface EJBProxyFactoryContainer
Overrides:
getLocalHomeClass in class Container
Returns:
???

createService

protected void createService()
                      throws Exception
Description copied from class: Container
The EJBDeployer calls this method. The EJBDeployer has set all the plugins and interceptors that this bean requires and now proceeds to initialize the chain. The method looks for the standard classes in the URL, sets up the naming environment of the bean. The concrete container classes should override this method to introduce implementation specific initialization behaviour.

Overrides:
createService in class Container
Throws:
Exception - if loading the bean class failed (ClassNotFoundException) or setting up "java:" naming environment failed (DeploymentException)

startService

protected void startService()
                     throws Exception
Description copied from class: Container
A default implementation of starting the container service. The container registers it's dynamic MBean interface in the JMX base. The concrete container classes should override this method to introduce implementation specific start behaviour. todo implement the service lifecycle methods in an xmbean interceptor so non lifecycle managed ops are blocked when mbean is not started.

Overrides:
startService in class Container
Throws:
Exception - An exception that occured during start

stopService

protected void stopService()
                    throws Exception
Description copied from class: Container
A default implementation of stopping the container service (no-op). The concrete container classes should override this method to introduce implementation specific stop behaviour.

Overrides:
stopService in class Container
Throws:
Exception

destroyService

protected void destroyService()
                       throws Exception
Description copied from class: Container
A default implementation of destroying the container service (no-op). The concrete container classes should override this method to introduce implementation specific destroy behaviour.

Overrides:
destroyService in class Container
Throws:
Exception

internalInvokeHome

public Object internalInvokeHome(Invocation mi)
                          throws Exception
Description copied from class: Container
This method is called when a method call comes in on the Home object. The Container forwards this call to the interceptor chain for further processing.

Specified by:
internalInvokeHome in class Container
Parameters:
mi - the object holding all info about this invocation
Returns:
the result of the home invocation
Throws:
Error - Not valid for MDB
Exception

internalInvoke

public Object internalInvoke(Invocation mi)
                      throws Exception
This method does invocation interpositioning of tx and security, retrieves the instance from an object table, and invokes the method on the particular instance

Specified by:
internalInvoke in class Container
Throws:
Exception

createHome

public javax.ejb.EJBObject createHome()
                               throws RemoteException,
                                      javax.ejb.CreateException
Throws:
RemoteException
javax.ejb.CreateException

removeHome

public void removeHome(javax.ejb.Handle handle)
                throws RemoteException,
                       javax.ejb.RemoveException
Throws:
RemoteException
javax.ejb.RemoveException

removeHome

public void removeHome(Object primaryKey)
                throws RemoteException,
                       javax.ejb.RemoveException
Throws:
RemoteException
javax.ejb.RemoveException

getEJBMetaDataHome

public javax.ejb.EJBMetaData getEJBMetaDataHome()
                                         throws RemoteException
Throws:
RemoteException

getHomeHandleHome

public javax.ejb.HomeHandle getHomeHandleHome()
                                       throws RemoteException
Throws:
RemoteException


Copyright © 2002 JBoss Group, LLC. All Rights Reserved.