|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
com.caucho.sql.QPooledConnection
Represents a single pooled connection. For the most part, it just passes the requests to the underlying JDBC connection.
Closing the connection will return the real connection to the pool and close any statements.
Fields inherited from interface java.sql.Connection |
TRANSACTION_NONE, TRANSACTION_READ_COMMITTED, TRANSACTION_READ_UNCOMMITTED, TRANSACTION_REPEATABLE_READ, TRANSACTION_SERIALIZABLE |
Method Summary | |
void |
clearWarnings()
|
void |
close()
Reset the connection and return the underlying JDBC connection to the pool. |
void |
commit()
|
void |
commit(com.caucho.sql.Xid xid,
boolean onePhase)
commit the resource |
java.sql.Statement |
createStatement()
JDBC api to create a new statement. |
java.sql.Statement |
createStatement(int resultSetType,
int resultSetConcurrency)
JDBC api to create a new statement. |
void |
end(com.caucho.sql.Xid xid,
int flags)
ends work with the resource |
void |
finalize()
If the user forgets to close the connection, make sure it's killed from the pool. |
void |
forget(com.caucho.sql.Xid xid)
forget about the transaction |
boolean |
getAutoCommit()
|
java.lang.String |
getCatalog()
JDBC api to return the connection's catalog. |
java.sql.Connection |
getConnection()
Returns the underlying connection. |
java.sql.DatabaseMetaData |
getMetaData()
Gets the connection's metadata. |
int |
getTransactionIsolation()
|
int |
getTransactionTimeout()
|
java.util.Map |
getTypeMap()
Returns the connection's type map. |
java.sql.SQLWarning |
getWarnings()
|
boolean |
isClosed()
Returns true if the connection is closed. |
boolean |
isReadOnly()
|
boolean |
isSameRM(com.caucho.sql.XAResource resource)
identity of resources |
java.lang.String |
nativeSQL(java.lang.String sql)
Calls the nativeSQL method for the connection. |
int |
prepare(com.caucho.sql.Xid xid)
Vote using phase-1 of the 2-phase commit. |
java.sql.CallableStatement |
prepareCall(java.lang.String sql)
|
java.sql.CallableStatement |
prepareCall(java.lang.String sql,
int resultSetType,
int resultSetConcurrency)
|
java.sql.PreparedStatement |
prepareStatement(java.lang.String sql)
|
java.sql.PreparedStatement |
prepareStatement(java.lang.String sql,
int resultSetType,
int resultSetConcurrency)
|
com.caucho.sql.Xid[] |
recover(int flag)
recover the transaction |
void |
rollback()
|
void |
rollback(com.caucho.sql.Xid xid)
rollback the resource |
void |
setAutoCommit(boolean autoCommit)
|
void |
setCatalog(java.lang.String catalog)
Sets the JDBC catalog. |
void |
setReadOnly(boolean readOnly)
|
void |
setTransactionIsolation(int isolation)
|
boolean |
setTransactionTimeout(int seconds)
sets the transaction timeout |
void |
setTypeMap(java.util.Map map)
Sets the connection's type map. |
void |
start(com.caucho.sql.Xid xid,
int flags)
starts work on a transaction branch |
java.lang.String |
toString()
|
Method Detail |
public java.sql.Connection getConnection()
public java.sql.Statement createStatement() throws java.sql.SQLException
createStatement
in interface java.sql.Connection
public java.sql.Statement createStatement(int resultSetType, int resultSetConcurrency) throws java.sql.SQLException
createStatement
in interface java.sql.Connection
public java.lang.String getCatalog() throws java.sql.SQLException
getCatalog
in interface java.sql.Connection
public void setCatalog(java.lang.String catalog) throws java.sql.SQLException
setCatalog
in interface java.sql.Connection
public java.sql.DatabaseMetaData getMetaData() throws java.sql.SQLException
getMetaData
in interface java.sql.Connection
public java.util.Map getTypeMap() throws java.sql.SQLException
getTypeMap
in interface java.sql.Connection
public void setTypeMap(java.util.Map map) throws java.sql.SQLException
setTypeMap
in interface java.sql.Connection
public java.lang.String nativeSQL(java.lang.String sql) throws java.sql.SQLException
nativeSQL
in interface java.sql.Connection
public int getTransactionIsolation() throws java.sql.SQLException
getTransactionIsolation
in interface java.sql.Connection
public void setTransactionIsolation(int isolation) throws java.sql.SQLException
setTransactionIsolation
in interface java.sql.Connection
public java.sql.SQLWarning getWarnings() throws java.sql.SQLException
getWarnings
in interface java.sql.Connection
public void clearWarnings() throws java.sql.SQLException
clearWarnings
in interface java.sql.Connection
public void setReadOnly(boolean readOnly) throws java.sql.SQLException
setReadOnly
in interface java.sql.Connection
public boolean isReadOnly() throws java.sql.SQLException
isReadOnly
in interface java.sql.Connection
public java.sql.CallableStatement prepareCall(java.lang.String sql, int resultSetType, int resultSetConcurrency) throws java.sql.SQLException
prepareCall
in interface java.sql.Connection
public java.sql.CallableStatement prepareCall(java.lang.String sql) throws java.sql.SQLException
prepareCall
in interface java.sql.Connection
public java.sql.PreparedStatement prepareStatement(java.lang.String sql) throws java.sql.SQLException
prepareStatement
in interface java.sql.Connection
public java.sql.PreparedStatement prepareStatement(java.lang.String sql, int resultSetType, int resultSetConcurrency) throws java.sql.SQLException
prepareStatement
in interface java.sql.Connection
public boolean getAutoCommit() throws java.sql.SQLException
getAutoCommit
in interface java.sql.Connection
public void setAutoCommit(boolean autoCommit) throws java.sql.SQLException
setAutoCommit
in interface java.sql.Connection
public void commit() throws java.sql.SQLException
commit
in interface java.sql.Connection
public void rollback() throws java.sql.SQLException
rollback
in interface java.sql.Connection
public boolean isClosed() throws java.sql.SQLException
isClosed
in interface java.sql.Connection
public void close() throws java.sql.SQLException
close
in interface java.sql.Connection
public boolean isSameRM(com.caucho.sql.XAResource resource) throws com.caucho.sql.XAException
public void start(com.caucho.sql.Xid xid, int flags) throws com.caucho.sql.XAException
public boolean setTransactionTimeout(int seconds) throws com.caucho.sql.XAException
public int getTransactionTimeout() throws com.caucho.sql.XAException
public void forget(com.caucho.sql.Xid xid) throws com.caucho.sql.XAException
public int prepare(com.caucho.sql.Xid xid) throws com.caucho.sql.XAException
public void rollback(com.caucho.sql.Xid xid) throws com.caucho.sql.XAException
public void commit(com.caucho.sql.Xid xid, boolean onePhase) throws com.caucho.sql.XAException
public com.caucho.sql.Xid[] recover(int flag) throws com.caucho.sql.XAException
public void end(com.caucho.sql.Xid xid, int flags)
public void finalize()
public java.lang.String toString()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |