org.jboss.resource.adapter.jdbc
Class BaseWrapperManagedConnection

java.lang.Object
  extended byorg.jboss.resource.adapter.jdbc.BaseWrapperManagedConnection
All Implemented Interfaces:
ManagedConnection (src)
Direct Known Subclasses:
LocalManagedConnection (src) , XAManagedConnection (src)

public abstract class BaseWrapperManagedConnection
extends java.lang.Object
implements ManagedConnection (src)

BaseWrapperManagedConnection.java Created: Fri Apr 19 13:31:47 2002


Field Summary
protected  java.sql.Connection con
           
protected  boolean destroyed
           
protected  boolean inManagedTransaction
           
protected  boolean jdbcAutoCommit
           
protected  boolean jdbcReadOnly
           
protected  int jdbcTransactionIsolation
           
protected  BaseWrapperManagedConnectionFactory (src) mcf
           
protected  java.util.Properties props
           
protected  java.lang.Object stateLock
           
protected  boolean underlyingAutoCommit
           
protected  boolean underlyingReadOnly
           
 
Constructor Summary
BaseWrapperManagedConnection(BaseWrapperManagedConnectionFactory (src)  mcf, java.sql.Connection con, java.util.Properties props, int transactionIsolation, int psCacheSize)
           
 
Method Summary
 void addConnectionEventListener(ConnectionEventListener (src)  cel)
          Adds a connection event listener
 void associateConnection(java.lang.Object handle)
          Associates a new application level connection handle with the connection.
protected  void broadcastConnectionError(java.sql.SQLException e)
           
protected  void checkException(java.sql.SQLException e)
           
protected  void checkState()
          Checks the state
 boolean checkValid()
           
 void cleanup()
          Application server calls this to force cleanup of connection.
 void destroy()
          Destroys the connection to the underlying resource.
 java.lang.Object getConnection(javax.security.auth.Subject subject, ConnectionRequestInfo (src)  cri)
          Creates a new connection handle for the underlying connection.
protected  Logger (src) getLog()
           
 java.io.PrintWriter getLogWriter()
          Gets the logwriter for this instance.
 ManagedConnectionMetaData (src) getMetaData()
          Gets metadata inormation for this instances underlying resource manager instance.
 void removeConnectionEventListener(ConnectionEventListener (src)  cel)
          Removes a connection event listener
 void setLogWriter(java.io.PrintWriter param1)
          Sets the logwriter for this instance.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface javax.resource.spi.ManagedConnection (src)
getLocalTransaction, getXAResource
 

Field Detail

mcf

protected final BaseWrapperManagedConnectionFactory (src)  mcf

con

protected final java.sql.Connection con

props

protected final java.util.Properties props

stateLock

protected java.lang.Object stateLock

inManagedTransaction

protected boolean inManagedTransaction

jdbcAutoCommit

protected boolean jdbcAutoCommit

underlyingAutoCommit

protected boolean underlyingAutoCommit

jdbcReadOnly

protected boolean jdbcReadOnly

underlyingReadOnly

protected boolean underlyingReadOnly

jdbcTransactionIsolation

protected int jdbcTransactionIsolation

destroyed

protected boolean destroyed
Constructor Detail

BaseWrapperManagedConnection

public BaseWrapperManagedConnection(BaseWrapperManagedConnectionFactory (src)  mcf,
                                    java.sql.Connection con,
                                    java.util.Properties props,
                                    int transactionIsolation,
                                    int psCacheSize)
                             throws java.sql.SQLException
Method Detail

addConnectionEventListener

public void addConnectionEventListener(ConnectionEventListener (src)  cel)
Description copied from interface: ManagedConnection (src)
Adds a connection event listener

Specified by:
addConnectionEventListener in interface ManagedConnection (src)
Parameters:
cel - the listener

removeConnectionEventListener

public void removeConnectionEventListener(ConnectionEventListener (src)  cel)
Description copied from interface: ManagedConnection (src)
Removes a connection event listener

Specified by:
removeConnectionEventListener in interface ManagedConnection (src)
Parameters:
cel - the listener

associateConnection

public void associateConnection(java.lang.Object handle)
                         throws ResourceException (src) 
Description copied from interface: ManagedConnection (src)
Associates a new application level connection handle with the connection.

Specified by:
associateConnection in interface ManagedConnection (src)
Parameters:
handle - the connection
Throws:
ResourceException (src) -

getLogWriter

public java.io.PrintWriter getLogWriter()
                                 throws ResourceException (src) 
Description copied from interface: ManagedConnection (src)
Gets the logwriter for this instance.

Specified by:
getLogWriter in interface ManagedConnection (src)
Returns:
Throws:
ResourceException (src) -

getMetaData

public ManagedConnectionMetaData (src)  getMetaData()
                                      throws ResourceException (src) 
Description copied from interface: ManagedConnection (src)
Gets metadata inormation for this instances underlying resource manager instance.

Specified by:
getMetaData in interface ManagedConnection (src)
Returns:
Throws:
ResourceException (src) -

setLogWriter

public void setLogWriter(java.io.PrintWriter param1)
                  throws ResourceException (src) 
Description copied from interface: ManagedConnection (src)
Sets the logwriter for this instance.

Specified by:
setLogWriter in interface ManagedConnection (src)
Parameters:
param1 -
Throws:
ResourceException (src) -

cleanup

public void cleanup()
             throws ResourceException (src) 
Description copied from interface: ManagedConnection (src)
Application server calls this to force cleanup of connection.

Specified by:
cleanup in interface ManagedConnection (src)
Throws:
ResourceException (src) -

getConnection

public java.lang.Object getConnection(javax.security.auth.Subject subject,
                                      ConnectionRequestInfo (src)  cri)
                               throws ResourceException (src) 
Description copied from interface: ManagedConnection (src)
Creates a new connection handle for the underlying connection.

Specified by:
getConnection in interface ManagedConnection (src)
Parameters:
subject - the subject
cri - the connection request info
Returns:
Throws:
ResourceException (src) -

destroy

public void destroy()
             throws ResourceException (src) 
Description copied from interface: ManagedConnection (src)
Destroys the connection to the underlying resource.

Specified by:
destroy in interface ManagedConnection (src)
Throws:
ResourceException (src) -

checkValid

public boolean checkValid()

broadcastConnectionError

protected void broadcastConnectionError(java.sql.SQLException e)

getLog

protected Logger (src)  getLog()

checkState

protected void checkState()
                   throws java.sql.SQLException
Checks the state

Throws:
java.sql.SQLException

checkException

protected void checkException(java.sql.SQLException e)
                       throws ResourceException (src) 
Throws:
ResourceException (src)