17.13.1 Methods to be acquired and setup for log acquisition

Organization of this subsection
(1) Methods to be acquired in the Exception trace log
(2) Setup for acquisition of the Exception trace log

(1) Methods to be acquired in the Exception trace log

The information to be acquired in the Exception trace log is the calling and return of methods described in the java.sql package found in the API specifications of Java 2 Platform, Standard Edition, Version 1.4.

Methods that satisfy all of the following conditions are acquired:

Methods that only look up and return information found in objects or only store information into objects, such as the ResultSet.getXXX, PreparedStatement.setXXX, and Connection.isClosed methods, are not acquisition targets.

Table 17-49 lists the methods that are acquisition targets of the Exception trace log. The table also provides the trace acquisition levels of the methods.

Table 17-49 Methods that are acquisition targets of the Exception trace log and their trace acquisition levels

ClassMethodTrace acquisition level
12345#1
Connectionvoid close()YYYYY
void commit()--YYYY
Statement createStatement()#2YYYYY
Statement createStatement(int resultSetType, int resultSetConcurrency)#3YYYYY
DatabaseMetaData getMetaData()--YYYY
PreparedStatement prepareStatement(String sql)#2YYYYY
PreparedStatement prepareStatement(String sql, int resultSetType, int resultSetConcurrency)#3YYYYY
void rollback()#2--YYYY
void setAutoCommit(boolean autoCommit)--YYYY
DatabaseMetaDataResultSet getBestRowIdentifier(String catalog, String schema, String table, int scope, boolean nullable)--YYYY
ResultSet getCatalogs()--YYYY
ResultSet getColumnPrivileges(String catalog, String schema, String table, String columnNamePattern)--YYYY
ResultSet getColumns(String catalog, String schemaPattern, String tableNamePattern, String columnNamePattern)--YYYY
Connection getConnection()--YYYY
ResultSet getCrossReference(String primaryCatalog, String primarySchema, String primaryTable, String foreignCatalog, String foreignSchema, String foreignTable)--YYYY
ResultSet getExportedKeys(String catalog, String schema, String table)--YYYY
ResultSet getImportedKeys(String catalog, String schema, String table)--YYYY
ResultSet getIndexInfo(String catalog, String schema, String table, boolean unique, boolean approximate)--YYYY
ResultSet getPrimaryKeys(String catalog, String schema, String table)--YYYY
ResultSet getProcedureColumns(String catalog, String schemaPattern, String procedureNamePattern, String columnNamePattern)--YYYY
ResultSet getProcedures(String catalog, String schemaPattern, String procedureNamePattern)--YYYY
ResultSet getSchemas()--YYYY
ResultSet getTablePrivileges(String catalog, String schemaPattern, String tableNamePattern)--YYYY
ResultSet getTables(String catalog, String schemaPattern, String tableNamePattern, String[] types)--YYYY
ResultSet getTableTypes()--YYYY
ResultSet getTypeInfo()--YYYY
ResultSet getUDTs(String catalog, String schemaPattern, String typeNamePattern, int[] types)--YYYY
ResultSet getVersionColumns(String catalog, String schema, String table)--YYYY
DriverConnection connect(String url, Properties info)YYYYY
PreparedStatementboolean execute()#2--YYYY
ResultSet executeQuery()#2--YYYY
int executeUpdate()#2--YYYY
ResultSetMetaData getMetaData()--YYYY
boolean execute(String sql)#3, #5Y--YYY
int[] executeBatch()#5--YYYY
ResultSet executeQuery(String sql)#3, #5YYYYY
int executeUpdate(String sql)#3, #5YYYYY
ResultSetboolean absolute(int row)--YYYY
void afterLast()--YYYY
void beforeFirst()--YYYY
void close()--YYYY
boolean first()--YYYY
ResultSetMetaData getMetaData()--YYYY
Statement getStatement()--YYYY
boolean last()--YYYY
boolean next()--YYYY
boolean relative(int rows)--YYYY
boolean isAfterLast()--YYYY
boolean isBeforeFirst()--YYYY
boolean isLast()--YYYY
Statementvoid cancel()--YYYY
void close()YYYYY
boolean execute(String sql)YYYYY
int[] executeBatch()--YYYY
ResultSet executeQuery(String sql)YYYYY
int executeUpdate(String sql)YYYYY
ResultSet getResultSet()--YYYY
Bloblong position(Blob pattern,long start)#2--YYYY
long position(byte[] pattern, long start)#3--YYYY
long length()--YYYY
byte[] getBytes(long pos, int length)--YYYY
InputStreamint read()#2--YYYY
int read(byte[] data, int data_offset,int data_len)#3--YYYY
int read(byte[] data, int data_offset,int data_len)#4--YYYY
DataSourcegetConnection()#2YYYYY
getConnection(String username, String password)#3YYYYY
ConnectionPoolDataSourcegetPooledConnection()#2YYYYY
getPooledConnection(String username, String password)#3YYYYY
PooledConnectionclose()YYYYY
getConnection()YYYYY
XADataSourcegetXAConnection()#2YYYYY
getXAConnection(String username, String password)#3YYYYY
XAConnectiongetXAResource()YYYYY
XAResourcecommit(Xid xid, boolean onePhase)----YYY
end(Xid xid, int flags)----YYY
forget(Xid xid)----YYY
isSameRM(XAResource xares)----YYY
prepare(Xid xid)----YYY
recover(int flag)----YYY
rollback(Xid xid)----YYY
start(Xid xid, int flags)----YYY
Legend:
Y: An Exception trace log is acquired.
--: An Exception trace log is not acquired.
#1
If the trace acquisition level is 5, an Exception trace log that includes internal calling is acquired.
#2
method-name(1) is output as the method name.
#3
method-name(2) is output as the method name.
#4
method-name(3) is output as the method name.
#5
This method overrides the method of the Statement class.

(2) Setup for acquisition of the Exception trace log

Use the system properties or the client environment definitions to set the file output destination of the Exception trace log, the number of outputs to the file, the number of information items to be acquired in memory, and the trace acquisition level. The priorities are as follows:

  1. System properties
  2. Client environment definitions
(a) Setting client environment definitions

Specify the following items in the client environment definitions:

For details about the specification values, see 6.6.4 Environment definition information.

If invalid values are specified in these client environment definitions, the facility for controlling the Exception trace log acquired when an SQLException is thrown assumes that values were not specified for these client environment definitions. In this situation, the defaults shown in Table 17-50 are assumed.

(b) Setting system properties

In the system properties, specify the items shown in Table 17-50.

Table 17-50 System property settings for acquisition of the Exception trace log

ItemSystem propertyDescriptionDefault#
File output destinationHiRDB_for_Java_FileDIRSpecify the absolute path of the directory to which the Exception trace log is to be output. The Exception trace log is output immediately under the specified directory.Current directory
Number of outputs to the fileHiRDB_for_Java_FileOutNUMSpecify the maximum number of information items to be output to one file. Specify a value in the range from 1 to 50.
The maximum number of information items to be output to one file is actually number of outputs to the file x number of acquisition items to be acquired in memory.
For the number of outputs to the file, the formats from Format 2 to Format 4 shown in 17.13.2 Output formats are each counted as one output.
The information items are output to memory in the sequence they were stored.
If information items exceeding the maximum value are to be output to a file, the items are wrapped around into two files. The file names are as follows:
  • pdexc1.trc
  • pdexc2.trc
However, the output destination file does not change between Format 1 and Format 2 shown in 17.13.2 Output formats.
5
Number of information items to be acquired in memoryHiRDB_for_Java_OnMemNUMSpecify the maximum number of information items to be stored in memory. You can specify a value in the range from 500 to 10,000.
For the information acquired in memory, each method shown in Table 17-49 is counted as one item.
If the number of information items to be stored exceeds the maximum value, old information items are overwritten with new information items in chronological sequence.
1,000
Trace acquisition levelHiRDB_for_Java_TraceLevelSpecify a trace acquisition level. You can specify a level in the range from 0 to 5.
If you specify 5, all methods that are trace acquisition targets, including internally called methods, are acquired.
If you specify 0, an Exception trace log is not acquired.
1
#
When the Exception trace log is acquired in the following cases, the JDBC driver assumes that values were not specified in the system properties (and the defaults are assumed):
  • When an invalid value is specified in the system properties and an SQLException is thrown during connection to the database
  • When the Java Virtual Machine denies the JDBC driver permission to exchange system properties because of security manager reasons
  • Before initial connection of the Java Virtual Machine is established