You want to be able to see all the sql-statements and DML-statements that your ADF application is executing.
JDeveloper & ADF : 220.127.116.11.0
OS: Windows 7
The most blogged solution is the one where you put on the jbo logging on the level of the jvm.
In this case you just add the following java option to the run configuration : -Djbo.debugoutput=console
While this will give you everything you need, you get a lot of clutter and it is difficult to see the information you are looking for.
Another solution would be to implement some java code in your base classes to show the necessary information. See the following blog for more information on it.
while this will give you only the information you really need, the code is depending on the de ADF BC framework directly and is not supported to work over different versions.
The solution I came across today, thanks to some forum discussions, is the use of the ADF Logger.
While you just run your application, no special run configuration or debug setting is needed, you can change the log level of the different ADF components. The change is immediate active, no rerun or stopping of the jvm is needed.
The trick is to find just the one you need.
In case you want to see the SQL and DML statements you need to set the oracle.jbo.common.ADFLoggerDiagnosticImpl to FINEST, anything lower will not show the statements.
How to set this logger level?
Follow this procedure to use the logger level:
Just run or debug your application.
In the Log-pane you should see your application starting up.
In this pane, there is an Action-menu. Choose here the "Oracle Diagnostic Logging"-option.
This will open a new tab, called "logging.xml".
Now walk through the tree until you find the oralce.jbo.common.ADFLoggerDiagnosticImpl
And then select in the Level column "Finest" or type "TRACE:32"
This change is active immediately
You should see appearing the SQL-statements in the Log pane when you are walking through your application.
While it still generates a lot of clutter, the advantage to activate it at the moment you need it, is really a big step forward.
When you stop and restart the JVM/WLS, just close this "logging.xml"-tab and restart the procedure as mentioned above.
A nice enhancement feature would be to have an option to only see the SQL- and DML-statements.