Postgresql Tomcat JNDI

context.xml

<ResourceLink global="jdbc/<database name>" name="jdbc/<database name>" type="javax.sql.DataSource"/>

server.xml


  <GlobalNamingResources>

  <Resource auth="Container" driverClassName="org.postgresql.Driver" maxActive="50" maxIdle="10" maxWait="-1" name="jdbc/<database name>" password="<password>" type="javax.sql.DataSource" url="jdbc:postgresql://localhost:5432/<database name>" username="<user name>" validationQuery="select 1"/>

  </GlobalNamingResources>

Yorum Gönder

Daha yeni Daha eski