|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.activemq.ra.ActiveMQManagedConnection
public class ActiveMQManagedConnection
ActiveMQManagedConnection maps to real physical connection to the server. Since a ManagedConnection has to provide a transaction managment interface to the physical connection, and sessions are the objects implement transaction managment interfaces in the JMS API, this object also maps to a singe physical JMS session.
The side-effect is that JMS connection the application gets will allways create the same session object. This is good if running in an app server since the sessions are elisted in the context transaction. This is bad if used outside of an app server since the user may be trying to create 2 different sessions to coordinate 2 different uow.
Constructor Summary | |
---|---|
ActiveMQManagedConnection(Subject subject,
org.activemq.ActiveMQConnection physicalConnection,
ActiveMQConnectionRequestInfo info)
|
Method Summary | |
---|---|
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.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(JMSConnectionProxy proxy)
When a proxy is closed this cleans up the proxy and notifys the ConnectionEventListeners that a connection closed. |
void |
removeConnectionEventListener(ConnectionEventListener listener)
|
void |
setLogWriter(PrintWriter logWriter)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ActiveMQManagedConnection(Subject subject, org.activemq.ActiveMQConnection physicalConnection, ActiveMQConnectionRequestInfo info) throws ResourceException
ResourceException
Method Detail |
---|
public boolean isInManagedTx()
public static boolean matches(Object x, Object y)
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
- info
-
public void proxyClosedEvent(JMSConnectionProxy proxy)
proxy
- public void onException(JMSException e)
onException
in interface ExceptionListener
public org.activemq.TransactionContext getTransactionContext()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |