org.jboss.ejb.plugins.inflow
Class JBossMessageEndpointFactory

java.lang.Object
  extended byorg.jboss.mx.util.JBossNotificationBroadcasterSupport (src) 
      extended byorg.jboss.system.ServiceMBeanSupport (src) 
          extended byorg.jboss.ejb.plugins.inflow.JBossMessageEndpointFactory
All Implemented Interfaces:
AllowedOperationsFlags (src) , ContainerPlugin (src) , EJBProxyFactory (src) , GenericEntityObjectFactory (src) , MBeanRegistration (src) , MessageEndpointFactory (src) , NotificationBroadcaster (src) , NotificationEmitter (src) , Service (src) , ServiceMBean (src)
Direct Known Subclasses:
JBossJMSMessageEndpointFactory (src)

public class JBossMessageEndpointFactory
extends ServiceMBeanSupport (src)
implements EJBProxyFactory (src) , MessageEndpointFactory (src)

EJBProxyFactory for inflow message driven beans


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

Field Detail

trace

protected boolean trace
Whether trace is enabled


container

protected MessageDrivenContainer (src)  container
Our container


metaData

protected MessageDrivenMetaData (src)  metaData
Our meta data


invokerBinding

protected java.lang.String invokerBinding
The invoker binding


invokerMetaData

protected InvokerProxyBindingMetaData (src)  invokerMetaData
The invoker meta data


properties

protected java.util.HashMap properties
The activation properties


proxyFactory

protected GenericProxyFactory (src)  proxyFactory
The proxy factory


messagingTypeClass

protected java.lang.Class messagingTypeClass
The messaging type class


resourceAdapterName

protected java.lang.String resourceAdapterName
The resource adapter name


resourceAdapterObjectName

protected ObjectName (src)  resourceAdapterObjectName
The resource adapter object name


activationSpec

protected ActivationSpec (src)  activationSpec
The activation spec


interceptors

protected java.util.ArrayList interceptors
The interceptors


interfaces

protected java.lang.Class[] interfaces
The interfaces


nextProxyId

protected SynchronizedInt nextProxyId
The next proxy id


createActivationSpecSig

protected java.lang.String[] createActivationSpecSig
The signature for createActivationSpec


activationSig

protected java.lang.String[] activationSig
The signature for activate/deactivateEndpint

Constructor Detail

JBossMessageEndpointFactory

public JBossMessageEndpointFactory()
Method Detail

getContainer

public MessageDrivenContainer (src)  getContainer()
Get the message driven container

Returns:
the container

getConfig

public java.lang.String getConfig()
Display the configuration

Returns:
the configuration

createEndpoint

public MessageEndpoint (src)  createEndpoint(XAResource (src)  resource)
                               throws UnavailableException (src) 
Description copied from interface: MessageEndpointFactory (src)
Creates a message endpoint

Specified by:
createEndpoint in interface MessageEndpointFactory (src)
Parameters:
resource - the xa resource
Returns:
the message endpoint
Throws:
UnavailableException (src) - a transient failure in the endpoint

isDeliveryTransacted

public boolean isDeliveryTransacted(java.lang.reflect.Method method)
                             throws java.lang.NoSuchMethodException
Description copied from interface: MessageEndpointFactory (src)
Tests whether the delivery is transactional for the given method

Specified by:
isDeliveryTransacted in interface MessageEndpointFactory (src)
Parameters:
method - the method to test
Returns:
true for transacted delivery, false otherwise
Throws:
java.lang.NoSuchMethodException - if there is no such method for the endpoint

startService

protected void startService()
                     throws java.lang.Exception
Description copied from class: ServiceMBeanSupport (src)
Sub-classes should override this method to provide custum 'start' logic.

This method is empty, and is provided for convenience when concrete service classes do not need to perform anything specific for this state change.

Overrides:
startService in class ServiceMBeanSupport (src)
Throws:
java.lang.Exception

stopService

protected void stopService()
                    throws java.lang.Exception
Description copied from class: ServiceMBeanSupport (src)
Sub-classes should override this method to provide custum 'stop' logic.

This method is empty, and is provided for convenience when concrete service classes do not need to perform anything specific for this state change.

Overrides:
stopService in class ServiceMBeanSupport (src)
Throws:
java.lang.Exception

isIdentical

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

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

getEJBHome

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

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

getEJBMetaData

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

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

getEntityCollection

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

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

getEntityEJBObject

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

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

getStatefulSessionEJBObject

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

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

getStatelessSessionEJBObject

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

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

setInvokerBinding

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

Specified by:
setInvokerBinding in interface EJBProxyFactory (src)

setInvokerMetaData

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

Specified by:
setInvokerMetaData in interface EJBProxyFactory (src)

setContainer

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

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

toString

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


resolveMessageListener

protected void resolveMessageListener()
                               throws DeploymentException (src) 
Resolve message listener class

Throws:
DeploymentException (src) - for any error

resolveResourceAdapterName

protected java.lang.String resolveResourceAdapterName()
                                               throws DeploymentException (src) 
Resolve the resource adapter name

Returns:
the resource adapter name
Throws:
DeploymentException (src) - for any error

resolveResourceAdapter

protected void resolveResourceAdapter()
                               throws DeploymentException (src) 
Resolve the resource adapter

Throws:
DeploymentException (src) - for any error

setupProxyParameters

protected void setupProxyParameters()
                             throws DeploymentException (src) 
Set up the proxy parametrs

Throws:
DeploymentException (src)

augmentActivationConfigProperties

protected void augmentActivationConfigProperties()
                                          throws DeploymentException (src) 
Add activation config properties

Throws:
DeploymentException (src) - for any error

createActivationSpec

protected void createActivationSpec()
                             throws DeploymentException (src) 
Create the activation spec

Throws:
DeploymentException (src) - for any error

activate

protected void activate()
                 throws DeploymentException (src) 
Activate

Throws:
DeploymentException (src) - for any error

deactivate

protected void deactivate()
Deactivate