<?xml version="1.0" encoding="UTF-8"?>
<Context>
    <!-- Default set of monitored resources -->
    <WatchedResource>WEB-INF/web.xml</WatchedResource>

    <!-- PLM DataSource JNDI Resource -->
    <!-- Using environment variables for database connection -->
    <Resource name="plm" auth="Container"
              type="javax.sql.DataSource" driverClassName="org.postgresql.Driver"
              url="${DB_URL}"
              username="${DB_USERNAME}" password="${DB_PASSWORD}"
              maxTotal="80" 
              maxIdle="30" 
              minIdle="5"
              initialSize="10"
              maxWaitMillis="5000"
              testOnBorrow="true"
              testOnReturn="true"
              testWhileIdle="true"
              validationQuery="SELECT 1"
              validationQueryTimeout="3"
              timeBetweenEvictionRunsMillis="15000"
              minEvictableIdleTimeMillis="30000"
              removeAbandonedOnBorrow="true"
              removeAbandonedOnMaintenance="true"
              removeAbandonedTimeout="30"
              logAbandoned="true"
              abandonedUsageTracking="true"
              defaultAutoCommit="true"
              rollbackOnReturn="true"/>

</Context> 