The OC4J embedded in JDeveloper 10g does not support JDBC 4.0. When support gets added for JDBC 4.0, JDBC 4.0's features may be added to the JSP web application that we have developed in the previous section. Provision to set client info properties on the Connection
object is a new feature in JDBC 4.0. Client info properties may be set using the setClientInfoProperty()
method of the Connection
object. Set client info properties ApplicationName, ClientUser
, and ClientHostname
as follows:
connection.setClientInfo("ApplicationName","DataDirectApp"); connection.setClientInfo("ClientUser","DataDirect"); connection.setClientInfo("ClientHostname","DataDirectHost");
If the database supports statement caching, we can set statement pooling to true
. To find out whether the database supports statement pooling create a DatabaseMetaData
object. Using the supportsStatementPooling()
method test if the database supports statement pooling. If the database supports statement pooling check...