org.jboss.resource.adapter.jms.inflow
Class JmsActivation

java.lang.Object
  extended byorg.jboss.resource.adapter.jms.inflow.JmsActivation
All Implemented Interfaces:
ExceptionListener (src)

public class JmsActivation
extends java.lang.Object
implements ExceptionListener (src)

A generic jms Activation.


Field Summary
protected  JMSProviderAdapter (src) adapter
          The jms provider adapter
protected  Connection (src) connection
          The connection
protected  SynchronizedBoolean deliveryActive
          Whether delivery is active
protected  Destination (src) destination
          The destination
protected  DLQHandler (src) dlqHandler
          The DLQ handler
protected  MessageEndpointFactory (src) endpointFactory
          The message endpoint factory
protected  boolean isDeliveryTransacted
          Is the delivery transacted
static java.lang.reflect.Method ONMESSAGE
          The onMessage method
protected  JmsServerSessionPool (src) pool
          The server session pool
protected  JmsResourceAdapter (src) ra
          The resource adapter
protected  JmsActivationSpec (src) spec
          The activation spec
 
Constructor Summary
JmsActivation(JmsResourceAdapter (src)  ra, MessageEndpointFactory (src)  endpointFactory, JmsActivationSpec (src)  spec)
           
 
Method Summary
 JmsActivationSpec (src) getActivationSpec()
           
 Connection (src) getConnection()
           
 Destination (src) getDestination()
           
 DLQHandler (src) getDLQHandler()
           
 MessageEndpointFactory (src) getMessageEndpointFactory()
           
 JMSProviderAdapter (src) getProviderAdapter()
           
 WorkManager (src) getWorkManager()
           
 void handleFailure(java.lang.Throwable failure)
          Handles any failure by trying to reconnect
 boolean isDeliveryTransacted()
           
 void onException(JMSException (src)  exception)
          Notifies user of a JMS exception.
protected  void setup()
          Setup the activation
protected  void setupConnection(javax.naming.Context ctx)
          Setup the Connection
protected  void setupDestination(javax.naming.Context ctx)
          Setup the Destination
protected  void setupDLQ(javax.naming.Context ctx)
          Setup the DLQ
protected  void setupJMSProviderAdapter()
          Get the jms provider
protected  QueueConnection (src) setupQueueConnection(javax.naming.Context ctx, java.lang.String user, java.lang.String pass, java.lang.String clientID)
          Setup a Queue Connection
protected  void setupSessionPool()
          Setup the server session pool
protected  TopicConnection (src) setupTopicConnection(javax.naming.Context ctx, java.lang.String user, java.lang.String pass, java.lang.String clientID)
          Setup a Topic Connection
 void start()
          Start the activation
 void stop()
          Stop the activation
protected  void teardown()
          Teardown the activation
protected  void teardownConnection()
          Teardown the connection
protected  void teardownDestination()
          Teardown the destination
protected  void teardownDLQ()
          Teardown the DLQ
protected  void teardownSessionPool()
          Teardown the server session pool
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

ONMESSAGE

public static final java.lang.reflect.Method ONMESSAGE
The onMessage method


ra

protected JmsResourceAdapter (src)  ra
The resource adapter


spec

protected JmsActivationSpec (src)  spec
The activation spec


endpointFactory

protected MessageEndpointFactory (src)  endpointFactory
The message endpoint factory


deliveryActive

protected SynchronizedBoolean deliveryActive
Whether delivery is active


adapter

protected JMSProviderAdapter (src)  adapter
The jms provider adapter


destination

protected Destination (src)  destination
The destination


connection

protected Connection (src)  connection
The connection


pool

protected JmsServerSessionPool (src)  pool
The server session pool


isDeliveryTransacted

protected boolean isDeliveryTransacted
Is the delivery transacted


dlqHandler

protected DLQHandler (src)  dlqHandler
The DLQ handler

Constructor Detail

JmsActivation

public JmsActivation(JmsResourceAdapter (src)  ra,
                     MessageEndpointFactory (src)  endpointFactory,
                     JmsActivationSpec (src)  spec)
              throws ResourceException (src) 
Method Detail

getActivationSpec

public JmsActivationSpec (src)  getActivationSpec()
Returns:
the activation spec

getMessageEndpointFactory

public MessageEndpointFactory (src)  getMessageEndpointFactory()
Returns:
the message endpoint factory

isDeliveryTransacted

public boolean isDeliveryTransacted()
Returns:
whether delivery is transacted

getWorkManager

public WorkManager (src)  getWorkManager()
Returns:
the work manager

getConnection

public Connection (src)  getConnection()
Returns:
the connection

getDestination

public Destination (src)  getDestination()
Returns:
the destination

getProviderAdapter

public JMSProviderAdapter (src)  getProviderAdapter()
Returns:
the provider adapter

getDLQHandler

public DLQHandler (src)  getDLQHandler()
Returns:
the dlq handler

start

public void start()
           throws ResourceException (src) 
Start the activation

Throws:
ResourceException (src) - for any error

stop

public void stop()
Stop the activation


handleFailure

public void handleFailure(java.lang.Throwable failure)
Handles any failure by trying to reconnect


onException

public void onException(JMSException (src)  exception)
Description copied from interface: ExceptionListener (src)
Notifies user of a JMS exception.

Specified by:
onException in interface ExceptionListener (src)
Parameters:
exception - the JMS exception

toString

public java.lang.String toString()

setup

protected void setup()
              throws java.lang.Exception
Setup the activation

Throws:
java.lang.Exception - for any error

teardown

protected void teardown()
Teardown the activation


setupJMSProviderAdapter

protected void setupJMSProviderAdapter()
                                throws java.lang.Exception
Get the jms provider

Throws:
java.lang.Exception

setupDLQ

protected void setupDLQ(javax.naming.Context ctx)
                 throws java.lang.Exception
Setup the DLQ

Parameters:
ctx - the naming context
Throws:
java.lang.Exception - for any error

teardownDLQ

protected void teardownDLQ()
Teardown the DLQ


setupDestination

protected void setupDestination(javax.naming.Context ctx)
                         throws java.lang.Exception
Setup the Destination

Parameters:
ctx - the naming context
Throws:
java.lang.Exception - for any error

teardownDestination

protected void teardownDestination()
Teardown the destination


setupConnection

protected void setupConnection(javax.naming.Context ctx)
                        throws java.lang.Exception
Setup the Connection

Parameters:
ctx - the naming context
Throws:
java.lang.Exception - for any error

setupQueueConnection

protected QueueConnection (src)  setupQueueConnection(javax.naming.Context ctx,
                                               java.lang.String user,
                                               java.lang.String pass,
                                               java.lang.String clientID)
                                        throws java.lang.Exception
Setup a Queue Connection

Parameters:
ctx - the naming context
user - the user
pass - the password
clientID - the client id
Throws:
java.lang.Exception - for any error

setupTopicConnection

protected TopicConnection (src)  setupTopicConnection(javax.naming.Context ctx,
                                               java.lang.String user,
                                               java.lang.String pass,
                                               java.lang.String clientID)
                                        throws java.lang.Exception
Setup a Topic Connection

Parameters:
ctx - the naming context
user - the user
pass - the password
clientID - the client id
Throws:
java.lang.Exception - for any error

teardownConnection

protected void teardownConnection()
Teardown the connection


setupSessionPool

protected void setupSessionPool()
                         throws java.lang.Exception
Setup the server session pool

Throws:
java.lang.Exception - for any error

teardownSessionPool

protected void teardownSessionPool()
Teardown the server session pool