|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.derby.jdbc.EmbedPooledConnection
org.apache.derby.jdbc.EmbedXAConnection
class EmbedXAConnection
Field Summary | |
---|---|
private EmbedXAResource |
xaRes
|
Fields inherited from class org.apache.derby.jdbc.EmbedPooledConnection |
---|
currentConnectionHandle, dataSource, defaultIsolationLevel, isActive, realConnection |
Constructor Summary | |
---|---|
EmbedXAConnection(EmbeddedDataSource ds,
ResourceAdapter ra,
java.lang.String u,
java.lang.String p,
boolean requestPassword)
|
Method Summary | |
---|---|
void |
checkAutoCommit(boolean autoCommit)
Allow control over setting auto commit mode. |
void |
checkClose()
Check if the brokered connection can be closed. |
void |
checkCommit()
Allow control over calling commit. |
int |
checkHoldCursors(int holdability,
boolean downgrade)
Are held cursors allowed. |
void |
checkRollback()
Allow control over calling rollback. |
void |
checkSavepoint()
Allow control over creating a Savepoint (JDBC 3.0) |
java.sql.Connection |
getConnection()
Create an object handle for a database connection. |
EngineConnection |
getRealConnection()
Override getRealConnection to create a a local connection when we are not associated with an XA transaction. |
javax.transaction.xa.XAResource |
getXAResource()
|
private boolean |
isGlobal()
Check if this connection is part of a global XA transaction. |
boolean |
isInGlobalTransaction()
Is this a global transaction |
java.sql.CallableStatement |
wrapStatement(java.sql.CallableStatement cs,
java.lang.String sql)
Wrap and control a PreparedStatement |
java.sql.PreparedStatement |
wrapStatement(java.sql.PreparedStatement ps,
java.lang.String sql,
java.lang.Object generatedKeys)
Wrap and control a PreparedStatement |
java.sql.Statement |
wrapStatement(java.sql.Statement s)
Wrap and control a Statement |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface javax.sql.PooledConnection |
---|
addConnectionEventListener, addStatementEventListener, close, removeConnectionEventListener, removeStatementEventListener |
Field Detail |
---|
private EmbedXAResource xaRes
Constructor Detail |
---|
EmbedXAConnection(EmbeddedDataSource ds, ResourceAdapter ra, java.lang.String u, java.lang.String p, boolean requestPassword) throws java.sql.SQLException
java.sql.SQLException
Method Detail |
---|
public boolean isInGlobalTransaction()
BrokeredConnectionControl
isInGlobalTransaction
in interface BrokeredConnectionControl
isInGlobalTransaction
in class EmbedPooledConnection
BrokeredConnectionControl.isInGlobalTransaction()
private boolean isGlobal()
true
if the transaction is global, false
if the
transaction is localpublic final javax.transaction.xa.XAResource getXAResource() throws java.sql.SQLException
getXAResource
in interface javax.sql.XAConnection
java.sql.SQLException
public void checkAutoCommit(boolean autoCommit) throws java.sql.SQLException
checkAutoCommit
in interface BrokeredConnectionControl
checkAutoCommit
in class EmbedPooledConnection
java.sql.SQLException
public int checkHoldCursors(int holdability, boolean downgrade) throws java.sql.SQLException
checkHoldCursors
in interface BrokeredConnectionControl
checkHoldCursors
in class EmbedPooledConnection
downgrade
- true to downgrade the holdability,
false to throw an exception.
java.sql.SQLException
public void checkSavepoint() throws java.sql.SQLException
checkSavepoint
in interface BrokeredConnectionControl
checkSavepoint
in class EmbedPooledConnection
java.sql.SQLException
public void checkRollback() throws java.sql.SQLException
checkRollback
in interface BrokeredConnectionControl
checkRollback
in class EmbedPooledConnection
java.sql.SQLException
public void checkCommit() throws java.sql.SQLException
checkCommit
in interface BrokeredConnectionControl
checkCommit
in class EmbedPooledConnection
java.sql.SQLException
public void checkClose() throws java.sql.SQLException
BrokeredConnectionControl
checkClose
in interface BrokeredConnectionControl
checkClose
in class EmbedPooledConnection
java.sql.SQLException
- if it is not allowed to call close on the brokered
connectionBrokeredConnectionControl.checkClose()
public java.sql.Connection getConnection() throws java.sql.SQLException
EmbedPooledConnection
getConnection
in interface javax.sql.PooledConnection
getConnection
in class EmbedPooledConnection
java.sql.SQLException
- - if a database-access error occurs.public java.sql.Statement wrapStatement(java.sql.Statement s) throws java.sql.SQLException
wrapStatement
in interface BrokeredConnectionControl
wrapStatement
in class EmbedPooledConnection
java.sql.SQLException
public java.sql.PreparedStatement wrapStatement(java.sql.PreparedStatement ps, java.lang.String sql, java.lang.Object generatedKeys) throws java.sql.SQLException
wrapStatement
in interface BrokeredConnectionControl
wrapStatement
in class EmbedPooledConnection
ps
- PreparedStatment to be wrappedsql
- StringgeneratedKeys
- Object
java.sql.SQLException
public java.sql.CallableStatement wrapStatement(java.sql.CallableStatement cs, java.lang.String sql) throws java.sql.SQLException
wrapStatement
in interface BrokeredConnectionControl
wrapStatement
in class EmbedPooledConnection
cs
- CallableStatment to be wrappedsql
- String
java.sql.SQLException
public EngineConnection getRealConnection() throws java.sql.SQLException
getRealConnection
in interface BrokeredConnectionControl
getRealConnection
in class EmbedPooledConnection
java.sql.SQLException
|
Built on Thu 2010-12-23 20:49:13+0000, from revision ??? | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |