org.jboss.ejb.plugins.inflow
Class JBossMessageEndpointFactory

java.lang.Object
  extended by org.jboss.mx.util.JBossNotificationBroadcasterSupport
      extended by org.jboss.system.ServiceMBeanSupport
          extended by org.jboss.ejb.plugins.inflow.JBossMessageEndpointFactory
All Implemented Interfaces:
javax.management.MBeanRegistration, javax.management.NotificationBroadcaster, javax.management.NotificationEmitter, javax.resource.spi.endpoint.MessageEndpointFactory, AllowedOperationsFlags, ContainerPlugin, EJBProxyFactory, GenericEntityObjectFactory, JBossMessageEndpointFactoryMBean, org.jboss.system.Service, org.jboss.system.ServiceMBean
Direct Known Subclasses:
JBossJMSMessageEndpointFactory

public class JBossMessageEndpointFactory
extends org.jboss.system.ServiceMBeanSupport
implements EJBProxyFactory, javax.resource.spi.endpoint.MessageEndpointFactory, JBossMessageEndpointFactoryMBean

EJBProxyFactory for inflow message driven beans

Version:
$Revision: 1.6.2.3 $
Author:
Adrian Brock .

Nested Class Summary
 
Nested classes/interfaces inherited from interface org.jboss.ejb.GenericEntityObjectFactory
GenericEntityObjectFactory.UTIL
 
Field Summary
protected  String[] activationSig
          The signature for activate/deactivateEndpint
protected  javax.resource.spi.ActivationSpec activationSpec
          The activation spec
protected  MessageDrivenContainer container
          Our container
protected  String[] createActivationSpecSig
          The signature for createActivationSpec
protected  ArrayList interceptors
          The interceptors
protected  Class[] interfaces
          The interfaces
protected  String invokerBinding
          The invoker binding
protected  InvokerProxyBindingMetaData invokerMetaData
          The invoker meta data
protected  Class messagingTypeClass
          The messaging type class
protected  MessageDrivenMetaData metaData
          Our meta data
protected  EDU.oswego.cs.dl.util.concurrent.SynchronizedInt nextProxyId
          The next proxy id
protected  HashMap properties
          The activation properties
protected  GenericProxyFactory proxyFactory
          The proxy factory
protected  String resourceAdapterName
          The resource adapter name
protected  javax.management.ObjectName resourceAdapterObjectName
          The resource adapter object name
protected  boolean trace
          Whether trace is enabled
 
Fields inherited from class org.jboss.system.ServiceMBeanSupport
log, server, SERVICE_CONTROLLER_SIG, serviceName
 
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
 
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
 
Constructor Summary
JBossMessageEndpointFactory()
           
 
Method Summary
protected  void activate()
          Activate
protected  void augmentActivationConfigProperties()
          Add activation config properties
protected  void createActivationSpec()
          Create the activation spec
 javax.resource.spi.endpoint.MessageEndpoint createEndpoint(XAResource resource)
           
protected  void deactivate()
          Deactivate
 String getConfig()
          Display the configuration
 MessageDrivenContainer getContainer()
          Get the message driven container
 Object getEJBHome()
          This method is called whenever the EJBHome implementation for this container is needed.
 javax.ejb.EJBMetaData getEJBMetaData()
          This method is called whenever the metadata for this container is needed.
 Collection getEntityCollection(Collection collection)
          This method is called whenever a collection of EJBObjects for a collection of primary keys is needed.
 Object getEntityEJBObject(Object id)
          This method is called whenever an EJBObject implementation for an entitybean is needed.
 Object getStatefulSessionEJBObject(Object id)
          This method is called whenever an EJBObject implementation for a stateful session bean is needed.
 Object getStatelessSessionEJBObject()
          This method is called whenever an EJBObject implementation for a stateless session bean is needed.
 boolean isDeliveryTransacted(Method method)
           
 boolean isIdentical(Container container, Invocation mi)
          Protocol specific isIdentical implementation
protected  void resolveMessageListener()
          Resolve message listener class
protected  void resolveResourceAdapter()
          Resolve the resource adapter
protected  String resolveResourceAdapterName()
          Resolve the resource adapter name
 void setContainer(Container container)
          Set the container for which this is an invoker to.
 void setInvokerBinding(String binding)
          Set the invoker jndi binding
 void setInvokerMetaData(InvokerProxyBindingMetaData imd)
          Set the invoker meta data so that the ProxyFactory can initialize properly
protected  void setupProxyParameters()
          Set up the proxy parametrs
protected  void startService()
           
protected  void stopService()
           
 String toString()
          Return a string representation of the current config state.
 
Methods inherited from class org.jboss.system.ServiceMBeanSupport
create, createService, destroy, destroyService, getDeploymentInfo, 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, wait, wait, wait
 
Methods inherited from interface org.jboss.system.Service
create, destroy, start, stop
 
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

trace

protected boolean trace
Whether trace is enabled


container

protected MessageDrivenContainer container
Our container


metaData

protected MessageDrivenMetaData metaData
Our meta data


invokerBinding

protected String invokerBinding
The invoker binding


invokerMetaData

protected InvokerProxyBindingMetaData invokerMetaData
The invoker meta data


properties

protected HashMap properties
The activation properties


proxyFactory

protected GenericProxyFactory proxyFactory
The proxy factory


messagingTypeClass

protected Class messagingTypeClass
The messaging type class


resourceAdapterName

protected String resourceAdapterName
The resource adapter name


resourceAdapterObjectName

protected javax.management.ObjectName resourceAdapterObjectName
The resource adapter object name


activationSpec

protected javax.resource.spi.ActivationSpec activationSpec
The activation spec


interceptors

protected ArrayList interceptors
The interceptors


interfaces

protected Class[] interfaces
The interfaces


nextProxyId

protected EDU.oswego.cs.dl.util.concurrent.SynchronizedInt nextProxyId
The next proxy id


createActivationSpecSig

protected String[] createActivationSpecSig
The signature for createActivationSpec


activationSig

protected String[] activationSig
The signature for activate/deactivateEndpint

Constructor Detail

JBossMessageEndpointFactory

public JBossMessageEndpointFactory()
Method Detail

getContainer

public MessageDrivenContainer getContainer()
Get the message driven container

Returns:
the container

getConfig

public String getConfig()
Display the configuration

Specified by:
getConfig in interface JBossMessageEndpointFactoryMBean
Returns:
the configuration

createEndpoint

public javax.resource.spi.endpoint.MessageEndpoint createEndpoint(XAResource resource)
                                                           throws javax.resource.spi.UnavailableException
Specified by:
createEndpoint in interface javax.resource.spi.endpoint.MessageEndpointFactory
Throws:
javax.resource.spi.UnavailableException

isDeliveryTransacted

public boolean isDeliveryTransacted(Method method)
                             throws NoSuchMethodException
Specified by:
isDeliveryTransacted in interface javax.resource.spi.endpoint.MessageEndpointFactory
Throws:
NoSuchMethodException

startService

protected void startService()
                     throws Exception
Overrides:
startService in class org.jboss.system.ServiceMBeanSupport
Throws:
Exception

stopService

protected void stopService()
                    throws Exception
Overrides:
stopService in class org.jboss.system.ServiceMBeanSupport
Throws:
Exception

isIdentical

public boolean isIdentical(Container container,
                           Invocation mi)
Description copied from interface: EJBProxyFactory
Protocol specific isIdentical implementation

Specified by:
isIdentical in interface EJBProxyFactory
Parameters:
container - the container
mi - the invocation
Returns:
true when identical, false otherwise

getEJBHome

public Object getEJBHome()
Description copied from interface: EJBProxyFactory
This method is called whenever the EJBHome implementation for this container is needed.

Specified by:
getEJBHome in interface EJBProxyFactory
Returns:
An implementation of the home interface for this container.

getEJBMetaData

public javax.ejb.EJBMetaData getEJBMetaData()
Description copied from interface: EJBProxyFactory
This method is called whenever the metadata for this container is needed.

Specified by:
getEJBMetaData in interface EJBProxyFactory
Returns:
An implementation of the EJBMetaData interface.

getEntityCollection

public Collection getEntityCollection(Collection collection)
Description copied from interface: EJBProxyFactory
This method is called whenever a collection of EJBObjects for a collection of primary keys is needed.

Specified by:
getEntityCollection in interface EJBProxyFactory
Parameters:
collection - Enumeration of primary keys.
Returns:
A collection of EJBObjects implementing the remote interface for this container.

getEntityEJBObject

public Object getEntityEJBObject(Object id)
Description copied from interface: EJBProxyFactory
This method is called whenever an EJBObject implementation for an entitybean is needed.

Specified by:
getEntityEJBObject in interface EJBProxyFactory
Specified by:
getEntityEJBObject in interface GenericEntityObjectFactory
Parameters:
id - The primary key of the entity.
Returns:
An implementation of the remote interface for this container.

getStatefulSessionEJBObject

public Object getStatefulSessionEJBObject(Object id)
Description copied from interface: EJBProxyFactory
This method is called whenever an EJBObject implementation for a stateful session bean is needed.

Specified by:
getStatefulSessionEJBObject in interface EJBProxyFactory
Parameters:
id - The id of the session.
Returns:
An implementation of the remote interface for this container.

getStatelessSessionEJBObject

public Object getStatelessSessionEJBObject()
Description copied from interface: EJBProxyFactory
This method is called whenever an EJBObject implementation for a stateless session bean is needed.

Specified by:
getStatelessSessionEJBObject in interface EJBProxyFactory
Returns:
An implementation of the remote interface for this container.

setInvokerBinding

public void setInvokerBinding(String binding)
Description copied from interface: EJBProxyFactory
Set the invoker jndi binding

Specified by:
setInvokerBinding in interface EJBProxyFactory

setInvokerMetaData

public void setInvokerMetaData(InvokerProxyBindingMetaData imd)
Description copied from interface: EJBProxyFactory
Set the invoker meta data so that the ProxyFactory can initialize properly

Specified by:
setInvokerMetaData in interface EJBProxyFactory

setContainer

public void setContainer(Container container)
Set the container for which this is an invoker to.

Specified by:
setContainer in interface ContainerPlugin
Parameters:
container - The container for which this is an invoker to.

toString

public String toString()
Return a string representation of the current config state.

Overrides:
toString in class Object

resolveMessageListener

protected void resolveMessageListener()
                               throws org.jboss.deployment.DeploymentException
Resolve message listener class

Throws:
org.jboss.deployment.DeploymentException - for any error

resolveResourceAdapterName

protected String resolveResourceAdapterName()
                                     throws org.jboss.deployment.DeploymentException
Resolve the resource adapter name

Returns:
the resource adapter name
Throws:
org.jboss.deployment.DeploymentException - for any error

resolveResourceAdapter

protected void resolveResourceAdapter()
                               throws org.jboss.deployment.DeploymentException
Resolve the resource adapter

Throws:
org.jboss.deployment.DeploymentException - for any error

setupProxyParameters

protected void setupProxyParameters()
                             throws org.jboss.deployment.DeploymentException
Set up the proxy parametrs

Throws:
org.jboss.deployment.DeploymentException

augmentActivationConfigProperties

protected void augmentActivationConfigProperties()
                                          throws org.jboss.deployment.DeploymentException
Add activation config properties

Throws:
org.jboss.deployment.DeploymentException - for any error

createActivationSpec

protected void createActivationSpec()
                             throws org.jboss.deployment.DeploymentException
Create the activation spec

Throws:
org.jboss.deployment.DeploymentException - for any error

activate

protected void activate()
                 throws org.jboss.deployment.DeploymentException
Activate

Throws:
org.jboss.deployment.DeploymentException - for any error

deactivate

protected void deactivate()
Deactivate



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