Feature Requests item #884845, was opened at 2004-01-26 16:14 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=376688&aid=884845&group_id=22866
Category: JBossCX Group: v3.2 Status: Open Resolution: None Priority: 5 Submitted By: James Olsen (jim_b_o) Assigned to: Nobody/Anonymous (nobody) Summary: Add support for JDBC pre-execute callback Initial Comment: In order to pass the identity of the real user of a JDBC Connection to the database (as opposed to the pooled login identity) I need to call some proprietary JDBC API prior to Statements being executed. This is required for database auditing purposes. I need to make the calls at this time due to the behaviour of a third party persistence mechanism which obscures the underlying Connection usage. I have attached an example implementation which I based around the ValidConnectionChecker but is available at the Statement rather than Connection level. The attached code includes: - jboss-ds_1_0.dtd modified to include pre-execute- callback-class-name element. - ConnectionFactoryTemplate.xsl modified to include translation of above element. - local and xa ra.xml modified to include PreExecuteCallbackClassName config-property. - BaseWrapperManagedConnection.java, BaseWrapperManagedConnectionFactory.java, WrappedConnection.java, WrappedStatement.java all modified to support the new property, instantiate and call the PreExecuteCallback implementation. - new PreExecuteCallback.java as the callback interface. - new NullPreExecuteCallback.java as the null implementation. All changes to the above items have been bracketed by '## PreExecuteCallback Start ##' / '## PreExecuteCallback End##' comments. I've been lazy in the WrapperStatement and called the new preExecute() method from within setQueryTimeout() as that is in turn called by all execute...() methods. This implementation is working for me and I've tried to follow the pattern of the existing code as far as my understanding allows. Hope this is useful - it is for me. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=376688&aid=884845&group_id=22866 ------------------------------------------------------- The SF.Net email is sponsored by EclipseCon 2004 Premiere Conference on Open Tools Development and Integration See the breadth of Eclipse activity. February 3-5 in Anaheim, CA. http://www.eclipsecon.org/osdn _______________________________________________ JBoss-Development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development