public class ActiveMQManagedConnection extends Object implements ManagedConnection, ExceptionListener
Constructor and Description |
---|
ActiveMQManagedConnection(Subject subject,
org.apache.activemq.ActiveMQConnection physicalConnection,
ActiveMQConnectionRequestInfo info) |
Modifier and Type | Method and Description |
---|---|
void |
addConnectionEventListener(ConnectionEventListener listener) |
void |
associate(Subject subject,
ActiveMQConnectionRequestInfo info) |
void |
associateConnection(Object connection) |
void |
cleanup()
Cleans up all proxy handles attached to this physical connection so that
they cannot be used anymore.
|
void |
destroy()
Close down the physical connection to the server.
|
Object |
getConnection(Subject subject,
ConnectionRequestInfo info) |
LocalTransaction |
getLocalTransaction() |
PrintWriter |
getLogWriter() |
ManagedConnectionMetaData |
getMetaData() |
Connection |
getPhysicalConnection() |
org.apache.activemq.TransactionContext |
getTransactionContext() |
XAResource |
getXAResource() |
boolean |
isInManagedTx() |
static boolean |
matches(Object x,
Object y) |
boolean |
matches(Subject subject,
ConnectionRequestInfo info) |
void |
onException(JMSException e) |
void |
proxyClosedEvent(ManagedConnectionProxy proxy)
When a proxy is closed this cleans up the proxy and notifies the
ConnectionEventListeners that a connection closed.
|
void |
removeConnectionEventListener(ConnectionEventListener listener) |
void |
setLogWriter(PrintWriter logWriter) |
String |
toString() |
public ActiveMQManagedConnection(Subject subject, org.apache.activemq.ActiveMQConnection physicalConnection, ActiveMQConnectionRequestInfo info) throws ResourceException
ResourceException
public boolean isInManagedTx()
public void associate(Subject subject, ActiveMQConnectionRequestInfo info) throws JMSException
JMSException
public Connection getPhysicalConnection()
public Object getConnection(Subject subject, ConnectionRequestInfo info) throws ResourceException
getConnection
in interface ManagedConnection
ResourceException
ManagedConnection.getConnection(javax.security.auth.Subject,
javax.resource.spi.ConnectionRequestInfo)
public void destroy() throws ResourceException
destroy
in interface ManagedConnection
ResourceException
ManagedConnection.destroy()
public void cleanup() throws ResourceException
cleanup
in interface ManagedConnection
ResourceException
ManagedConnection.cleanup()
public void associateConnection(Object connection) throws ResourceException
associateConnection
in interface ManagedConnection
ResourceException
ManagedConnection.associateConnection(java.lang.Object)
public void addConnectionEventListener(ConnectionEventListener listener)
addConnectionEventListener
in interface ManagedConnection
ManagedConnection.addConnectionEventListener(javax.resource.spi.ConnectionEventListener)
public void removeConnectionEventListener(ConnectionEventListener listener)
removeConnectionEventListener
in interface ManagedConnection
ManagedConnection.removeConnectionEventListener(javax.resource.spi.ConnectionEventListener)
public XAResource getXAResource() throws ResourceException
getXAResource
in interface ManagedConnection
ResourceException
ManagedConnection.getXAResource()
public LocalTransaction getLocalTransaction() throws ResourceException
getLocalTransaction
in interface ManagedConnection
ResourceException
ManagedConnection.getLocalTransaction()
public ManagedConnectionMetaData getMetaData() throws ResourceException
getMetaData
in interface ManagedConnection
ResourceException
ManagedConnection.getMetaData()
public void setLogWriter(PrintWriter logWriter) throws ResourceException
setLogWriter
in interface ManagedConnection
ResourceException
ManagedConnection.setLogWriter(java.io.PrintWriter)
public PrintWriter getLogWriter() throws ResourceException
getLogWriter
in interface ManagedConnection
ResourceException
ManagedConnection.getLogWriter()
public boolean matches(Subject subject, ConnectionRequestInfo info)
subject
- subject to matchinfo
- cri to matchpublic void proxyClosedEvent(ManagedConnectionProxy proxy)
proxy
- public void onException(JMSException e)
onException
in interface ExceptionListener
public org.apache.activemq.TransactionContext getTransactionContext()
Copyright © 2005–2017 FuseSource, Corp.. All rights reserved.