[ http://jira.jboss.com/jira/browse/JBAS-855?page=history ] Adrian Brock closed JBAS-855: -----------------------------
Resolution: Duplicate Issue This is not the correct way to do this. It should be done using the spec defined "reauthentication support" mechanism: http://jira.jboss.com/jira/browse/JBAS-1429 > Add support for JDBC pre-execute callback > ----------------------------------------- > > Key: JBAS-855 > URL: http://jira.jboss.com/jira/browse/JBAS-855 > Project: JBoss Application Server > Type: Feature Request > Components: JCA service > Versions: JBossAS-3.2.6 Final > Reporter: SourceForge User > Assignee: Scott M Stark > Attachments: jboss-connector-diffs.txt > > > SourceForge Submitter: jim_b_o . > 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. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa - If you want more information on JIRA, or have a bug to report see: http://www.atlassian.com/software/jira ------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click _______________________________________________ JBoss-Development mailing list JBoss-Development@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jboss-development