Scalable Database Server, HiRDB Version 8 UAP Development Guide

[Contents][Index][Back][Next]

17.6.3 Distributed transactions

Organization of this subsection
(1) XAConnection interface
(2) XADataSource interface
(3) XAResource interface
(4) XAException interface

(1) XAConnection interface

For details and usage information about the methods provided by the XAConnection interface, see the JDBC documentation. This section shows the XAConnection interface methods that are supported by the JDBC driver.

(a) Methods

Table 17-26 lists the methods of the XAConnection interface.

Table 17-26 XAConnection interface methods

Method Remarks
getXAResource() --

Legend:
--: None.
(b) Package and class names

The names of the package and class for using this interface directly are as follows:

Package name: JP.co.Hitachi.soft.HiRDB.JDBC

Class name: PrdbXAConnection

(2) XADataSource interface

For details and usage information about the methods provided by the XADataSource interface, see the JDBC documentation. This section shows the XADataSource interface methods that are supported by the JDBC driver.

(a) Methods

Table 17-27 lists the methods of the XADataSource interface.

Table 17-27 XADataSource interface methods

Method Remarks
getLoginTimeout() Returns the value specified by the setLoginTimeout method. If no value was set by the setLoginTimeout method, this method returns 0.
getLogWriter() --
getXAConnection() For details about the priorities among the setting methods for authorization identifiers and passwords, see 17.11 Connection information priorities.
getXAConnection(String username,String password) If the user or password argument is the null value, this method indicates that no authorization identifier or password was specified by this argument.
If the password argument is a character string whose length is 0, this method indicates that no password was specified.
For details about the setting value used when a password is not specified, see 17.11 Connection information priorities.
If the user argument is a character string whose length is 0, this method throws an SQLException.
setLoginTimeout(int seconds) This specification is used only for the physical connection time with the HiRDB server. When 0 is specified or when the setLoginTimeout method is not executed, the time that was specified in PDCONNECTWAITTIME in the client environment definition becomes the maximum wait time for the HiRDB server.
If a value outside the range 0-300 is specified, this method throws an SQLException.
setLogWriter(PrintWriter out) --

Legend:
--: None
(b) Package and class names

The names of the package and class for using this interface directly are as follows:

Package name: JP.co.Hitachi.soft.HiRDB.JDBC

Class name: PrdbXADataSource

(3) XAResource interface

For details and usage information about the methods provided by the XAResource interface, see the JDBC documentation. This section shows the XAResource interface methods that are supported by the JDBC driver.

(a) Methods

Table 17-28 lists the methods of the XAResource interface.

Table 17-28 XAResource interface methods

Method Remarks
commit(Xid xid, boolean onePhase) --
end(Xid xid, int flags) --
getTransactionTimeout() This method returns 0 unconditionally.
prepare(Xid xid) --
recover(int flag) --
rollback(Xid xid) --
setTransactionTimeout(int seconds) This method does not set the transaction timeout value. Instead, it returns false to indicate that the transaction timeout time was not set properly.
start(Xid xid, int flags) --

Legend:
--: None
(b) Package and class names

The names of the package and class for using this interface directly are as follows:

Package name: JP.co.Hitachi.soft.HiRDB.JDBC

Class name: PrdbXAResource

(4) XAException interface

The XAException interface directly uses the XAException class of the javax.transaction.xa package. For details and usage instructions about the methods provided by the XAException interface, see the related JDBC documentation.