• Post Reply Bookmark Topic Watch Topic
  • New Topic

SQL Logs For CMP  RSS feed

 
Sahil Sharma
Ranch Hand
Posts: 152
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I want to view SQL logs for all the records inserted or updated or deleted through Entity Beans(CMP) on my console. I am using Weblogic 8.1.
Is there any way to do this.
Thanks.
 
Tina Coleman
Ranch Hand
Posts: 150
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You may want to post this question to the BEA/WebLogic forum, but I'll take a stab at it.
WebLogic's server console has a Logging tab per server, and a JDBC sub-tab with settings for turning on logging, and specifying the logfile. CMP is still JDBC, at least in WebLogic at the moment, so this may do it.
 
Sahil Sharma
Ranch Hand
Posts: 152
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanx Tina,
I believe the logging facility provided by the BEA does not give the sql's.I think it tells bout the excpetions.
 
Vinod John
Ranch Hand
Posts: 162
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Why don't override the jdbc drivers statement (prepared statement) and trace the SQL in there.
 
Tina Coleman
Ranch Hand
Posts: 150
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
One more idea: Try P6Spy , which includes a logging tool that "is particularly useful for developers to monitor the SQL statements produced by EJB servers, enabling the developer to write code that achieves maximum efficiency on the server".
Ran across a mention of it whilst doing some investigation of Hibernation. No idea how well it works/doesn't work, but would be interested in hearing if it solves your problem.
 
Juan Rolando Prieur-Reza
Ranch Hand
Posts: 237
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Vinod John:
Why don't override the jdbc drivers statement (prepared statement) and trace the SQL in there.

Logging should be available through your Oracle or MS-Sql Server database.
But don't expect to see neat SQL source, just CRUD actions. - my humble opinion.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!