スケーラブルデータベースサーバ HiRDB Version 8 UAP開発ガイド
Exceptionトレースログの取得対象は,Java 2 Platform, Standard Edition, version 1.4のAPI仕様にあるパッケージjava.sqlに記述されているメソッドの呼び出しと戻りです。
次の条件をすべて満たすメソッドが取得されます。
なお,ResultSet.getXXXメソッド,PreparedStatement.setXXXメソッド,Connection.isClosedメソッドなど,オブジェクト内の情報を参照して返すだけのメソッドや,オブジェクト内に情報を格納するだけのメソッドは取得対象になりません。
Exceptionトレースログの取得対象であるメソッドと,そのメソッドのトレース取得レベルを次の表に示します。
表18-87 Exceptionトレースログの取得対象であるメソッドとトレース取得レベル
クラス | メソッド | トレース取得レベル | ||||
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5※1 | ||
CallableStatement | void close()※6 | ○ | ○ | ○ | ○ | ○ |
boolean execute()※2,※6 | × | ○ | ○ | ○ | ○ | |
ResultSet executeQuery()※2,※6 | × | ○ | ○ | ○ | ○ | |
int executeUpdate()※2,※6 | × | ○ | ○ | ○ | ○ | |
boolean execute(String sql)※3,※6 | ○ | ○ | ○ | ○ | ○ | |
int[] executeBatch()※6 | × | ○ | ○ | ○ | ○ | |
ResultSet executeQuery(String sql)※3,※6 | ○ | ○ | ○ | ○ | ○ | |
int executeUpdate(String sql)※3,※6 | ○ | ○ | ○ | ○ | ○ | |
Connection | void close() | ○ | ○ | ○ | ○ | ○ |
void commit() | × | ○ | ○ | ○ | ○ | |
Statement createStatement()※2 | ○ | ○ | ○ | ○ | ○ | |
Statement createStatement(int resultSetType, int resultSetConcurrency)※3 | ○ | ○ | ○ | ○ | ○ | |
DatabaseMetaData getMetaData() | × | ○ | ○ | ○ | ○ | |
CallableStatement prepareCall(String sql)※2 | ○ | ○ | ○ | ○ | ○ | |
CallableStatement prepareCall(String sql, int resultSetType, int resultSetConcurrency)※3 | ○ | ○ | ○ | ○ | ○ | |
PreparedStatement prepareStatement(String sql)※2 | ○ | ○ | ○ | ○ | ○ | |
PreparedStatement prepareStatement(String sql, int resultSetType, int resultSetConcurrency)※3 | ○ | ○ | ○ | ○ | ○ | |
void rollback()※2 | × | ○ | ○ | ○ | ○ | |
void setAutoCommit(boolean autoCommit) | × | ○ | ○ | ○ | ○ | |
DatabaseMetaData | ResultSet getAttributes(String catalog, String schemaPattern, String typeNamePattern, String attributeNamePattern) | × | ○ | ○ | ○ | ○ |
ResultSet getBestRowIdentifier(String catalog, String schema, String table, int scope, boolean nullable) | × | ○ | ○ | ○ | ○ | |
ResultSet getCatalogs() | × | ○ | ○ | ○ | ○ | |
ResultSet getColumnPrivileges(String catalog, String schema, String table, String columnNamePattern) | × | ○ | ○ | ○ | ○ | |
ResultSet getColumns(String catalog, String schemaPattern, String tableNamePattern, String columnNamePattern) | × | ○ | ○ | ○ | ○ | |
Connection getConnection() | × | ○ | ○ | ○ | ○ | |
ResultSet getCrossReference(String primaryCatalog, String primarySchema, String primaryTable, String foreignCatalog, String foreignSchema, String foreignTable) | × | ○ | ○ | ○ | ○ | |
ResultSet getExportedKeys(String catalog, String schema, String table) | × | ○ | ○ | ○ | ○ | |
ResultSet getImportedKeys(String catalog, String schema, String table) | × | ○ | ○ | ○ | ○ | |
ResultSet getIndexInfo(String catalog, String schema, String table, boolean unique, boolean approximate) | × | ○ | ○ | ○ | ○ | |
ResultSet getPrimaryKeys(String catalog, String schema, String table) | × | ○ | ○ | ○ | ○ | |
ResultSet getProcedureColumns(String catalog, String schemaPattern, String procedureNamePattern, String columnNamePattern) | × | ○ | ○ | ○ | ○ | |
ResultSet getProcedures(String catalog, String schemaPattern, String procedureNamePattern) | × | ○ | ○ | ○ | ○ | |
ResultSet getSchemas() | × | ○ | ○ | ○ | ○ | |
ResultSet getSuperTables(String catalog, String schemaPattern, String tableNamePattern) | × | ○ | ○ | ○ | ○ | |
ResultSet getSuperTypes(String catalog, String schemaPattern, String typeNamePattern) | × | ○ | ○ | ○ | ○ | |
ResultSet getTablePrivileges(String catalog, String schemaPattern, String tableNamePattern) | × | ○ | ○ | ○ | ○ | |
ResultSet getTables(String catalog, String schemaPattern, String tableNamePattern, String[] types) | × | ○ | ○ | ○ | ○ | |
ResultSet getTableTypes() | × | ○ | ○ | ○ | ○ | |
ResultSet getTypeInfo() | × | ○ | ○ | ○ | ○ | |
ResultSet getUDTs(String catalog, String schemaPattern, String typeNamePattern, int[] types) | × | ○ | ○ | ○ | ○ | |
ResultSet getVersionColumns(String catalog, String schema, String table) | × | ○ | ○ | ○ | ○ | |
Driver | Connection connect(String url, Properties info) | ○ | ○ | ○ | ○ | ○ |
PreparedStatement | boolean execute()※2 | × | ○ | ○ | ○ | ○ |
ResultSet executeQuery()※2 | × | ○ | ○ | ○ | ○ | |
int executeUpdate()※2 | × | ○ | ○ | ○ | ○ | |
ResultSetMetaData getMetaData() | × | ○ | ○ | ○ | ○ | |
boolean execute(String sql)※3,※5 | ○ | × | ○ | ○ | ○ | |
int[] executeBatch()※5 | × | ○ | ○ | ○ | ○ | |
ResultSet executeQuery(String sql)※3,※5 | ○ | ○ | ○ | ○ | ○ | |
int executeUpdate(String sql)※3,※5 | ○ | ○ | ○ | ○ | ○ | |
ResultSet | boolean absolute(int row) | × | ○ | ○ | ○ | ○ |
void afterLast() | × | ○ | ○ | ○ | ○ | |
void beforeFirst() | × | ○ | ○ | ○ | ○ | |
void close() | × | ○ | ○ | ○ | ○ | |
boolean first() | × | ○ | ○ | ○ | ○ | |
ResultSetMetaData getMetaData() | × | ○ | ○ | ○ | ○ | |
Statement getStatement() | × | ○ | ○ | ○ | ○ | |
boolean last() | × | ○ | ○ | ○ | ○ | |
boolean next() | × | ○ | ○ | ○ | ○ | |
boolean relative(int rows) | × | ○ | ○ | ○ | ○ | |
boolean isAfterLast() | × | ○ | ○ | ○ | ○ | |
boolean isBeforeFirst() | × | ○ | ○ | ○ | ○ | |
boolean isLast() | × | ○ | ○ | ○ | ○ | |
Statement | void cancel() | × | ○ | ○ | ○ | ○ |
void close() | ○ | ○ | ○ | ○ | ○ | |
boolean execute(String sql) | ○ | ○ | ○ | ○ | ○ | |
int[] executeBatch() | × | ○ | ○ | ○ | ○ | |
ResultSet executeQuery(String sql) | ○ | ○ | ○ | ○ | ○ | |
int executeUpdate(String sql) | ○ | ○ | ○ | ○ | ○ | |
ResultSet getResultSet() | × | ○ | ○ | ○ | ○ | |
Blob | long position(Blob pattern,long start)※2 | × | ○ | ○ | ○ | ○ |
long position(byte[] pattern, long start)※3 | × | ○ | ○ | ○ | ○ | |
long length() | × | ○ | ○ | ○ | ○ | |
byte[] getBytes(long pos, int length) | × | ○ | ○ | ○ | ○ | |
InputStream | int read()※2 | × | ○ | ○ | ○ | ○ |
int read(byte[] data, int data_offset,int data_len)※3 | × | ○ | ○ | ○ | ○ | |
int read(byte[] data, int data_offset,int data_len)※4 | × | ○ | ○ | ○ | ○ | |
DataSource | getConnection()※2 | ○ | ○ | ○ | ○ | ○ |
getConnection(String username, String password)※3 | ○ | ○ | ○ | ○ | ○ | |
ConnectionPoolDataSource | getPooledConnection()※2 | ○ | ○ | ○ | ○ | ○ |
getPooledConnection(String username, String password)※3 | ○ | ○ | ○ | ○ | ○ | |
PooledConnection | close() | ○ | ○ | ○ | ○ | ○ |
getConnection() | ○ | ○ | ○ | ○ | ○ | |
XADataSource | getXAConnection()※2 | ○ | ○ | ○ | ○ | ○ |
getXAConnection(String username, String password)※3 | ○ | ○ | ○ | ○ | ○ | |
XAConnection | getXAResource() | ○ | ○ | ○ | ○ | ○ |
XAResource | commit(Xid xid, boolean onePhase) | × | × | ○ | ○ | ○ |
end(Xid xid, int flags) | × | × | ○ | ○ | ○ | |
forget(Xid xid) | × | × | ○ | ○ | ○ | |
isSameRM(XAResource xares) | × | × | ○ | ○ | ○ | |
prepare(Xid xid) | × | × | ○ | ○ | ○ | |
recover(int flag) | × | × | ○ | ○ | ○ | |
rollback(Xid xid) | × | × | ○ | ○ | ○ | |
start(Xid xid, int flags) | × | × | ○ | ○ | ○ |
Exceptionトレースログのファイル出力先,ファイルへの出力数,メモリ内取得情報数,及びトレース取得レベルは,システムプロパティ又はクライアント環境定義で設定します。優先順位は次のとおりです。
クライアント環境定義では,次の項目を指定します。
指定値の詳細は,「6.6.4 クライアント環境定義の設定内容」を参照してください。
なお,これらのクライアント環境定義に不正な値が指定されて,SQLExceptionを投入する際に取得するExceptionトレースログでは,これらのクライアント環境定義に値が指定されなかったものとみなされます。その場合は,次の表に示すデフォルトが仮定されます。
システムプロパティでは,次の表に示す項目を指定します。
表18-88 Exceptionトレースログを取得するためのシステムプロパティの設定
項目 | システムプロパティ | 内容 | デフォルト※ |
---|---|---|---|
ファイル出力先 | HiRDB_for_Java_FileDIR | Exceptionトレースログを出力するディレクトリを,絶対パスで指定します。Exceptionトレースログは,指定したディレクトリの直下に出力されます。 | カレントディレクトリ |
ファイルへの出力数 | HiRDB_for_Java_FileOutNUM | 1ファイルへ出力する情報数の上限を指定します。指定できる範囲は1〜50です。 実際に1ファイルへ出力する情報数の上限は,「ファイルへの出力数」×「メモリ内取得情報数」個となります。 ファイルへの出力数は,「18.15.2 出力形式」に示す形式2〜形式4をそれぞれ1個と数えます。 なお,ファイルには,メモリに蓄積した順番に出力されます。 また,上限値を超えてファイルに出力する場合は,2ファイルでラップアラウンドします。ファイル名は次のとおりです。
|
5 |
メモリ内取得情報数 | HiRDB_for_Java_OnMemNUM | メモリ内で蓄積する情報数の上限を指定します。指定できる範囲は500〜10,000です。 なお,メモリ内取得情報は,表18-87で示したメソッド一つを1個と数えます。 また,上限値を超えて情報を蓄積しようとすると,古い情報から順に,新しい情報に上書きされます。 |
1,000 |
トレース取得レベル | HiRDB_for_Java_TraceLevel | トレース取得レベルを指定します。指定できる範囲は0〜5です。 5を指定すると,内部呼び出しを含めたすべてのトレース取得対象メソッドを取得します。 0を指定すると,Exceptionトレースログを取得しません。 |
1 |
All Rights Reserved. Copyright (C) 2006, 2016, Hitachi, Ltd.