Package oracle.jdbc.diagnostics
Interface DiagnosticsMXBean
Interface for Diagnostics MBean operations.
-
Method Summary
Modifier and TypeMethodDescriptionvoidaddErrorCodeToWatchList(String errorCode) Add the error code to be watched for next occurrence in the format ORA-XXXXX.voidClear the keywords that were previously added by invoking operationdumpDiagnoseFirstFailureWhenFutureExceptionContains(String).voidClear the metrics of events captured by the JDBC driver during establishing a connection to database.voidDiagnose First Failure is enabled by default.voiddisableDiagnoseFirstFailureByConnectionIdPrefix(String connectionIdPrefix) Diagnose First Failure is enabled by default.voiddisableDiagnoseFirstFailureByLoggerName(String loggerName) Diagnose First Failure is enabled by default.voiddisableDiagnoseFirstFailureByTenantName(String tenantName) Diagnose First Failure is enabled by default.voidLogging is disabled by default.voiddisableLoggingByConnectionIdPrefix(String connectionIdPrefix) Logging is disabled by default.voiddisableLoggingByLoggerName(String loggerName) Logging is disabled by default.voiddisableLoggingByTenantName(String tenantName) Logging is disabled by default.voidIf disabled, the JDBC driver does not collect metrics of events.voidSensitive diagnostics is disabled by default.voiddisableSensitiveDiagnosticsByConnectionIdPrefix(String connectionIdPrefix) Sensitive diagnostics is disabled by default.voiddisableSensitiveDiagnosticsByLoggerName(String loggerName) Sensitive diagnostics is disabled by default.voiddisableSensitiveDiagnosticsByTenantName(String tenantName) Sensitive diagnostics is disabled by default.voidDump the diagnostics of first failure to the target handler.voiddumpDiagnoseFirstFailureWhenFutureExceptionContains(String commaSeparatedKeywords) Dump the diagnostics of first failure when the future exception, if any, contains any one of the keywords given.voidDiagnose First Failure is enabled by default.voidenableDiagnoseFirstFailureByConnectionIdPrefix(String connectionIdPrefix) Diagnose First Failure is enabled by default.voidenableDiagnoseFirstFailureByLoggerName(String loggerName) Diagnose First Failure is enabled by default.voidenableDiagnoseFirstFailureByTenantName(String tenantName) Diagnose First Failure is enabled by default.voidLogging is disabled by default.voidenableLoggingByConnectionIdPrefix(String connectionIdPrefix) Logging is disabled by default.voidenableLoggingByLoggerName(String loggerName) Logging is disabled by default.voidenableLoggingByTenantName(String tenantName) Logging is disabled by default.voidIf enabled, the JDBC driver collects metrics of events.voidSensitive diagnostics is disabled by default.voidenableSensitiveDiagnosticsByConnectionIdPrefix(String connectionIdPrefix) Sensitive diagnostics is disabled by default.voidenableSensitiveDiagnosticsByLoggerName(String loggerName) Sensitive diagnostics is disabled by default.voidenableSensitiveDiagnosticsByTenantName(String tenantName) Sensitive diagnostics is disabled by default.voidWrite logs to in-memory diagnostic buffer.booleanAll Oracle JDBC logging code is controlled by this boolean attribute.booleanAll metrics of events captured by the JDBC driver is controlled by this boolean attribute.booleanBy default, logs are written to log handler.voidreadLoggingConfigFile(String configFile) Reinitialize the logging properties and reread the logging configuration from the given file, which should be in java.util.Properties format.voidremoveErrorCodeFromWatchList(String errorCode) Remove the given error code from the watch list.voidConfigure the watch list with the default error codes.Show the error codes being watched.Show the keywords that were previously added by invoking operationdumpDiagnoseFirstFailureWhenFutureExceptionContains(String).Show the captured timing metrics.The most recent operations performed by the user on this MBean.voidupdateBufferSize(Integer bufferSize) Update the in-memory buffer size of Diagnose First Failure.voidupdateBufferSizeByConnectionIdPrefix(String connectionIdPrefix, Integer bufferSize) Update in-memory Diagnose First Failure buffer size by the given connection id prefix.voidupdateBufferSizeByLoggerName(String loggerName, Integer bufferSize) Update the in-memory buffer size of Diagnose First Failure by the given logger name.voidupdateBufferSizeByTenantName(String tenantName, Integer bufferSize) Update the in-memory buffer size of Diagnose First Failure by the given tenant name.voidupdateDiagnosticLevel(String level) Update the diagnostic level.voidupdateDiagnosticLevelByConnectionIdPrefix(String connectionIdPrefix, String level) Update the diagnostic level by the given connection id prefix.voidupdateDiagnosticLevelByLoggerName(String loggerName, String level) Update the diagnostic level by the given logger name.voidupdateDiagnosticLevelByTenantName(String tenantName, String level) Update the diagnostic level by the given tenant name.
-
Method Details
-
enableDiagnoseFirstFailureByConnectionIdPrefix
Diagnose First Failure is enabled by default. This operation enables Diagnose First Failure by the given connection id prefix, if it was disabled.- Parameters:
connectionIdPrefix-
-
disableDiagnoseFirstFailureByConnectionIdPrefix
Diagnose First Failure is enabled by default. This operation disables Diagnose First Failure by the given connection id prefix.- Parameters:
connectionIdPrefix-
-
enableDiagnoseFirstFailureByTenantName
Diagnose First Failure is enabled by default. This operation enables Diagnose First Failure by the given tenant name, if it was disabled.- Parameters:
tenantName-
-
disableDiagnoseFirstFailureByTenantName
Diagnose First Failure is enabled by default. This operation disables Diagnose First Failure by the given tenant name.- Parameters:
tenantName-
-
enableDiagnoseFirstFailureByLoggerName
Diagnose First Failure is enabled by default. This operation enables Diagnose First Failure by the given logger name, if it was disabled.- Parameters:
loggerName-
-
disableDiagnoseFirstFailureByLoggerName
Diagnose First Failure is enabled by default. This operation disables Diagnose First Failure by the given logger name.- Parameters:
loggerName-
-
enableDiagnoseFirstFailure
void enableDiagnoseFirstFailure()Diagnose First Failure is enabled by default. This operation enables Diagnose First Failure, if it was disabled. -
disableDiagnoseFirstFailure
void disableDiagnoseFirstFailure()Diagnose First Failure is enabled by default. This operation disables Diagnose First Failure. -
enableLoggingByConnectionIdPrefix
Logging is disabled by default. This operation enables logging by the given connection id prefix.- Parameters:
connectionIdPrefix-
-
disableLoggingByConnectionIdPrefix
Logging is disabled by default. This operation disables logging by the given connection id prefix if it was enabled.- Parameters:
connectionIdPrefix-
-
enableLoggingByTenantName
Logging is disabled by default. This operation enables logging by the given tenant name.- Parameters:
tenantName-
-
disableLoggingByTenantName
Logging is disabled by default. This operation disables logging by the given tenant name if it was enabled.- Parameters:
tenantName-
-
enableLoggingByLoggerName
Logging is disabled by default. This operation enables logging by the given logger name.- Parameters:
loggerName-
-
disableLoggingByLoggerName
Logging is disabled by default. This operation disables logging by the given logger name if it was enabled.- Parameters:
loggerName-
-
enableLogging
void enableLogging()Logging is disabled by default. This operation enables logging. -
disableLogging
void disableLogging()Logging is disabled by default. This operation disables logging if it was enabled. -
isLoggingEnabled
boolean isLoggingEnabled()All Oracle JDBC logging code is controlled by this boolean attribute. Default is false. If turned on, log messages will be controlled by java.util.logging Levels and Filters. If turned off, no log messages will be produced. -
enableSensitiveDiagnosticsByConnectionIdPrefix
Sensitive diagnostics is disabled by default. This operation enables sensitive diagnostics by the given connection id prefix.- Parameters:
connectionIdPrefix-
-
disableSensitiveDiagnosticsByConnectionIdPrefix
Sensitive diagnostics is disabled by default. This operation disables sensitive diagnostics by the given connection id prefix if it was enabled.- Parameters:
connectionIdPrefix-
-
enableSensitiveDiagnosticsByTenantName
Sensitive diagnostics is disabled by default. This operation enables sensitive diagnostics by the given tenant name.- Parameters:
tenantName-
-
disableSensitiveDiagnosticsByTenantName
Sensitive diagnostics is disabled by default. This operation disables sensitive diagnostics by the given tenant name if it was enabled.- Parameters:
tenantName-
-
enableSensitiveDiagnosticsByLoggerName
Sensitive diagnostics is disabled by default. This operation enables sensitive diagnostics by the given logger name.- Parameters:
loggerName-
-
disableSensitiveDiagnosticsByLoggerName
Sensitive diagnostics is disabled by default. This operation disables sensitive diagnostics by the given logger name if it was enabled.- Parameters:
loggerName-
-
enableSensitiveDiagnostics
void enableSensitiveDiagnostics()Sensitive diagnostics is disabled by default. This operation enables sensitive diagnostics. -
disableSensitiveDiagnostics
void disableSensitiveDiagnostics()Sensitive diagnostics is disabled by default. This operation disables sensitive diagnostics if it was enabled. -
updateDiagnosticLevelByConnectionIdPrefix
Update the diagnostic level by the given connection id prefix. The argument string may consist of either a level name or an integer value. For example: "SEVERE" "1000"- Parameters:
connectionIdPrefix-level-
-
updateDiagnosticLevelByTenantName
Update the diagnostic level by the given tenant name. The argument string may consist of either a level name or an integer value. For example: "SEVERE" "1000"- Parameters:
connectionIdPrefix-level-
-
updateDiagnosticLevelByLoggerName
Update the diagnostic level by the given logger name. The argument string may consist of either a level name or an integer value. For example: "SEVERE" "1000"- Parameters:
connectionIdPrefix-level-
-
updateDiagnosticLevel
Update the diagnostic level. The argument string may consist of either a level name or an integer value. For example: "SEVERE" "1000"- Parameters:
connectionIdPrefix-level-
-
updateBufferSizeByConnectionIdPrefix
Update in-memory Diagnose First Failure buffer size by the given connection id prefix.- Parameters:
connectionIdPrefix-bufferSize-
-
updateBufferSizeByTenantName
Update the in-memory buffer size of Diagnose First Failure by the given tenant name.- Parameters:
tenantName-bufferSize-
-
updateBufferSizeByLoggerName
Update the in-memory buffer size of Diagnose First Failure by the given logger name.- Parameters:
loggerName-bufferSize-
-
updateBufferSize
Update the in-memory buffer size of Diagnose First Failure.- Parameters:
bufferSize-
-
readLoggingConfigFile
Reinitialize the logging properties and reread the logging configuration from the given file, which should be in java.util.Properties format.- Parameters:
configFile-
-
addErrorCodeToWatchList
Add the error code to be watched for next occurrence in the format ORA-XXXXX. The JDBC driver writes the diagnostics of first failure in the configured log handler when an error in the watch list occurs.- Parameters:
errorCode- An error code in the format ORA-XXXXX.
-
removeErrorCodeFromWatchList
Remove the given error code from the watch list. The error code should be in the format ORA-XXXXX.- Parameters:
errorCode- An error code in the format ORA-XXXXX.
-
showErrorCodesWatchList
String showErrorCodesWatchList()Show the error codes being watched.- Returns:
- the set of error codes being watched are returned as String.
-
resetErrorCodeWatchList
void resetErrorCodeWatchList()Configure the watch list with the default error codes. To get the list of error codes being watched, invokeshowErrorCodesWatchList(). -
dumpDiagnoseFirstFailure
void dumpDiagnoseFirstFailure()Dump the diagnostics of first failure to the target handler. -
dumpDiagnoseFirstFailureWhenFutureExceptionContains
Dump the diagnostics of first failure when the future exception, if any, contains any one of the keywords given. The example keywords are "reset", "violation".- Parameters:
commaSeparatedKeywords- The keywords as comma separated values.
-
showExceptionKeywords
String showExceptionKeywords()Show the keywords that were previously added by invoking operationdumpDiagnoseFirstFailureWhenFutureExceptionContains(String).- Returns:
- the keywords
-
showRecentOperations
String showRecentOperations()The most recent operations performed by the user on this MBean.- Returns:
- description of operations
-
clearExceptionKeywords
void clearExceptionKeywords()Clear the keywords that were previously added by invoking operationdumpDiagnoseFirstFailureWhenFutureExceptionContains(String). -
enableWriteLogsToDiagnoseFirstFailure
Write logs to in-memory diagnostic buffer.- Parameters:
enabled-
-
isWriteLogsToDiagnoseFirstFailure
boolean isWriteLogsToDiagnoseFirstFailure()By default, logs are written to log handler. This operation can enable / disable logs writes to in-memory diagnostic buffer. -
enableMetrics
void enableMetrics()If enabled, the JDBC driver collects metrics of events. E.g., metrics of events occur during establishing a connection to the database. -
disableMetrics
void disableMetrics()If disabled, the JDBC driver does not collect metrics of events. -
showMetrics
String showMetrics()Show the captured timing metrics. Capturing metrics is disabled by default. To enable, callenableMetrics().- Returns:
- the captured metrics report
-
clearMetrics
void clearMetrics()Clear the metrics of events captured by the JDBC driver during establishing a connection to database. -
isMetricsEnabled
boolean isMetricsEnabled()All metrics of events captured by the JDBC driver is controlled by this boolean attribute. Default is false. If enabled, the metrics of events are captured by the driver until disabled.
-