javax.sql.PooledConnection
, javax.sql.XAConnection
public class ClientXAConnection extends ClientPooledConnection implements javax.sql.XAConnection
Modifier and Type | Field | Description |
---|---|---|
private NetXAConnection |
controlCon_ |
|
private boolean |
fFirstGetConnection_ |
|
private java.sql.Connection |
logicalCon_ |
|
private NetXAResource |
netXares_ |
|
private static int |
rmIdSeed_ |
|
private javax.transaction.xa.XAResource |
xares_ |
logWriter_, netXAPhysicalConnection_, physicalConnection_, rmId_
Constructor | Description |
---|---|
ClientXAConnection(BasicClientDataSource40 ds,
LogWriter logWtr,
java.lang.String userId,
java.lang.String password) |
Modifier and Type | Method | Description |
---|---|---|
void |
close() |
Closes the physical connection to the data source and frees all
associated resources.
|
java.sql.Connection |
getConnection() |
Creates a logical connection.
|
int |
getRmId() |
|
private static int |
getUnigueRmId() |
|
javax.transaction.xa.XAResource |
getXAResource() |
addConnectionEventListener, addStatementEventListener, finalize, informListeners, isStatementPoolingEnabled, nullLogicalConnection, onStatementClose, onStatementErrorOccurred, recycleConnection, removeConnectionEventListener, removeStatementEventListener
private static int rmIdSeed_
private javax.transaction.xa.XAResource xares_
private NetXAResource netXares_
private boolean fFirstGetConnection_
private java.sql.Connection logicalCon_
private NetXAConnection controlCon_
public ClientXAConnection(BasicClientDataSource40 ds, LogWriter logWtr, java.lang.String userId, java.lang.String password) throws java.sql.SQLException
java.sql.SQLException
public java.sql.Connection getConnection() throws java.sql.SQLException
ClientPooledConnection
This is the standard API for getting a logical connection handle for a pooled connection. No "resettable" properties are passed, so user, password, and all other properties may not change.
getConnection
in interface javax.sql.PooledConnection
getConnection
in class ClientPooledConnection
java.sql.SQLException
- if creating a new logical connection failsprivate static int getUnigueRmId()
public int getRmId()
public javax.transaction.xa.XAResource getXAResource() throws java.sql.SQLException
getXAResource
in interface javax.sql.XAConnection
java.sql.SQLException
public void close() throws java.sql.SQLException
ClientPooledConnection
close
in interface javax.sql.PooledConnection
close
in class ClientPooledConnection
java.sql.SQLException
- if closing the connection causes an error. Note that
this connection can still be considered closed even if an error
occurs.Apache Derby V10.14 Internals - Copyright © 2004,2018 The Apache Software Foundation. All Rights Reserved.