that looks like what I was looking for. thanks a lot!
> -----Message d'origine----- > De : Woonsan Ko [mailto:[email protected]] > Envoyé : Monday, January 25, 2010 3:24 PM > À : Jetspeed Users List > Objet : Re: database connections > > Hi Linus, > > One possible solution is to configure "validationQuery" for the dbcp, > which will validate the pooled connection before using by default. > If you installed Jetspeed onto Tomcat, then you can find Jetspeed context > descriptor (e.g. $CATALINA_HOME/conf/Catalina/localhost/jetspeed.xml). > You can add "validationQuery" property with a value, "select 1 from dual", > in the "jdbc/jetspeed" resource configuration. > > Please refer the followings for details: > - http://tomcat.apache.org/tomcat-5.5-doc/jndi-resources-howto.html > - http://commons.apache.org/dbcp/configuration.html > > > Regards, > > Woonsan > > > > > ----- Original Message ---- > > From: Linus Kamb <[email protected]> > > To: [email protected] > > Sent: Mon, January 25, 2010 3:03:57 PM > > Subject: database connections > > > > Hi, > > > > > > > > I have recently had a couple of instances where the Jetspeed database > > connections appear to have been lost, either timed out from inactivity, > or > > there has been a network interruption, or not quite sure what. I > believe it > > is the timeout, but I'm not certain. In any case, over the weekend, > > catalina.out filled up with 145k SQLExceptions of: > > > > > > > > java.sql.SQLException: Io exception: Connection reset > > > > at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134) > > > > at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:179) > > > > at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:333) > > > > at > > > oracle.jdbc.driver.OracleConnection.setAutoCommit(OracleConnection.java:12 > 24 > > ) > > > > at > > > org.apache.commons.dbcp.DelegatingConnection.setAutoCommit(DelegatingConne > ct > > ion.java:331) > > > > at > > > org.apache.commons.dbcp.PoolingDataSource$PoolGuardConnectionWrapper.setAu > to > > Commit(PoolingDataSource.java:317) > > > > at > > > org.apache.jetspeed.statistics.impl.BatchedStatistics.flush(BatchedStatist > ic > > s.java:162) > > > > at > > > org.apache.jetspeed.statistics.impl.BatchedStatistics.checkAndDoFlush(Batc > he > > dStatistics.java:87) > > > > at > > > org.apache.jetspeed.statistics.impl.BatchedStatistics.run(BatchedStatistic > s. > > java:133) > > > > at java.lang.Thread.run(Thread.java:619) > > > > java.sql.SQLException: Io exception: Broken pipe > > > > at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134) > > > > at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:179) > > > > at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:333) > > > > at > > > oracle.jdbc.driver.OracleConnection.setAutoCommit(OracleConnection.java:12 > 24 > > ) > > > > at > > > org.apache.commons.dbcp.DelegatingConnection.setAutoCommit(DelegatingConne > ct > > ion.java:331) > > > > at > > > org.apache.commons.dbcp.PoolingDataSource$PoolGuardConnectionWrapper.setAu > to > > Commit(PoolingDataSource.java:317) > > > > at > > > org.apache.jetspeed.statistics.impl.BatchedStatistics.flush(BatchedStatist > ic > > s.java:162) > > > > at > > > org.apache.jetspeed.statistics.impl.BatchedStatistics.checkAndDoFlush(Batc > he > > dStatistics.java:87) > > > > at > > > org.apache.jetspeed.statistics.impl.BatchedStatistics.run(BatchedStatistic > s. > > java:133) > > > > at java.lang.Thread.run(Thread.java:619) > > > > java.sql.SQLException: Io exception: Broken pipe > > > > at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134) > > > > [.] > > > > > > > > Is the DataSource configured, or configurable, to check that the > connection > > is still valid before returning it? I know such a thing is, in general, > > possible for the Apache PoolingDataSource, but I don't see it in the > > Jetspeed configuration. > > > > > > > > I'm running Jetspeed 2.1.3 on Linux, talking to Oracle 10, and looking > in > > [JetspeedInstall]/database/database.properites > > > > > > > > The datasource.xml file (from both database/assembly. and > > webapps/Jetspeed/WEB-INF/assembly.) seems to be default configuration > using > > Spring JNDI. > > > > > > > > thanks, > > > > Linus > > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
