|
Joram ${version} | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.objectweb.joram.client.connector.ManagedConnectionImpl
A ManagedConnectionImpl
instance wraps a physical connection
to an underlying JORAM server, and provides "handles" for handling this
physical connection.
Method Summary | |
void |
addConnectionEventListener(javax.resource.spi.ConnectionEventListener listener)
Adds a connection event listener. |
void |
associateConnection(java.lang.Object connection)
Dissociates a given connection handle and associates it to this managed connection. |
void |
begin()
Notifies that the local transaction is beginning. |
void |
cleanup()
Invalidates the created handles and prepares the physical connection to be put back into a connection pool. |
void |
commit()
Commits the local transaction. |
void |
destroy()
Destroys the physical connection to the underlying JORAM server. |
boolean |
equals(java.lang.Object o)
Compares ManagedConnectionImpl instances according to their
server and user identification parameters. |
java.lang.Object |
getConnection(javax.security.auth.Subject subject,
javax.resource.spi.ConnectionRequestInfo cxRequestInfo)
Returns a new OutboundConnection instance for handling the
physical connection. |
javax.resource.spi.LocalTransaction |
getLocalTransaction()
Returns this managed connection instance as a LocalTransaction instance for managing local transactions. |
java.io.PrintWriter |
getLogWriter()
Gets the log writer for this ManagedConnectionImpl
instance. |
javax.resource.spi.ManagedConnectionMetaData |
getMetaData()
Returns the metadata information for the underlying JORAM server. |
javax.transaction.xa.XAResource |
getXAResource()
Provides a XAResource instance for managing distributed
transactions. |
int |
hashCode()
Returns a code based on the JORAM server and user identification parameters. |
void |
onException(javax.jms.JMSException exc)
Notifies that the wrapped physical connection has been lost. |
void |
removeConnectionEventListener(javax.resource.spi.ConnectionEventListener listener)
Removes a connection event listener. |
void |
rollback()
Rollsback the local transaction. |
void |
setLogWriter(java.io.PrintWriter out)
Sets the log writer for this ManagedConnectionImpl
instance. |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
public java.lang.Object getConnection(javax.security.auth.Subject subject, javax.resource.spi.ConnectionRequestInfo cxRequestInfo) throws javax.resource.ResourceException
OutboundConnection
instance for handling the
physical connection.
getConnection
in interface javax.resource.spi.ManagedConnection
javax.resource.spi.CommException
- If the wrapped physical connection is lost.
javax.resource.ResourceException
public void associateConnection(java.lang.Object connection) throws javax.resource.ResourceException
associateConnection
in interface javax.resource.spi.ManagedConnection
javax.resource.spi.CommException
- If the wrapped physical connection is lost.
javax.resource.ResourceException
- If the provided handle is invalid.public void addConnectionEventListener(javax.resource.spi.ConnectionEventListener listener)
addConnectionEventListener
in interface javax.resource.spi.ManagedConnection
public void removeConnectionEventListener(javax.resource.spi.ConnectionEventListener listener)
removeConnectionEventListener
in interface javax.resource.spi.ManagedConnection
public javax.transaction.xa.XAResource getXAResource() throws javax.resource.ResourceException
XAResource
instance for managing distributed
transactions.
getXAResource
in interface javax.resource.spi.ManagedConnection
javax.resource.spi.CommException
- If the physical connection
is lost.
javax.resource.spi.IllegalStateException
- If the managed connection is
involved in a local
transaction.
javax.resource.spi.ResourceAdapterInternalException
- If the XA resource can't be
retrieved.
javax.resource.ResourceException
public javax.resource.spi.LocalTransaction getLocalTransaction() throws javax.resource.ResourceException
LocalTransaction
instance for managing local transactions.
getLocalTransaction
in interface javax.resource.spi.ManagedConnection
javax.resource.spi.CommException
- If the physical connection is lost.
javax.resource.spi.IllegalStateException
- If the managed connection is
involved in a distributed
transaction.
javax.resource.spi.LocalTransactionException
- If the LocalTransaction resource
can't be created.
javax.resource.ResourceException
public javax.resource.spi.ManagedConnectionMetaData getMetaData() throws javax.resource.ResourceException
getMetaData
in interface javax.resource.spi.ManagedConnection
javax.resource.ResourceException
- Never thrown.public void setLogWriter(java.io.PrintWriter out) throws javax.resource.ResourceException
ManagedConnectionImpl
instance.
setLogWriter
in interface javax.resource.spi.ManagedConnection
javax.resource.ResourceException
- Never thrown.public java.io.PrintWriter getLogWriter() throws javax.resource.ResourceException
ManagedConnectionImpl
instance.
getLogWriter
in interface javax.resource.spi.ManagedConnection
javax.resource.ResourceException
- Never thrown.public void cleanup() throws javax.resource.ResourceException
cleanup
in interface javax.resource.spi.ManagedConnection
javax.resource.ResourceException
- Never thrown.public void destroy() throws javax.resource.ResourceException
destroy
in interface javax.resource.spi.ManagedConnection
javax.resource.ResourceException
- Never thrown.public int hashCode()
public boolean equals(java.lang.Object o)
ManagedConnectionImpl
instances according to their
server and user identification parameters.
public void onException(javax.jms.JMSException exc)
onException
in interface javax.jms.ExceptionListener
public void begin() throws javax.resource.ResourceException
begin
in interface javax.resource.spi.LocalTransaction
javax.resource.spi.CommException
- If the wrapped physical connection
is lost.
javax.resource.spi.LocalTransactionException
- If a local transaction has already
begun.
javax.resource.ResourceException
public void commit() throws javax.resource.ResourceException
commit
in interface javax.resource.spi.LocalTransaction
javax.resource.spi.CommException
- If the wrapped physical connection
is lost.
javax.resource.spi.LocalTransactionException
- If the local transaction has not
begun, or if the commit fails.
javax.resource.ResourceException
public void rollback() throws javax.resource.ResourceException
rollback
in interface javax.resource.spi.LocalTransaction
javax.resource.spi.CommException
- If the wrapped physical connection
is lost.
javax.resource.spi.LocalTransactionException
- If the local transaction has not
begun, or if the rollback fails.
javax.resource.ResourceException
|
Joram ${version} | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |