Scalable Database Server, HiRDB Version 8 UAP Development Guide

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

17.6.1 JNDI support

Organization of this subsection
(1) DataSource interface

(1) DataSource interface

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

(a) Methods

Table 17-23 lists the methods of the DataSource interface.

Table 17-23 DataSource interface methods

Method Remarks
getConnection() For details about the priorities among the setting methods for authorization identifiers and passwords, see 17.11 Connection information priorities.
getConnection(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 that 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.
getLoginTimeout() This method returns the value specified by the setLoginTimeout method. If no value was specified by the setLoginTimeout method, this method returns 0.
getLogWriter() --
setLoginTimeout(int seconds) Use this method to set the physical connection time with the HiRDB server when a Connection object is retrieved with the getConnection method. If the setLoginTimeout method has not been executed, the time 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: PrdbDataSource