public Object invoke ( Object proxy , Method method , Object [ ] args ) throws Throwable { if ( ! haveStatementPropertiesChanged && VENDOR_PROPERTY_SETTERS . contains ( method . getName ( ) ) ) { haveStatementPropertiesChanged = true ; } // The SQLJ programming model indicates that getSection should be callable on a // closed PreparedStatement. Therefore we manually cache the section and return it if ( sqljSection != null && "getSection" . equals ( method . getName ( ) ) ) { return sqljSection ; } return super . invoke ( proxy , method , args ) ; }
Intercept the proxy handler to detect changes to statement properties that must be reset on cached statements .