commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Cheng Xu <xucheng_...@yahoo.com.sg>
Subject Broken pipe despite validation query set
Date Mon, 02 Jun 2003 06:45:12 GMT
Hi All. I had a broken pipe problem with my Struts
application that is using DBCP. I have set my
validation query when creating the
oolableConnectionFactory, but it doesn't seems to
work.
The database is restarted everyday for backup
purpose.The application works fine for about 1 month
until last week I saw the first IOException: broken
pipe. 
Some facts:
Using tomcat 4.1.24, Struts 1.1beta2, Oracle 8.1.7
JDBC. Driver is oracle.jdbc.driver.OracleDriver. The
validation query used is "select sysdate from dual".
Code snip:
        try {
            Driver oracleDriver = new
oracle.jdbc.driver.OracleDriver();
           
DriverManager.registerDriver(oracleDriver);        
            
            // Create an object pool for Connections
            StackObjectPool connectionPool = new
StackObjectPool(maxIdleConnections, initConnections);
            
            // Create a keyed object pool for Prepared
Statements
            StackKeyedObjectPoolFactory
prepStmtPoolFactory = new
StackKeyedObjectPoolFactory(maxIdlePrepStmts,
initPrepStmts);
            
            DriverManagerConnectionFactory
connectionFactory = new
DriverManagerConnectionFactory(dburi, username,
password);
    
            PoolableConnectionFactory
poolableConnectionFactory = 
                new
PoolableConnectionFactory(connectionFactory,connectionPool,
prepStmtPoolFactory,"select sysdate from
dual",true,true);
                
            PoolingDriver poolingDriver = new
PoolingDriver();
           
poolingDriver.registerPool(DATASOURCE_NAME,connectionPool);
            
            log.trace("Pooling driver created and
registered");
Any idea why the validation query is not working?
Thanks.

__________________________________________________
Do You Yahoo!?
Send free SMS from your PC!
http://sg.sms.yahoo.com

Mime
View raw message