|
||||||||||
| 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
JMSExceptionpublic Connection getPhysicalConnection()
public Object getConnection(Subject subject,
ConnectionRequestInfo info)
throws ResourceException
getConnection in interface ManagedConnectionResourceExceptionManagedConnection.getConnection(javax.security.auth.Subject,
javax.resource.spi.ConnectionRequestInfo)
public void destroy()
throws ResourceException
destroy in interface ManagedConnectionResourceExceptionManagedConnection.destroy()
public void cleanup()
throws ResourceException
cleanup in interface ManagedConnectionResourceExceptionManagedConnection.cleanup()
public void associateConnection(Object connection)
throws ResourceException
associateConnection in interface ManagedConnectionResourceExceptionManagedConnection.associateConnection(java.lang.Object)public void addConnectionEventListener(ConnectionEventListener listener)
addConnectionEventListener in interface ManagedConnectionManagedConnection.addConnectionEventListener(javax.resource.spi.ConnectionEventListener)public void removeConnectionEventListener(ConnectionEventListener listener)
removeConnectionEventListener in interface ManagedConnectionManagedConnection.removeConnectionEventListener(javax.resource.spi.ConnectionEventListener)
public XAResource getXAResource()
throws ResourceException
getXAResource in interface ManagedConnectionResourceExceptionManagedConnection.getXAResource()
public LocalTransaction getLocalTransaction()
throws ResourceException
getLocalTransaction in interface ManagedConnectionResourceExceptionManagedConnection.getLocalTransaction()
public ManagedConnectionMetaData getMetaData()
throws ResourceException
getMetaData in interface ManagedConnectionResourceExceptionManagedConnection.getMetaData()
public void setLogWriter(PrintWriter logWriter)
throws ResourceException
setLogWriter in interface ManagedConnectionResourceExceptionManagedConnection.setLogWriter(java.io.PrintWriter)
public PrintWriter getLogWriter()
throws ResourceException
getLogWriter in interface ManagedConnectionResourceExceptionManagedConnection.getLogWriter()
public boolean matches(Subject subject,
ConnectionRequestInfo info)
subject - info -
public void proxyClosedEvent(JMSConnectionProxy proxy)
proxy - public void onException(JMSException e)
onException in interface ExceptionListenerpublic org.activemq.TransactionContext getTransactionContext()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||