We are implementing an application hosted on a web application server. In production, many (thousands) of concurrent users will access the system. We have created systems in the past where we offered a per-request trace option. This is needed because dumping all SQL traces for all users can be expensive, and obscure what we want to see. By setting a trace checkbox in the browser in our application, the server knows that all SQL in the code path of a particular user request (e.g. thread) should be dumped, even if the default "global" settings would otherwise disable such tracing.
We want to implement similar functionality using Hibernate 2.1.4, but we seem to be stuck because SQL tracing appears to be handled statically, and not amenable to per-thread or per-session overrides. Has anyone else addressed this sort of requirement while using Hibernate? It would seem ideal if we could configure a hibernate session object to force SQL tracing.
_________________ Felix Hack
felix_hack@splwg.com
|