-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: Getting SQL and Bind Variables before exception
PostPosted: Wed Jan 16, 2008 1:57 pm 
Newbie

Joined: Fri Mar 04, 2005 2:02 pm
Posts: 18
When an exception is thrown from the database or JDBC (SQLException) I need a way to dump the recent SQL(s) and bind variables.

We do this in an existing app (stored procedures) using an AOP aspect that wraps all stored proc calls in try/catch and if the catch is fired asks the stored procedure wrapper (Java) what SQL and Bind variables it would create given last method invocation

I'm pretty familiar with Hibernate but this gets deeper into the internals than I'm used to. Hibernate can log (debug) all SQL and bind variables but I can't run the app in debug mode in case I get an exception, this function needs to be reactive. Seems like AOP, Interceptors, and Events are all places for me to start looking, but I"m hoping someone with a deeper understanding of Hibernate internals could point me in the right direction.

Thanks!


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.