Re: [dbcp] Contention for DriverManager when initializing multiple datasources WAS: Re: dbcp blocked on webapp startup

2008-07-01 Thread Adrian Woodhead
But if all the pools are initialised via Spring, and are all non-lazy then they should be initialised sequentially by the same spring initialisation thread, not in parallel. Spring initialisation is done via a servlet ContextListener, and that is guaranteed to be called single-threaded. But

Re: [dbcp] Contention for DriverManager when initializing multiple datasources WAS: Re: dbcp blocked on webapp startup

2008-07-01 Thread [EMAIL PROTECTED]
Adrian Woodhead schrieb: Simon - thanks for your feedback, what you said makes sense... The big question is: why are you running dbcp concurrently in two different threads? Two data sources within the same webapp (spring config) perhaps? Exactly. There are 3 actually - 2 postgres data

Re: [dbcp] Contention for DriverManager when initializing multiple datasources WAS: Re: dbcp blocked on webapp startup

2008-07-01 Thread Adrian Woodhead
Simon - thanks for your feedback, what you said makes sense... The big question is: why are you running dbcp concurrently in two different threads? Two data sources within the same webapp (spring config) perhaps? Exactly. There are 3 actually - 2 postgres databases and one mysql databa

Re: [dbcp] Contention for DriverManager when initializing multiple datasources WAS: Re: dbcp blocked on webapp startup

2008-07-01 Thread James Carman
On Tue, Jul 1, 2008 at 7:16 AM, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > The big question is: why are you running dbcp concurrently in two different > threads? Two data sources within the same webapp (spring config) perhaps? > Possibly dbcp should call DriverManager.getDrivers() internally

Re: [dbcp] Contention for DriverManager when initializing multiple datasources WAS: Re: dbcp blocked on webapp startup

2008-07-01 Thread [EMAIL PROTECTED]
Hmm..you appear to have two threads running dbcp simultaneously. The first thread is trying to initialise a postgresql driver and register it with DriverManager. The driver registration is being triggered from a static initialiser block on the postgresql driver class, so is executing from with

Re: [dbcp] Contention for DriverManager when initializing multiple datasources WAS: Re: dbcp blocked on webapp startup

2008-07-01 Thread Adrian Woodhead
After some discussion with Phil I changed my Spring config to load up my datasources on app context startup (by marking them lazy-init=false) instead of having them lazily loaded when the application has already started when it gets immediately hit by hundreds of requests. We thought that by re

[dbcp] Contention for DriverManager when initializing multiple datasources WAS: Re: dbcp blocked on webapp startup

2008-06-28 Thread Phil Steitz
Adrian Woodhead wrote: Hey there, I am experiencing some odd behaviour related to DBCP. We have an application that is deployed in Tomcat 6.0.16 on Linux with Java 6. It uses dbcp 1.2.2 (with commons pool 1.3) and we have a pooled datasource configured in spring which is in turn used by ibati