This section describes the possible ways to debug the functionality of Governance Registry. By debug we mean any possible way that can be used to identify the behavior or flow of an operation in Governance Registry. Given below are the debugging methods of Governance Registry.
Start the server with debug port Enabled
Just like any other Carbon server Governance Registry can also be started enabling a port to debug. This would allow any functionality of the server to be debug remotely against the source. User can start the server with debug mode enabled as given below.
In the given above example the defined debugging port is 5005. The server would hold the start up till the port is being listened to debug remotely. Any advanced integrated development environment like
Netbeans can be used to listen to this port and remotely debug against the source of the server.
Handler Simulator can be used to identify handlers which get invoked for a selected registry operation. And also it illustrates the order in which the handlers get invoked. This is a good debugging option for users since they can identify what are the extended implementations for a given registry operation. Please refer Simulating Handlers for further information.
Monitoring log files is another possible way to debug registry. You might find logs for Database Query Execution Statistics very useful. Please refer System Logs section to learn how to view the logs of a server.
log4jdbc is a Java JDBC driver that can log SQL and JDBC calls (and optionally SQL timing information) for other JDBC drivers using the Simple Logging Facade For Java (SLF4J) logging system. This can be used to help debug JDBC operations on Governance Registry.
To configure log4jdbc in Governance Registry:
- Include the 'log4jdbc:' string to the database URL (e.g.:
- Change the driver class name to
net.sf.log4jdbc.DriverSpy(this automatically loads the respective JDBC driver from the classpath).
In addition to this, it is necessary to specify the logging configurations in the log4j.properties file. For more information, see Logging.