In an existing system whenever we encounter a database error we dump the affected SQL statement and the values of relevant bind parameters to a log file. This is extremely useful for debugging a production environment with many concurrent users, where we don't want to enable global SQL tracing. We would like to obtain the same behavior from Hibernate 2.1.4, e.g. attach the SQL statement string and bind parameter values to the HibernateException so it can be made visible in the log file. Has anyone managed to do this, or does this require code changes in Hibernate?
_________________ Felix Hack
felix_hack@splwg.com
|