tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bradley Wagner <>
Subject DBCP params different for the Tomcat DBCP implementation in Tomcat 8?
Date Wed, 07 Oct 2015 18:36:32 GMT

We recently upgraded to Tomcat 8. As per the Migration Guide: and
DBCP documentation,
we switched to using the new param values like: maxTotal and maxWaitMillis.

Then, we switched to using the Tomcat DBCP by adding
factory="org.apache.tomcat.jdbc.pool.DataSourceFactory". Tomcat did not
seem to have a problem with using Tomcat DBCP with the updated param names.

Then, I modified a test we were running to also use  a Spring initialized,
Tomcat DBCP DataSource:

<bean id="dataSource" class="org.apache.tomcat.jdbc.pool.DataSource"

Now, our test is complaining with: "Bean property 'maxWaitMillis' is not
writable or has an invalid setter method." because we were using the new
style param name:

<property name="maxWaitMillis" value="5000"/>

So now I'm confused.

1. Does Tomcat DBCP (in Tomcat 8) indeed use different params than the new
DBCP2 that ships with Tomcat 8?
2. Why did Tomcat not complain when I was using maxWaitMillis with the
updated factory="org.apache.tomcat.jdbc.pool.DataSourceFactory" but does
complain when I try to instantiate that pool implementation's DataSource
3. Is there some other way that I should be instantiating the Tomcat DBCP
DataSource in my test that would be more appropriate?

I searched the archives and couldn't find mention of this.


Bradley Wagner
VP Engineering, Hannon Hill | Twitter <> | Github

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message