public class JmsActivation extends Object implements ExceptionListener
Modifier and Type | Field and Description |
---|---|
protected Connection |
connection
The connection
|
protected AtomicBoolean |
deliveryActive
Whether delivery is active
|
protected Destination |
destination
The destination
|
protected MessageEndpointFactory |
endpointFactory
The message endpoint factory
|
protected boolean |
isDeliveryTransacted
Is the delivery transacted
|
protected boolean |
isTopic
The destination type
|
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
|
protected TransactionManager |
tm
The TransactionManager
|
Constructor and Description |
---|
JmsActivation(JmsResourceAdapter ra,
MessageEndpointFactory endpointFactory,
JmsActivationSpec spec) |
Modifier and Type | Method and Description |
---|---|
static Context |
convertStringToContext(String jndiParameters) |
static String |
defaultToString(Object object) |
JmsActivationSpec |
getActivationSpec() |
Connection |
getConnection() |
Destination |
getDestination() |
MessageEndpointFactory |
getMessageEndpointFactory() |
TransactionManager |
getTransactionManager() |
WorkManager |
getWorkManager() |
void |
handleFailure(Throwable failure)
Handles any failure by trying to reconnect
|
boolean |
isDeliveryTransacted() |
boolean |
isTopic() |
void |
onException(JMSException exception)
Notifies user of a JMS exception.
|
protected void |
setupActivation()
Setup the activation
|
protected void |
setupConnection(Context ctx)
Setup the Connection
|
protected Connection |
setupConnection(Context ctx,
String user,
String pass,
String clientID,
String connectionFactory)
Setup a Generic JMS Connection
|
protected void |
setupDestination(Context ctx)
Setup the Destination
|
protected void |
setupSessionPool()
Setup the server session pool
|
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 |
teardownSessionPool()
Teardown the server session pool
|
String |
toString() |
public static final Method ONMESSAGE
protected JmsResourceAdapter ra
protected JmsActivationSpec spec
protected MessageEndpointFactory endpointFactory
protected AtomicBoolean deliveryActive
protected Destination destination
protected boolean isTopic
protected Connection connection
protected JmsServerSessionPool pool
protected boolean isDeliveryTransacted
protected TransactionManager tm
public JmsActivation(JmsResourceAdapter ra, MessageEndpointFactory endpointFactory, JmsActivationSpec spec) throws ResourceException
ResourceException
public JmsActivationSpec getActivationSpec()
public MessageEndpointFactory getMessageEndpointFactory()
public boolean isDeliveryTransacted()
public WorkManager getWorkManager()
public TransactionManager getTransactionManager()
public Connection getConnection()
public Destination getDestination()
public boolean isTopic()
public void start() throws ResourceException
ResourceException
- for any errorpublic void stop()
public void handleFailure(Throwable failure)
failure
- the reason for the failurepublic void onException(JMSException exception)
ExceptionListener
onException
in interface ExceptionListener
exception
- the JMS exceptionprotected void setupActivation() throws Exception
Exception
- for any errorpublic static Context convertStringToContext(String jndiParameters) throws NamingException
NamingException
protected void teardown()
protected void setupDestination(Context ctx) throws Exception
ctx
- the naming contextException
- for any errorprotected void teardownDestination()
protected void setupConnection(Context ctx) throws Exception
ctx
- the naming contextException
- for any errorprotected Connection setupConnection(Context ctx, String user, String pass, String clientID, String connectionFactory) throws Exception
ctx
- the naming contextuser
- the userpass
- the passwordclientID
- the client idconnectionFactory
- the connection factory from JNDIException
- for any errorprotected void teardownConnection()
protected void setupSessionPool() throws Exception
Exception
- for any errorprotected void teardownSessionPool()
Copyright © 2014 JBoss by Red Hat. All Rights Reserved.