Created
August 18, 2023 15:21
-
-
Save fvanderbiest/278163376791d7929ac0a2417a37f413 to your computer and use it in GitHub Desktop.
JNDI resource configuration for GeoServer
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0"?> | |
<!DOCTYPE Configure PUBLIC "-//Jetty//Configure//EN" "http://www.eclipse.org/jetty/configure.dtd"> | |
<Configure class="org.eclipse.jetty.webapp.WebAppContext"> | |
<New id="ds_geoserver" class="org.eclipse.jetty.plus.jndi.Resource"> | |
<Arg>jdbc/geoserver</Arg> | |
<Arg> | |
<New class="org.apache.commons.dbcp.BasicDataSource"> | |
<Set name="driverClassName">org.postgresql.Driver</Set> | |
<Set name="username">geoserver</Set> | |
<Set name="password">pass</Set> | |
<Set name="url">jdbc:postgresql://database/dbname</Set> | |
<Set name="validationQuery">SELECT 1</Set> | |
<Set name="maxWait">10000</Set> | |
<Set name="maxActive">100</Set> | |
<Set name="maxIdle">10</Set> | |
<Set name="accessToUnderlyingConnectionAllowed">true</Set> | |
</New> | |
</Arg> | |
</New> | |
</Configure> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Include the following in GeoServer's web.xml: | |
<resource-ref> | |
<description>Connection Pool</description> | |
<res-ref-name>jdbc/geoserver</res-ref-name> | |
<res-type>javax.sql.DataSource</res-type> | |
<res-auth>Container</res-auth> | |
</resource-ref> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment