JDBC Driver for SQL/MX Programmer's Reference
Home | Contents | Prev | Next | Index | Glossary
JDBC Trace Facility
The JDBC trace facility traces the entry point of all JDBC methods called from the Java
applications. To make this facility generic, it is implemented as a JDBC driver wrapper.
The JDBC trace facility can be enabled in any of the following ways in which a JDBC
connection to a database can be obtained:
Tracing using the DriverManager Class●
Tracing using the DataSource Implementation●
Tracing using the java command●
Tracing using the system.setProperty method●
Tracing by loading the trace driver within the program●
Tracing using a wrapper data source●
Enabling Tracing for Application Servers●
Output Format●
JDBC Trace Facility Demonstration Program●
Tracing Using the DriverManager
Class
Java applications can use the DriverManager class to obtain the JDBC connection and
enable the JDBC trace facility by loading the JDBC trace driver.
com.tandem.jdbc.TDriver is the trace driver class that implements the Driver interface.
The application can load the JDBC trace driver in one of the following ways:
Specify the JDBC trace driver class in the -Djdbc.drivers option in the command
line.
●
Use the Class.ForName method within the application.●
Add the JDBC trace class to the jdbc.drivers property within the application.●
The JDBC URL passed in the getConnection method of the driver class determines which
JDBC driver obtains the connection. Use the following URL and JDBC driver to obtain the
JDBC connection: