With:

<?xml version="1.0" encoding="UTF-8"?>
<tomee>
 
        <Resource id="myDBXAPooled" type="DataSource">
                XaDataSource myDBXA
                DataSourceCreator dbcp
                JtaManaged true
                UserName *****
                Password *********
                MaxWait 2000
                ValidationQuery SELECT 1
                InitialSize 4
                MaxActive 10
                MaxIdle 5
                LogAbandoned true
                RemoveAbandoned true
                RemoveAbandonedTimeout 20
        </Resource>

        <Resource id="myDBXA" type="XADataSource"
                class-name="com.mysql.jdbc.jdbc2.optional.MysqlXADataSource">
                Url jdbc:mysql://********:3306/*******
                User *****
                Password ***********
        </Resource>

</tomee>

If I don't use MaxIdle then number of connections used by the pool is
(MaxActive + 1) even if workload is increased.
If I use MaxIdle 5 the number of connections goes above MaxActive and keeps
growing.

I would expect the number of connections to never go above MaxActive and the
pool size to be shrinked down to MaxIdle when there is a low workload.

Do I do something wrong? Do I give a bad interpretation to "MaxActive" and
"MaxIdle"? Or is it an issue in the pool manager?

Thanks!



--
View this message in context: 
http://tomee-openejb.979440.n4.nabble.com/org-apache-openejb-resource-jdbc-dbcp-BasicManagedDataSource-allocating-more-than-MaxActive-connectis-tp4676508.html
Sent from the TomEE Users mailing list archive at Nabble.com.

Reply via email to