public class ConnectionProxy extends Object implements javax.jms.Connection
XAConnection.| Constructor and Description |
|---|
ConnectionProxy(javax.jms.XAConnection xaConnection,
TransactionHelper transactionHelper) |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Simply close the proxied connection if there is no active transaction.
|
javax.jms.ConnectionConsumer |
createConnectionConsumer(javax.jms.Destination destination,
String messageSelector,
javax.jms.ServerSessionPool sessionPool,
int maxMessages)
Delegate to
xaConnection |
javax.jms.ConnectionConsumer |
createDurableConnectionConsumer(javax.jms.Topic topic,
String subscriptionName,
String messageSelector,
javax.jms.ServerSessionPool sessionPool,
int maxMessages)
Delegate to
xaConnection. |
javax.jms.Session |
createSession(boolean transacted,
int acknowledgeMode)
Simply create a session with an XA connection if there is no active transaction.
|
String |
getClientID()
Delegate to
xaConnection |
javax.jms.ExceptionListener |
getExceptionListener()
Delegate to
xaConnection |
javax.jms.ConnectionMetaData |
getMetaData()
Delegate to
xaConnection |
void |
setClientID(String clientID) |
void |
setExceptionListener(javax.jms.ExceptionListener listener)
Delegate to
xaConnection |
void |
start()
Delegate to
xaConnection |
void |
stop()
Delegate to
xaConnection |
public ConnectionProxy(javax.jms.XAConnection xaConnection,
TransactionHelper transactionHelper)
xaConnection - XA connection which needs to be proxied.transactionHelper - utility to make transaction resources registration easier.public javax.jms.Session createSession(boolean transacted,
int acknowledgeMode)
throws javax.jms.JMSException
createSession in interface javax.jms.Connectionjavax.jms.JMSExceptionSessionProxy,
Connection.createSession(boolean, int)public void close()
throws javax.jms.JMSException
ConnectionClosingSynchronization if active transaction exists.close in interface javax.jms.Connectionjavax.jms.JMSException - if transaction service has failed (in unexpected way) to obtain transaction status,
or if synchronization registration, or connection closing has failed.public String getClientID() throws javax.jms.JMSException
xaConnectiongetClientID in interface javax.jms.Connectionjavax.jms.JMSExceptionConnection.getClientID()public void setClientID(String clientID) throws javax.jms.JMSException
setClientID in interface javax.jms.Connectionjavax.jms.JMSExceptionConnection.setClientID(String)public javax.jms.ConnectionMetaData getMetaData()
throws javax.jms.JMSException
xaConnectiongetMetaData in interface javax.jms.Connectionjavax.jms.JMSExceptionConnection.getMetaData()public javax.jms.ExceptionListener getExceptionListener()
throws javax.jms.JMSException
xaConnectiongetExceptionListener in interface javax.jms.Connectionjavax.jms.JMSExceptionConnection.getExceptionListener()public void setExceptionListener(javax.jms.ExceptionListener listener)
throws javax.jms.JMSException
xaConnectionsetExceptionListener in interface javax.jms.Connectionjavax.jms.JMSExceptionConnection.setExceptionListener(ExceptionListener)public void start()
throws javax.jms.JMSException
xaConnectionstart in interface javax.jms.Connectionjavax.jms.JMSExceptionConnection.start()public void stop()
throws javax.jms.JMSException
xaConnectionstop in interface javax.jms.Connectionjavax.jms.JMSExceptionConnection.stop()public javax.jms.ConnectionConsumer createConnectionConsumer(javax.jms.Destination destination,
String messageSelector,
javax.jms.ServerSessionPool sessionPool,
int maxMessages)
throws javax.jms.JMSException
xaConnectioncreateConnectionConsumer in interface javax.jms.Connectionjavax.jms.JMSExceptionConnection.createConnectionConsumer(Destination, String, ServerSessionPool, int)public javax.jms.ConnectionConsumer createDurableConnectionConsumer(javax.jms.Topic topic,
String subscriptionName,
String messageSelector,
javax.jms.ServerSessionPool sessionPool,
int maxMessages)
throws javax.jms.JMSException
xaConnection.createDurableConnectionConsumer in interface javax.jms.Connectionjavax.jms.JMSExceptionConnection.createDurableConnectionConsumer(Topic, String, String, ServerSessionPool, int)Copyright © 2020 JBoss by Red Hat. All rights reserved.