12.11.2014 Views

web server - Borland Technical Publications

web server - Borland Technical Publications

web server - Borland Technical Publications

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Getting debug output<br />

Table 22.1<br />

maxPreparedStatemen<br />

tsPerQuery<br />

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

Name Allowed Values Description Default Value<br />

Integer<br />

Under certain conditions such as<br />

high concurrency or when CMP<br />

2.0 entity beans are processed,<br />

more than one PreparedStatement<br />

can be processed concurrently for<br />

the same SQL query on the same<br />

pooled connection. For example, a<br />

SQL query SELECT name FROM table1<br />

WHERE id=? can return distinct result<br />

sets when different values are<br />

used for ?. Although the<br />

PreparedStatement cache has a<br />

single entry for each SQL query,<br />

two or more PreparedStatements can<br />

exist in the cache for the query.<br />

This property specifies the<br />

maximum number of cached<br />

PreparedStatements for a single<br />

query. If the limit is exceeded for a<br />

particular query, subsequent<br />

javax.sql.Connection.prepareStatem<br />

ent() calls result in non-cached<br />

instances of PreparedStatement<br />

objects created and returned to<br />

the caller. Like<br />

maxPreparedStatementCacheSize, this<br />

property is only effective when the<br />

reuseStatements property of the<br />

datasource is set to true (default).<br />

20<br />

Getting debug output<br />

A number of system properties can be set to log activity at datasource, connection<br />

pool, connection and statement levels during application processing. It is not<br />

necessary to configure these properties during normal application runtime execution<br />

but should a situation arise where details of JDBC flow of control is needed these<br />

options are useful. Runtime output generated with these properties set can be provided<br />

to <strong>Borland</strong> <strong>Technical</strong> Support to help resolve issues involving JDBC datasource and<br />

connections. Setting these properties for a partition results in log message generation<br />

during JDBC activity. Note that additional log4j configuration is required to ensure that<br />

the messages are actually written to the partition log. Locate the partition's log4j<br />

configuration file, called logConfiguration.xml, and add the following element:<br />

...<br />

<br />

...<br />

<br />

<br />

<br />

...<br />

<br />

System Property<br />

Name Type Description Default<br />

DataSourceDebug Boolean Reports activity at datasource level for all<br />

datasources<br />

ConnectionPoolDebug Boolean Reports activity at connection pool level for<br />

all datasources<br />

False<br />

False<br />

Chapter 22: Using JDBC 203

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

Saved successfully!

Ooh no, something went wrong!