站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > JBoss 4.0.1 sp1 connector API Documentation 英文版文档

JmsActivation (JBoss Connector API) - JBoss 4.0.1 sp1 connector API Documentation 英文版文档


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

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

public class JmsActivation
extends Object
implements javax.jms.ExceptionListener

A generic jms Activation.

Version:
$Revision: 1.2.2.1 $
Author:
Adrian Brock

Field Summary
protected  org.jboss.jms.jndi.JMSProviderAdapter adapter
          The jms provider adapter
protected  javax.jms.Connection connection
          The connection
protected  EDU.oswego.cs.dl.util.concurrent.SynchronizedBoolean deliveryActive
          Whether delivery is active
protected  javax.jms.Destination destination
          The destination
protected  DLQHandler dlqHandler
          The DLQ handler
protected  javax.resource.spi.endpoint.MessageEndpointFactory endpointFactory
          The message endpoint factory
protected  boolean isDeliveryTransacted
          Is the delivery transacted
static Method ONMESSAGE
          The onMessage method
protected  JmsServerSessionPool pool
          The server session pool
protected  JmsResourceAdapter ra
          The resource adapter
protected  JmsActivationSpec spec
          The activation spec
 
Constructor Summary
JmsActivation(JmsResourceAdapter ra, javax.resource.spi.endpoint.MessageEndpointFactory endpointFactory, JmsActivationSpec spec)
           
 
Method Summary
 JmsActivationSpec getActivationSpec()
           
 javax.jms.Connection getConnection()
           
 javax.jms.Destination getDestination()
           
 DLQHandler getDLQHandler()
           
 javax.resource.spi.endpoint.MessageEndpointFactory getMessageEndpointFactory()
           
 org.jboss.jms.jndi.JMSProviderAdapter getProviderAdapter()
           
 javax.resource.spi.work.WorkManager getWorkManager()
           
 void handleFailure(Throwable failure)
          Handles any failure by trying to reconnect
 boolean isDeliveryTransacted()
           
 void onException(javax.jms.JMSException exception)
           
protected  void setup()
          Setup the activation
protected  void setupConnection(Context ctx)
          Setup the Connection
protected  void setupDestination(Context ctx)
          Setup the Destination
protected  void setupDLQ(Context ctx)
          Setup the DLQ
protected  void setupJMSProviderAdapter()
          Get the jms provider
protected  javax.jms.QueueConnection setupQueueConnection(Context ctx, String user, String pass, String clientID)
          Setup a Queue Connection
protected  void setupSessionPool()
          Setup the server session pool
protected  javax.jms.TopicConnection setupTopicConnection(Context ctx, String user, String pass, 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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ONMESSAGE

public static final Method ONMESSAGE
The onMessage method


ra

protected JmsResourceAdapter ra
The resource adapter


spec

protected JmsActivationSpec spec
The activation spec


endpointFactory

protected javax.resource.spi.endpoint.MessageEndpointFactory endpointFactory
The message endpoint factory


deliveryActive

protected EDU.oswego.cs.dl.util.concurrent.SynchronizedBoolean deliveryActive
Whether delivery is active


adapter

protected org.jboss.jms.jndi.JMSProviderAdapter adapter
The jms provider adapter


destination

protected javax.jms.Destination destination
The destination


connection

protected javax.jms.Connection connection
The connection


pool

protected JmsServerSessionPool pool
The server session pool


isDeliveryTransacted

protected boolean isDeliveryTransacted
Is the delivery transacted


dlqHandler

protected DLQHandler dlqHandler
The DLQ handler

Constructor Detail

JmsActivation

public JmsActivation(JmsResourceAdapter ra,
                     javax.resource.spi.endpoint.MessageEndpointFactory endpointFactory,
                     JmsActivationSpec spec)
              throws javax.resource.ResourceException
Method Detail

getActivationSpec

public JmsActivationSpec getActivationSpec()
Returns:
the activation spec

getMessageEndpointFactory

public javax.resource.spi.endpoint.MessageEndpointFactory getMessageEndpointFactory()
Returns:
the message endpoint factory

isDeliveryTransacted

public boolean isDeliveryTransacted()
Returns:
whether delivery is transacted

getWorkManager

public javax.resource.spi.work.WorkManager getWorkManager()
Returns:
the work manager

getConnection

public javax.jms.Connection getConnection()
Returns:
the connection

getDestination

public javax.jms.Destination getDestination()
Returns:
the destination

getProviderAdapter

public org.jboss.jms.jndi.JMSProviderAdapter getProviderAdapter()
Returns:
the provider adapter

getDLQHandler

public DLQHandler getDLQHandler()
Returns:
the dlq handler

start

public void start()
           throws javax.resource.ResourceException
Start the activation

Throws:
javax.resource.ResourceException - for any error

stop

public void stop()
Stop the activation


handleFailure

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


onException

public void onException(javax.jms.JMSException exception)
Specified by:
onException in interface javax.jms.ExceptionListener

setup

protected void setup()
              throws Exception
Setup the activation

Throws:
Exception - for any error

teardown

protected void teardown()
Teardown the activation


setupJMSProviderAdapter

protected void setupJMSProviderAdapter()
                                throws Exception
Get the jms provider

Throws:
Exception

setupDLQ

protected void setupDLQ(Context ctx)
                 throws Exception
Setup the DLQ

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

teardownDLQ

protected void teardownDLQ()
Teardown the DLQ


setupDestination

protected void setupDestination(Context ctx)
                         throws Exception
Setup the Destination

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

teardownDestination

protected void teardownDestination()
Teardown the destination


setupConnection

protected void setupConnection(Context ctx)
                        throws Exception
Setup the Connection

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

setupQueueConnection

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

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

setupTopicConnection

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

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

teardownConnection

protected void teardownConnection()
Teardown the connection


setupSessionPool

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

Throws:
Exception - for any error

teardownSessionPool

protected void teardownSessionPool()
Teardown the server session pool



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