org.jboss.ejb3.mdb
Class ConsumerContainer

java.lang.Object
  extended by org.jboss.ejb3.EJBContainer
      extended by org.jboss.ejb3.mdb.MessagingContainer
          extended by org.jboss.ejb3.mdb.ConsumerContainer
All Implemented Interfaces:
Container, org.jboss.ejb3.interceptors.direct.IndirectContainer<EJBContainer,org.jboss.ejb3.interceptors.direct.DirectContainer<EJBContainer>>, JavaEEComponent, org.jboss.ejb3.timerservice.spi.TimedObjectInvoker, EJBInjectionContainer, ExtendedInjectionContainer, InjectionContainer

public class ConsumerContainer
extends MessagingContainer

Comment

Version:
$Revision: 76006 $
Author:
Bill Burke

Field Summary
static String CONSUMER_MESSAGE
          This is needed because API changed from JBoss 4.0.1sp1 to 4.0.2 TODO remove this after 4.0.2 is out.
protected static String DEFAULT_DESTINATION_TYPE
          Default destination type.
protected  Class messagingType
           
protected  Method ON_MESSAGE
           
protected  ArrayList<ProducerFactory> producers
           
 
Fields inherited from class org.jboss.ejb3.mdb.MessagingContainer
activationSpec, DESTINATION, DESTINATION_TYPE, JMS_ADAPTOR, MAX_SESSION, messageEndpointFactory, PROVIDER_ADAPTER_JNDI, timerService
 
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
ConsumerContainer(String ejbName, org.jboss.aop.Domain domain, ClassLoader cl, String beanClassName, Hashtable ctxProperties, Ejb3Deployment deployment, org.jboss.metadata.ejb.jboss.JBossConsumerBeanMetaData beanMetaData)
           
 
Method Summary
 org.jboss.aop.joinpoint.InvocationResponse dynamicInvoke(org.jboss.aop.joinpoint.Invocation invocation)
           
 Map<String,org.jboss.metadata.ejb.spec.ActivationConfigPropertyMetaData> getActivationConfigProperties()
           
 Class<javax.jms.MessageListener> getMessagingType()
           
 org.jboss.aop.MethodInfo getMethodInfo(Method method)
           
protected  Method getOnMessage()
           
protected  org.jboss.metadata.ejb.spec.NamedMethodMetaData getTimeoutMethodMetaData()
           
 Object localInvoke(org.jboss.aop.MethodInfo info, Object[] args)
           
protected  void lockedStart()
          Initialize the container invoker.
protected  void lockedStop()
           
protected  void populateActivationSpec()
           
protected  void registerProducers()
           
protected  List<Class<?>> resolveBusinessInterfaces()
           
protected  void unregisterProducers()
           
 
Methods inherited from class org.jboss.ejb3.mdb.MessagingContainer
addActivationSpecProperty, callTimeout, createBeanContext, getDestination, getDestinationType, getDestinationType, getJMSProviderAdapter, getJmxName, getKeepAliveMillis, getMaxMessages, getMaxPoolSize, getMaxSession, getMBean, getMetaData, getMinPoolSize, getProviderAdapterJNDI, getResourceAdaptorName, getTimedObjectId, getTimerService, getTimerService, hasJNDIBinding, initializePool, innerCreateQueue, innerCreateTopic, innerStart, isDeliveryActive, localInvoke, parseJndiSuffix, setMessageEndpointFactory, setTimerServiceFactory, startDelivery, startProxies, stopDelivery, stopProxies
 
Methods inherited from class org.jboss.ejb3.EJBContainer
canResolveEJB, checkForDuplicateLocalAndRemoteInterfaces, construct, create, createInterceptor, createObjectName, createObjectName, destroy, 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, getModule, getName, getNonBridgeMethod, getObjectName, getPartitionName, getPool, getRootFile, getSecurityManager, getTimeoutCallback, getVirtualMethods, getXml, injectBeanContext, instantiated, invokeCallback, invokeInit, invokePostActivate, invokePostConstruct, invokePostConstruct, invokePreDestroy, invokePrePassivate, isAnnotationPresent, isBusinessMethod, isClustered, peekContext, popContext, popEnc, processMetadata, pushContext, pushEnc, reinitialize, resolveAnnotation, resolveAnnotation, resolveAnnotation, resolveAnnotation, resolveEJB, 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
 

Field Detail

messagingType

protected Class messagingType

ON_MESSAGE

protected Method ON_MESSAGE

producers

protected ArrayList<ProducerFactory> producers

DEFAULT_DESTINATION_TYPE

protected static final String DEFAULT_DESTINATION_TYPE
Default destination type. Used when no message-driven-destination is given in ejb-jar, and a lookup of destinationJNDI from jboss.xml is not successfull. Default value: javax.jms.Topic.

See Also:
Constant Field Values

CONSUMER_MESSAGE

public static final String CONSUMER_MESSAGE
This is needed because API changed from JBoss 4.0.1sp1 to 4.0.2 TODO remove this after 4.0.2 is out.

See Also:
Constant Field Values
Constructor Detail

ConsumerContainer

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

dynamicInvoke

public org.jboss.aop.joinpoint.InvocationResponse dynamicInvoke(org.jboss.aop.joinpoint.Invocation invocation)
                                                         throws Throwable
Throws:
Throwable

getOnMessage

protected Method getOnMessage()

getTimeoutMethodMetaData

protected org.jboss.metadata.ejb.spec.NamedMethodMetaData getTimeoutMethodMetaData()
Specified by:
getTimeoutMethodMetaData in class MessagingContainer

localInvoke

public Object localInvoke(org.jboss.aop.MethodInfo info,
                          Object[] args)
                   throws Throwable
Overrides:
localInvoke in class MessagingContainer
Throws:
Throwable

getMessagingType

public Class<javax.jms.MessageListener> getMessagingType()
Specified by:
getMessagingType in class MessagingContainer

getMethodInfo

public org.jboss.aop.MethodInfo getMethodInfo(Method method)
Overrides:
getMethodInfo in class MessagingContainer

getActivationConfigProperties

public Map<String,org.jboss.metadata.ejb.spec.ActivationConfigPropertyMetaData> getActivationConfigProperties()
Specified by:
getActivationConfigProperties in class MessagingContainer

resolveBusinessInterfaces

protected List<Class<?>> resolveBusinessInterfaces()
Specified by:
resolveBusinessInterfaces in class EJBContainer

lockedStart

protected void lockedStart()
                    throws Exception
Initialize the container invoker. Sets up a connection, a server session pool and a connection consumer for the configured destination.

Any JMSExceptions produced while initializing will be assumed to be caused due to JMS Provider failure.

Overrides:
lockedStart in class MessagingContainer
Throws:
Exception - Failed to initalize.

registerProducers

protected void registerProducers()
                          throws Exception
Throws:
Exception

unregisterProducers

protected void unregisterProducers()
                            throws Exception
Throws:
Exception

populateActivationSpec

protected void populateActivationSpec()
Specified by:
populateActivationSpec in class MessagingContainer

lockedStop

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


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