Skip to content

Instantly share code, notes, and snippets.

@fernandor777
Created June 14, 2023 16:40
Show Gist options
  • Save fernandor777/7d002cb35e799163246d58a2ed251d9e to your computer and use it in GitHub Desktop.
Save fernandor777/7d002cb35e799163246d58a2ed251d9e to your computer and use it in GitHub Desktop.
tomcat jdbc JNDI resource
<Resource
name="jdbc/postgres"
auth="Container"
type="javax.sql.DataSource"
driverClassName="org.postgresql.Driver"
url="jdbc:postgresql://postgres/mydb"
username="***********"
password="***********"
initialSize="5"
minActive="5"
maxActive="30"
maxIdle="10"
maxWait="2500"
testWhileIdle="true"
minEvictableIdleTimeMillis="300000"
timeBetweenEvictionRunsMillis="300000"
numTestsPerEvictionRun="5"
testOnBorrow="false"
removeAbandoned="true"
removeAbandonedTimeout="300"
logAbandoned="false"
maxOpenPreparedStatements="20"
validationQuery="SELECT 1"
/>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment