It's a problem of the connection pool. It keeps the connections, but after some time MySql disconnects the idle connections. You should use the connection-pool validationQuery attribute to specify a SQL query that is used to detect if a connection is still alive, as in the following example
<connection-pool maxActive="5" whenExhaustedAction="0" validationQuery="select count(*) from OJB_HL_SEQ" /> cheers, thomas > -----Original Message----- > From: Paul Worrall [mailto:[EMAIL PROTECTED] > Sent: Wednesday, June 04, 2003 9:59 AM > To: [EMAIL PROTECTED] > Subject: timeout after long period of idleness > > > Hi, > > I am using ojb-0.9.5 for persistence in a servlet application running > under Tomcat 4.1.12 on Java 1.4.0_1. The database is MySQL and I used > 3.23.51 without any problems but a recent upgrade to 4.0.12 has > introduced a problem where OJB seems to loose its > connections/ability to > connect after a long period of idleness. Long period is > between 5 to 8 > hours. > > Has anyone experience this problem? > > Kind regards, > > > Paul Worrall > Architect | Director > > Apcentric Limited > > The Soft Science of J2EE Deployment > > > m: +44 (0) 77 1133 0213 > w: www.apcentric.com <http://www.apcentric.com/> > > Any opinions expressed in the email are those of the > individual and not > necessarily of the company. This email and any files > transmitted with > it are confidential and solely for the use of the intended recipient. > It may contain material protected by attorney-client > privilege. If you > are not the intended recipient or person responsible for > delivering to > the intended recipient, be advised that you have received > this email in > error and that any use is strictly prohibited. If you have received > this email in error please notify the IT manager. > > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
