• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Fetch SQL Query(under execution) from application server (executing EJB 3 entity bean).

 
Akshay Sahu
Greenhorn
Posts: 26
Java Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello Readers !!

I was working on Composite Keys using @IdClass annotation.
And I was not in a position to find a particular record, even though I was providing the correct values for the composite keys.

So I was wondering like, is there any way in EJB 3 to audit, log or see the sql query being sent from the application server to the database server (like in hibernate 3.x).

If yes, then please provide a sample link for it (or) even sample code will work.

Thanking You,
Akshay Sahu

 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 35279
384
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Akshay,
This is going to depend on your JPA implementation. For example, open JPA has:
openjpa.Query: Messages about queries. Query strings and any parameter values, if applicable, will be logged to the TRACE level at execution time. Information about possible performance concerns will be logged to the INFO level.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic