That worked for H2. For Oracle, however, I had to get more cleaver: Here is the string that worked:
BEGIN EXECUTE IMMEDIATE 'ALTER SESSION SET STATISTICS_LEVEL = ALL'; EXECUTE IMMEDIATE 'ALTER SESSION SET CURSOR_SHARING = EXACT'; DBMS_APPLICATION_INFO.SET_MODULE('ExampleCenter', NULL); EXECUTE IMMEDIATE 'ALTER SESSION SET NLS_SORT = BINARY_CI'; EXECUTE IMMEDIATE 'ALTER SESSION SET NLS_COMP = BINARY'; END; I haven't tried SQL Server, yet, but I don't think I have a requirement there. I don't really like the design of using the same method to run the connection initialization query (s/b queries) and the connection validation query in the same place. Also, I think the design should allow multiple DDL or DML statements be run the initialize the connection. -----Original Message----- From: Felix Schumacher [mailto:felix.schumac...@internetallee.de] Sent: Tuesday, July 22, 2014 11:07 PM To: Tomcat Users List Subject: Re: Tomcat JDBC Connection Pool initialization question On 23. Juli 2014 01:20:27 MESZ, Wes Clark <wcl...@guidewire.com> wrote: >I want to initialized a new connection being added to the pool with >more than one SQL statement. I cannot see how to override the existing >methods to do this. Has anyone done this, or have a suggestion for me? Have you tried to separate them with a semicolon? Something like "SELECT 1; SELECT 2" Regards Felix --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org