| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| How to use Castor JDO's connection proxiesIntroduction Intended Audience Prerequisites Steps Enable the use of the JDBC proxy classes References IntroductionCastor JDO uses the Jakarta Common's Logging package for output information relevant to the execution of a specific JDO operations to a log file. The information output historically included the SQL statements used by Castor to execute the various persistence operations such as loading or updating domain entities. Unfortunately, the SQL statements logged did not include any information about the parameters being bound to the prepared statements immediately before execution, and hence made it very hard for users of Castor JDO to analyze these in teh case of an issue/problem To improve this situation, proxy classes for the java.sql.Connection and java.sql.PreparedStatement interfaces have been added, to allow for complete and better JDBC statements to be output to the log files. As this might impose a performance penalty at run-time, we have allowed for this to be turned off completely through the standard Castor property file. A new property has been added to the Castor property file (castor.properties) to allow configuration of this feature. Intended AudienceAnyone who wants to use the new JDBC proxy classes with Castor JDO selectively, i.e. enabling and disabling their use. The example given describes how to turn the use of the proxy classes on/off. PrerequisitesYou should have a valid castor.properties file as part of your application. StepsHere is how to proceed. Enable the use of the JDBC proxy classesTo enable the use of the JDBC proxy classes described above, please add the following section to your castor.properties file.
This instructs Castor JDO to use the JDBC proxy classes and to output full information about the SQL statements used at run-time. When disabled, no logging of SQL statements will occur al all. References
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||