Package org.apache.derby.client.net
Class NetXAConnection
java.lang.Object
org.apache.derby.client.net.NetXAConnection
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionNetXAConnection
(LogWriter logWriter, String user, String password, BasicClientDataSource40 dataSource, int rmId, boolean isXAConn, ClientPooledConnection cpc) The construcor for the NetXAConnection. -
Method Summary
Modifier and TypeMethodDescriptionprivate void
private NetConnection
createNetConnection
(LogWriter logWriter, String user, String password, BasicClientDataSource40 dataSource, int rmId, boolean isXAConn, ClientPooledConnection cpc) Creates NetConnection for the supported version of jdbc.Returns underlying net connection(package private) void
private void
private void
(package private) void
void
setCorrelatorToken
(byte[] crttoken) (package private) void
setNetXAResource
(NetXAResource xares) (package private) void
private void
private void
(package private) void
(package private) void
writeTransactionStart
(ClientStatement statement)
-
Field Details
-
netCon
-
-
Constructor Details
-
NetXAConnection
public NetXAConnection(LogWriter logWriter, String user, String password, BasicClientDataSource40 dataSource, int rmId, boolean isXAConn, ClientPooledConnection cpc) throws SqlException The construcor for the NetXAConnection. The parameter is set tothis
from ClientXAConnection when it creates an instance of NetXAConnection. This is then passed on the underlying NetConnection constructor and is used to raise StatementEvents from any PreparedStatement that would be created from that NetConnection.- Parameters:
logWriter
- LogWriter object associated with this connectionuser
- user id for this connectionpassword
- password for this connectiondataSource
- The DataSource object passed from the ClientXAConnection object from which this constructor was calledrmId
- The Resource manager ID for XA ConnectionsisXAConn
- true if this is a XA connectioncpc
- The ClientPooledConnection object from which this NetConnection constructor was called. This is used to pass StatementEvents back to the pooledConnection object- Throws:
SqlException
-
-
Method Details
-
setCorrelatorToken
public void setCorrelatorToken(byte[] crttoken) -
setNetXAResource
-
writeLocalXACommit_
- Throws:
SqlException
-
readLocalXACommit_
- Throws:
SqlException
-
writeLocalXARollback_
- Throws:
SqlException
-
readLocalXARollback_
- Throws:
SqlException
-
writeTransactionStart
- Throws:
SqlException
-
writeCommit
- Throws:
SqlException
-
readCommit
- Throws:
SqlException
-
writeRollback
- Throws:
SqlException
-
readRollback
- Throws:
SqlException
-
getNetConnection
Returns underlying net connection- Returns:
- NetConnection
-
checkPlatformVersion
- Throws:
SqlException
-
createNetConnection
private NetConnection createNetConnection(LogWriter logWriter, String user, String password, BasicClientDataSource40 dataSource, int rmId, boolean isXAConn, ClientPooledConnection cpc) throws SqlException Creates NetConnection for the supported version of jdbc. This method can be overwritten to return NetConnection of the supported jdbc version.- Parameters:
logWriter
- LogWriter object associated with this connectionuser
- user id for this connectionpassword
- password for this connectiondataSource
- The DataSource object passed from the ClientXAConnection object from which this constructor was calledrmId
- The Resource manager ID for XA ConnectionsisXAConn
- true if this is a XA connectioncpc
- The ClientPooledConnection object from which this NetConnection constructor was called. This is used to pass StatementEvents back to the pooledConnection object- Returns:
- NetConnection
- Throws:
SqlException
-