addConnectionEventListener(ConnectionEventListener listener) Adds a connection event listener to the ManagedConnection instance.
public void
associateConnection(Object connection) Used by the container to change the association of an application-level
connection handle with a ManagedConnection instance.
public void
cleanup() Initiates a cleanup of the client-specific state maintained by a
ManagedConnection instance.
getConnection(Subject subject, ConnectionRequestInfo connectionRequestInfo) Creates a new connection handle to the Mail Server represented by the
ManagedConnection instance.
public javax.resource.spi.LocalTransaction
getLocalTransaction() Returns a javax.resource.spi.LocalTransaction instance.
getXAResource() Returns a javax.transaction.xa.XAresource instance.
boolean
isDestroyed() Checks validation of the physical connection.
public void
removeConnection(MuleConnection connection) Removes the associated connection handle from the connections set to the
physical connection.
public void
removeConnectionEventListener(ConnectionEventListener listener) Removes an already registered connection event listener from the
ManagedConnection instance.
Constructor.
Parameters: mcf - the ManagedConnectionFactory that created this instance Parameters: subject - security context as JAAS subject Parameters: cxRequestInfo - ConnectionRequestInfo instance throws: javax.resource.ResourceException - in case of any error
Associate connection handle with the physical connection.
Parameters: connection - connection handle
addConnectionEventListener
public void addConnectionEventListener(ConnectionEventListener listener)(Code)
Adds a connection event listener to the ManagedConnection instance. The
registered ConnectionEventListener instances are notified of connection close
and error events as well as local-transaction-related events on the Managed
Connection.
Parameters: listener - a new ConnectionEventListener to be registered
associateConnection
public void associateConnection(Object connection) throws ResourceException(Code)
Used by the container to change the association of an application-level
connection handle with a ManagedConnection instance. The container should find
the right ManagedConnection instance and call the associateConnection method.
Parameters: connection - application-level connection handle throws: ResourceException - if the attempt to change the association fails
cleanup
public void cleanup() throws ResourceException(Code)
Initiates a cleanup of the client-specific state maintained by a
ManagedConnection instance. The cleanup should invalidate all connection
handles created using this ManagedConnection instance.
throws: ResourceException - if the cleanup fails
destroy
public void destroy() throws ResourceException(Code)
Destroys the physical connection.
throws: ResourceException - if the method fails to destroy the connection
Creates a new connection handle to the Mail Server represented by the
ManagedConnection instance. This connection handle is used by the application
code to refer to the underlying physical connection.
Parameters: subject - security context as JAAS subject Parameters: connectionRequestInfo - ConnectionRequestInfo instance Connection instance representing the connection handle throws: ResourceException - if the method fails to get a connection
getLocalTransaction
public javax.resource.spi.LocalTransaction getLocalTransaction() throws ResourceException(Code)
Returns a javax.resource.spi.LocalTransaction instance. The LocalTransaction
interface is used by the container to manage local transactions for a RM
instance. Because this implementation does not support transactions, the
method throws an exception.
javax.resource.spi.LocalTransaction instance throws: ResourceException - if transactions are not supported
Gets the log writer for this ManagedConnection instance.
the character output stream associated with this ManagedConnectioninstance throws: ResourceException - if the method fails
Returns the ManagedConnectionFactory that created this instance of
ManagedConnection.
the ManagedConnectionFactory for this connection
getMetaData
public ManagedConnectionMetaData getMetaData() throws ResourceException(Code)
Gets the metadata information for this connection's underlying EIS resource
manager instance. The ManagedConnectionMetaData interface provides information
about the underlying EIS instance associated with the ManagedConnection
instance.
ManagedConnectionMetaData ManagedConnectionMetaData instance throws: ResourceException - if the metadata cannot be retrieved
getPasswordCredential
public PasswordCredential getPasswordCredential()(Code)
Gets the password for the user associated with the ManagedConnection instance.
the password for this connection
Returns a javax.transaction.xa.XAresource instance. An application server
enlists this XAResource instance with the Transaction Manager if the
ManagedConnection instance is being used in a JTA transaction that is being
coordinated by the Transaction Manager. Because this implementation does
not support transactions, the method throws an exception.
the XAResource instance throws: ResourceException - if transactions are not supported
Removes the associated connection handle from the connections set to the
physical connection.
Parameters: connection - the connection handle
removeConnectionEventListener
public void removeConnectionEventListener(ConnectionEventListener listener)(Code)
Removes an already registered connection event listener from the
ManagedConnection instance.
Parameters: listener - already registered connection event listener to be removed
setLogWriter
public void setLogWriter(PrintWriter out) throws ResourceException(Code)
Sets the log writer for this ManagedConnection instance. The log writer is a
character output stream to which all logging and tracing messages for this
ManagedConnection instance will be printed.
Parameters: out - character output stream to be associated throws: ResourceException - if the method fails