This site contains the documentation that is relevant to older WSO2 product versions and offerings.
For the latest WSO2 documentation, visit https://wso2.com/documentation/.
Debugging Governance Registry
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.
./wso2server.sh -debug 5005
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 IntelliJidea
, Eclipse
 or Netbeans
 can be used to listen to this port and remotely debug against the source of the server.Â
Handler SimulatorÂ
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.Â
System Logs
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
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.:
Â
 is changed toÂjdbc:oracle:thin:
@SERVER_NAME
:PORT/DB_NAME
jdbc:log4jdbc:oracle:thin:
@SERVER_NAME
:PORT/DB_NAME
). - 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.
Â