I am trying to configure a datasource with TomEE+ 7.0.1

this is my context.xml:

<Context path="/ReST">
<Resource name="jdbc/test1" auth="Container" type="javax.sql.DataSource" initialSize="4" maxActive="8" maxIdle="5" minIdle="3" maxWait="300" username="testuser" password="testpassword" driverClassName="org.postgresql.Driver"
            url="jdbc:postgresql://127.0.0.1:5432/testdb"
removeAbandoned="true" removeAbandonedTimeout="300" logAbandoned="true"
        />
</Context>


during startup I can see only these warnings in catalina.out:
---------------------------------------------
WARNING - Name = test1 Property maxActive is not used in DBCP2, use maxTotal instead. maxTotal default value is 8. You have set value of "8" for "maxActive" property, which is being ignored. WARNING - Name = test1 Property removeAbandoned is not used in DBCP2, use one or both of removeAbandonedOnBorrow or removeAbandonedOnMaintenance instead. Both have default value set to false. You have set value of "true" for "removeAbandoned" property, which is being ignored. WARNING - Name = test1 Property maxWait is not used in DBCP2 , use maxWaitMillis instead. maxWaitMillis default value is -1. You have set value of "300" for "maxWait" property, which is being ignored.
---------------------------------------------


Then I change my context.xml to:

<Context path="/ReST">
<Resource name="jdbc/test1" auth="Container" type="javax.sql.DataSource" initialSize="4" maxTotal="8" maxIdle="5" minIdle="3" maxWaitMillis="30000" username="testuser" password="testpassword" driverClassName="org.postgresql.Driver"
            url="jdbc:postgresql://127.0.0.1:5432/testdb"
removeAbandonedOnBorrow="true" removeAbandonedTimeout="300" logAbandoned="true"
        />
</Context>

but there are new warnings in catalina.out
---------------------------------------------
WARNING - unusedProperty maxTotal - ReST/jdbc/test1
WARNING - unusedProperty removeAbandonedOnBorrow - ReST/jdbc/test1
WARNING - unusedProperty maxWaitMillis - ReST/jdbc/test1
---------------------------------------------

What I am doing wrong? In $tomee/lib/ I can see dbcp and dbcp2 jars which one is used?


Thank you

Edoardo

Reply via email to