12.11.2014 Views

web server - Borland Technical Publications

web server - Borland Technical Publications

web server - Borland Technical Publications

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Defining the Connection Pool Properties for a JDBC Datasource<br />

Table 22.1<br />

refreshFrequency Integer Using dbPingSQL, this property<br />

specifies a timeout, in seconds, for<br />

each connection in an idle state.<br />

Once the timeout expires, the<br />

connection is examined to<br />

determine if it is still a valid<br />

connection. All idle connections<br />

are checked for refreshFrequency at<br />

sixty second intervals.<br />

dbPingSQL String Specifies an SQL statement used<br />

to validate open connections<br />

present in the connection pool and<br />

to refresh connections during a<br />

refreshFrequency timeout.<br />

resSharingScope<br />

Connection Pool Properties for a JDBC Datasource (continued)<br />

Name Allowed Values Description Default Value<br />

Enumerated:<br />

■<br />

■<br />

Shareable<br />

Unshareable<br />

Indicates whether connection<br />

statements and result sets are<br />

cached for reuse. If set to<br />

Shareable, connection statements<br />

and results sets are cached,<br />

thereby optimizing throughput of<br />

connections. If set to Unshareable,<br />

connections are closed once the<br />

application closes the connection.<br />

300 (five<br />

minutes)<br />

Not defined.<br />

When no<br />

SQL is<br />

specified, the<br />

container<br />

uses<br />

java.sql.Conne<br />

ctionisClosed(<br />

) method to<br />

validate the<br />

connection.<br />

Shareable<br />

Chapter 22: Using JDBC 201

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!