• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Paul Clapham
  • Jeanne Boyarsky
  • Junilu Lacar
  • Henry Wong
  • Ron McLeod
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Frits Walraven
  • Tim Holloway
  • Carey Brown
  • Piet Souris
  • salvin francis
  • fred rosenberger

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

Posts: 26
Netbeans IDE Java
  • 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

author & internet detective
Posts: 39996
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.

Clowns were never meant to be THAT big! We must destroy it with this tiny ad:
Devious Experiments for a Truly Passive Greenhouse!
    Bookmark Topic Watch Topic
  • New Topic