Hi Halm, Actually the deployment in our environment is exactly the same as yours, especially our production environment can stay awake for several weeks, with more than 8 hours idle at the night time.
I am sure that we did not have anything special set on MySQL side, since I do face problems of 8 hours in the development of Java Persistence applications. I will check why this works, and let you know if I know the answer. Here provides the environment that we are using. Environment: Fedora Core 2 MySQL 5.0.27-max-log Apache Tomcat 5.5.20 (commons-dbcp-1.2.1) MySQL Connector 3.1.1 CAS Server 3.0.6 Regards, Harry Message: 5 > Date: Mon, 01 Oct 2007 11:21:41 +0200 > From: Halm Reusser <[EMAIL PROTECTED]> > Subject: Re: mysql as datasource and closed idle connections > To: Yale CAS mailing list <[email protected]> > Message-ID: <[EMAIL PROTECTED]> > Content-Type: text/plain; charset=ISO-8859-1 > > Dave, > > David Spencer wrote: > > This problem can be solved at the Connection Pool rather than in the > JDBC > > Driver. > you're absolutely right. I've configured my deployerConfigContext.xmllike: > > <bean id="dataSource" class=" > org.apache.commons.dbcp.BasicDataSource"> > <property name="driverClassName"> > <value>com.mysql.jdbc.Driver</value> > </property> > <property name="url"> > <value>jdbc:mysql://127.0.0.1/database_vho</value> > </property> > > <property name="validationQuery"> > <value>SELECT 1</value> > </property> > > <property name="testOnBorrow"> > <value>true</value> > </property> > </bean> > > The case, after restart of mysqld, is succesfully resolved, tomcat doesn't > throw any exception. And when i trace the log: > > $ tail -f /var/log/mysql/mysql.log > 6 Query SELECT 1 > 6 Query Select count('x') from view_cas Where login = 'abc' > And password = 'xyz' > > it's shown that first the validationQuery is executed and after that, the > authenticationQuery follows. > > So, tomorrow morning (overnight the CAS will be idle) i'll test my second > case, which throws the exception. > > But, i believe your solution is working... :) > > > So, thank you very much for your quick and perfect help. > > Halm Reusser > > > ------------------------------ > > -- My Weblog - http://blog.planner4u.org/ LinkedIn - http://www.linkedin.com/in/harryng
_______________________________________________ Yale CAS mailing list [email protected] http://tp.its.yale.edu/mailman/listinfo/cas
