"select 1 from dual" is the standard way to "ping" oracle for a valid connection. I would also recommend using Oracle's connection pool. It will do this in the background. We have several tomcat and struts applications running for weeks without problems. Even with Oracle going off line for maintenance.
I can supply and example struts configuration using Oracle's driver connection pool driver. Or check the archives for this mailing list, as I have posted it here. Search using my name or Oracle. Brad Rick Reumann <maillist@reuman To: "Struts Users Mailing List" <[EMAIL PROTECTED]> n.net> cc: david chan <[EMAIL PROTECTED]> Subject: Re: db connection pool question 21-01-03 07:19 Please respond to "Struts Users Mailing List" On Tuesday, January 21, 2003, 9:56:09 AM, david wrote: dc> Hi, I am using a connection pool from dc> org.apache.commons.dbcp.BasicDataSourceFactory and the driver is dc> oracle.jdbc.driver.OracleDriver. It works great until if the dc> server idle for a few days, then the connection object seems dc> broken with this error: ==== begin error mesg === dc> java.sql.SQLException: Io exception: Software caused connection dc> abort: socket wr ite error at I believe I had similar problems here as well but it usually only happened when the DBA would for some reason decide to kill connections that were open. I went with configuring the pooling with whatever comes packaged with Tomcat and configuring it in the server.xml making sure to add the extra overhead of performing a validation query <parameter> <name>validationQuery</name> <value>SELECT 'CRAP' FROM DUAL</value> </parameter> Not sure what app server you are running but maybe somewhere you can set up a similar parameter to make sure it is handing out a valid connection from the pool. I'm pretty clueless when it comes to this stuff and just followed some examples I saw. Until I added the above validationQuery I believe I got similar errors to what you experienced. -- Rick mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: < mailto:[EMAIL PROTECTED]> For additional commands, e-mail: < mailto:[EMAIL PROTECTED]> -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>