Scalable Database Server, HiRDB Version 8 UAP Development Guide

[Contents][Index][Back][Next]

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

Class Method Trace acquisition level
1 2 3 4 5#1
Connection void close() Y Y Y Y Y
void commit() -- Y Y Y Y
Statement createStatement()#2 Y Y Y Y Y
Statement createStatement(int resultSetType, int resultSetConcurrency)#3 Y Y Y Y Y
DatabaseMetaData getMetaData() -- Y Y Y Y
PreparedStatement prepareStatement(String sql)#2 Y Y Y Y Y
PreparedStatement prepareStatement(String sql, int resultSetType, int resultSetConcurrency)#3 Y Y Y Y Y
void rollback()#2 -- Y Y Y Y
void setAutoCommit(boolean autoCommit) -- Y Y Y Y
DatabaseMetaData ResultSet getBestRowIdentifier(String catalog, String schema, String table, int scope, boolean nullable) -- Y Y Y Y
ResultSet getCatalogs() -- Y Y Y Y
ResultSet getColumnPrivileges(String catalog, String schema, String table, String columnNamePattern) -- Y Y Y Y
ResultSet getColumns(String catalog, String schemaPattern, String tableNamePattern, String columnNamePattern) -- Y Y Y Y
Connection getConnection() -- Y Y Y Y
ResultSet getCrossReference(String primaryCatalog, String primarySchema, String primaryTable, String foreignCatalog, String foreignSchema, String foreignTable) -- Y Y Y Y
ResultSet getExportedKeys(String catalog, String schema, String table) -- Y Y Y Y
ResultSet getImportedKeys(String catalog, String schema, String table) -- Y Y Y Y
ResultSet getIndexInfo(String catalog, String schema, String table, boolean unique, boolean approximate) -- Y Y Y Y
ResultSet getPrimaryKeys(String catalog, String schema, String table) -- Y Y Y Y
ResultSet getProcedureColumns(String catalog, String schemaPattern, String procedureNamePattern, String columnNamePattern) -- Y Y Y Y
ResultSet getProcedures(String catalog, String schemaPattern, String procedureNamePattern) -- Y Y Y Y
ResultSet getSchemas() -- Y Y Y Y
ResultSet getTablePrivileges(String catalog, String schemaPattern, String tableNamePattern) -- Y Y Y Y
ResultSet getTables(String catalog, String schemaPattern, String tableNamePattern, String[] types) -- Y Y Y Y
ResultSet getTableTypes() -- Y Y Y Y
ResultSet getTypeInfo() -- Y Y Y Y
ResultSet getUDTs(String catalog, String schemaPattern, String typeNamePattern, int[] types) -- Y Y Y Y
ResultSet getVersionColumns(String catalog, String schema, String table) -- Y Y Y Y
Driver Connection connect(String url, Properties info) Y Y Y Y Y
PreparedStatement boolean execute()#2 -- Y Y Y Y
ResultSet executeQuery()#2 -- Y Y Y Y
int executeUpdate()#2 -- Y Y Y Y
ResultSetMetaData getMetaData() -- Y Y Y Y
boolean execute(String sql)#3, #5 Y -- Y Y Y
int[] executeBatch()#5 -- Y Y Y Y
ResultSet executeQuery(String sql)#3, #5 Y Y Y Y Y
int executeUpdate(String sql)#3, #5 Y Y Y Y Y
ResultSet boolean absolute(int row) -- Y Y Y Y
void afterLast() -- Y Y Y Y
void beforeFirst() -- Y Y Y Y
void close() -- Y Y Y Y
boolean first() -- Y Y Y Y
ResultSetMetaData getMetaData() -- Y Y Y Y
Statement getStatement() -- Y Y Y Y
boolean last() -- Y Y Y Y
boolean next() -- Y Y Y Y
boolean relative(int rows) -- Y Y Y Y
boolean isAfterLast() -- Y Y Y Y
boolean isBeforeFirst() -- Y Y Y Y
boolean isLast() -- Y Y Y Y
Statement void cancel() -- Y Y Y Y
void close() Y Y Y Y Y
boolean execute(String sql) Y Y Y Y Y
int[] executeBatch() -- Y Y Y Y
ResultSet executeQuery(String sql) Y Y Y Y Y
int executeUpdate(String sql) Y Y Y Y Y
ResultSet getResultSet() -- Y Y Y Y
Blob long position(Blob pattern,long start)#2 -- Y Y Y Y
long position(byte[] pattern, long start)#3 -- Y Y Y Y
long length() -- Y Y Y Y
byte[] getBytes(long pos, int length) -- Y Y Y Y
InputStream int read()#2 -- Y Y Y Y
int read(byte[] data, int data_offset,int data_len)#3 -- Y Y Y Y
int read(byte[] data, int data_offset,int data_len)#4 -- Y Y Y Y
DataSource getConnection()#2 Y Y Y Y Y
getConnection(String username, String password)#3 Y Y Y Y Y
ConnectionPoolDataSource getPooledConnection()#2 Y Y Y Y Y
getPooledConnection(String username, String password)#3 Y Y Y Y Y
PooledConnection close() Y Y Y Y Y
getConnection() Y Y Y Y Y
XADataSource getXAConnection()#2 Y Y Y Y Y
getXAConnection(String username, String password)#3 Y Y Y Y Y
XAConnection getXAResource() Y Y Y Y Y
XAResource commit(Xid xid, boolean onePhase) -- -- Y Y Y
end(Xid xid, int flags) -- -- Y Y Y
forget(Xid xid) -- -- Y Y Y
isSameRM(XAResource xares) -- -- Y Y Y
prepare(Xid xid) -- -- Y Y Y
recover(int flag) -- -- Y Y Y
rollback(Xid xid) -- -- Y Y Y
start(Xid xid, int flags) -- -- Y Y Y

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

Item System property Description Default#
File output destination HiRDB_for_Java_FileDIR Specify 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 file HiRDB_for_Java_FileOutNUM Specify 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 memory HiRDB_for_Java_OnMemNUM Specify 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 level HiRDB_for_Java_TraceLevel Specify 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