avalon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Paulo Gaspar" <paulo.gas...@krankikom.de>
Subject RE: JdbcDataSource question
Date Thu, 10 Jan 2002 02:53:54 GMT
I do not remember THIS pool implementation (I have been playing with
several) but usually no exception is thrown.

What happens is that after the test is performed, if there was an
error the offending connection is closed.

If the test is performed by a background thread or when you return
the Connection to the pool, you will never notice it was closed,
except that the application will get slower (because all returned
connections are being closed and the same number will have to be
open again).


Only with Connection pools that perform the test before giving back
the Connection would you have some kind of exception thrown or the
app blocked, since it would be impossible to get any connection from
the pool. This last policy is not often used since it delays de
perceived speed of getting a connection from the pool.


So, probably your application is just getting slower.


Have fun,
Paulo Gaspar

http://www.krankikom.de
http://www.ruhronline.de


> -----Original Message-----
> From: Charles Yates [mailto:cyates@lanelib.stanford.edu]
> Sent: Wednesday, January 09, 2002 10:04 PM
> To: avalon-dev@jakarta.apache.org
> Subject: Re: JdbcDataSource question
>
>
> Thank you,
>     but still having the same problem.  My keep-alive statement does not
> seem to be being executed (I can put nonsense in there and no exception
> is thrown).  I'll attach my configuration file and a section of my
> servers log. I'm using the Excalibur 4.0 distribution.
>
> Charles
>
> ==================================================================
> <circ-conf>
>  <jdbc logger="jdbc">
>   <pool-controller min="2" max="4">
>    <keep-alive>SELECT 1 FROM DUAL</keep-alive>
>   </pool-controller>
>   <driver>oracle.jdbc.driver.OracleDriver</driver>
>   <dburl>jdbc:oracle:thin:@***.****.****:****:****</dburl>
>   <user>****</user>
>   <password>*****</password>
>  </jdbc>
>  <listener logger="listener">
>   <server-port>9999</server-port>
>   <stop-port>9998</stop-port>
>  </listener>
>  <source logger="source"/>
>  <response logger="response"/>
>  <worker logger="worker"/>
> </circ-conf>
> ======================================================================
> DEBUG   Jan 09 2002 11:43:01.229      jdbc: Retrieving a
> org.apache.avalon.excalibur.datasource.JdbcConnection from the pool
> ERROR   Jan 09 2002 11:43:01.230    source: java.sql.SQLException: Io
> exception: Broken pipe
> java.sql.SQLException: Io exception: Broken pipe
> 	at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:169)
> 	at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:211)
> 	at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:324)
> 	at
> oracle.jdbc.driver.OracleStatement.<init>(OracleStatement.java:445)
> 	at
> oracle.jdbc.driver.OracleConnection.privateCreateStatement(OracleC
> onnection.java:477)
> 	at
> oracle.jdbc.driver.OracleConnection.createStatement(OracleConnecti
> on.java:386)
> 	at
> org.apache.avalon.excalibur.datasource.JdbcConnection.createStatem
> ent(Unknown Source)
> 	at
> edu.stanford.medlane.circserver.DataSourceImpl.getBibID(DataSource
> Impl.java:156)
> 	at
> edu.stanford.medlane.circserver.DataSourceImpl.getStatus(DataSourc
> eImpl.java:65)
> 	at
> edu.stanford.medlane.circserver.WorkerThreadImpl.run(WorkerThreadI
> mpl.java:84)
> 	at java.lang.Thread.run(Thread.java:498)
> DEBUG   Jan 09 2002 11:43:01.236      jdbc: Returning a
> org.apache.avalon.excalibur.datasource.JdbcConnection to the pool
>
>
>
> --
> To unsubscribe, e-mail:
<mailto:avalon-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:avalon-dev-help@jakarta.apache.org>


--
To unsubscribe, e-mail:   <mailto:avalon-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:avalon-dev-help@jakarta.apache.org>


Mime
View raw message