javax.resource.spi
Interface ManagedConnection

All Known Implementing Classes:
ManagedConnectionImpl, ManagedSessionImpl

public interface ManagedConnection

Interface for the resource adapter's connection instance. This interface is used by the app server and is normally not visible to the application itself.


Method Summary
 void addConnectionEventListener(ConnectionEventListener listener)
          Adds a new listener.
 void associateConnection(java.lang.Object connection)
          Associates an application-level connection handle with a ManagedConnection
 void cleanup()
          Cleanup the physical connection.
 void destroy()
          Destroys the physical connection.
 java.lang.Object getConnection(javax.security.auth.Subject subject, ConnectionRequestInfo requestInfo)
          Creates a new connection handle for the underlying physical connection.
 LocalTransaction getLocalTransaction()
          Returns a LocalTransaction.
 java.io.PrintWriter getLogWriter()
          Returns the log stream.
 ManagedConnectionMetaData getMetaData()
          Returns the meta data for the connection.
 XAResource getXAResource()
          Returns an XAResource for the connection.
 void removeConnectionEventListener(ConnectionEventListener listener)
          Removes an old new listener.
 void setLogWriter(java.io.PrintWriter log)
          Sets the log stream.
 

Method Detail

getConnection

java.lang.Object getConnection(javax.security.auth.Subject subject,
                               ConnectionRequestInfo requestInfo)
                               throws ResourceException
Creates a new connection handle for the underlying physical connection.

Throws:
ResourceException

associateConnection

void associateConnection(java.lang.Object connection)
                         throws ResourceException
Associates an application-level connection handle with a ManagedConnection

Throws:
ResourceException

addConnectionEventListener

void addConnectionEventListener(ConnectionEventListener listener)
Adds a new listener.


removeConnectionEventListener

void removeConnectionEventListener(ConnectionEventListener listener)
Removes an old new listener.


getXAResource

XAResource getXAResource()
                         throws ResourceException
Returns an XAResource for the connection.

Throws:
ResourceException

getLocalTransaction

LocalTransaction getLocalTransaction()
                                     throws ResourceException
Returns a LocalTransaction.

Throws:
ResourceException

getMetaData

ManagedConnectionMetaData getMetaData()
                                      throws ResourceException
Returns the meta data for the connection.

Throws:
ResourceException

setLogWriter

void setLogWriter(java.io.PrintWriter log)
                  throws ResourceException
Sets the log stream.

Throws:
ResourceException

getLogWriter

java.io.PrintWriter getLogWriter()
                                 throws ResourceException
Returns the log stream.

Throws:
ResourceException

cleanup

void cleanup()
             throws ResourceException
Cleanup the physical connection.

Throws:
ResourceException

destroy

void destroy()
             throws ResourceException
Destroys the physical connection.

Throws:
ResourceException