public class ClientXAConnection extends ClientPooledConnection implements javax.sql.XAConnection
| Modifier and Type | Field and 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_ |
logicalConnection_, logWriter_, netPhysicalConnection_, netXAPhysicalConnection_, physicalConnection_, rmId_| Constructor and Description |
|---|
ClientXAConnection(ClientBaseDataSourceRoot ds,
NetLogWriter logWtr,
java.lang.String userId,
java.lang.String password) |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Closes the physical connection to the data source and frees all
assoicated resources.
|
NetXAConnection |
createControlConnection(NetLogWriter logWriter,
java.lang.String user,
java.lang.String password,
ClientBaseDataSourceRoot dataSource,
int rmId,
boolean isXAConn) |
java.sql.Connection |
getConnection()
Creates a logical connection.
|
int |
getRmId() |
private static int |
getUnigueRmId() |
javax.transaction.xa.XAResource |
getXAResource() |
addConnectionEventListener, finalize, getNetXAConnection, informListeners, isStatementPoolingEnabled, nullLogicalConnection, onStatementClose, onStatementErrorOccurred, recycleConnection, removeConnectionEventListenerprivate 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(ClientBaseDataSourceRoot ds, NetLogWriter logWtr, java.lang.String userId, java.lang.String password) throws java.sql.SQLException
java.sql.SQLExceptionpublic java.sql.Connection getConnection()
throws java.sql.SQLException
ClientPooledConnectionThis 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.PooledConnectiongetConnection in class ClientPooledConnectionjava.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.XAConnectionjava.sql.SQLExceptionpublic NetXAConnection createControlConnection(NetLogWriter logWriter, java.lang.String user, java.lang.String password, ClientBaseDataSourceRoot dataSource, int rmId, boolean isXAConn) throws java.sql.SQLException
java.sql.SQLExceptionpublic void close()
throws java.sql.SQLException
ClientPooledConnectionclose in interface javax.sql.PooledConnectionclose in class ClientPooledConnectionjava.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.10 Internals - Copyright © 2004,2014 The Apache Software Foundation. All Rights Reserved.