The Java application uses the JDBC connection pool to connect to the database.
However, when using an integrated development environment such as Interstage Studio for testing during the Java application development stage, the JDBC driver is called directly in order to connect to the database.
Select the connection methods shown below according to the phase.
Development/testing phase
Call the JDBC directly to connect to the database.
Set CLASSPATH.
The CLASSPATH setting will be required to check the behavior by calling the JDBC driver directly.
The name of the JDBC driver file that can be used in the Java function is as follows:
postgresql-jdbc41.jar
Refer to "2.2.1 Environment Settings" for information on how to set CLASSPATH.
The database server URL is called directly.
Refer to "2.3 Connecting to the Database" for information on how to use the JDBC driver.
Operation phase
The JDBC connection pool of PL/extJava is used to connect to the database.
Use DriverManager.getConnection() to obtain the connection.
"jdbc:default:connection" must be specified as the DriverManager.getConnection() argument.
java.sql.Connection conn = DriverManager.getConnection("jdbc:default:connection");