All,

I am copying in here what I have done to make this work in Ubuntu 16.04. I
would recommend do the reading in the links in this post before implementing
the following.

*#Move the JDBC driver to the tomcat container instead of the geoserver
application.*
sudo mv
/opt/apache-tomcat-7.0.73-1/webapps/geoserver/WEB-INF/lib/postgresql-9.4.1211.jar
/opt/apache-tomcat-7.0.73-1/lib/postgresql-9.4.1211.jar
sudo mv
/opt/apache-tomcat-7.0.73-2/webapps/geoserver/WEB-INF/lib/postgresql-9.4.1211.jar
/opt/apache-tomcat-7.0.73-2/lib/postgresql-9.4.1211.jar
sudo mv
/opt/apache-tomcat-7.0.73-3/webapps/geoserver/WEB-INF/lib/postgresql-9.4.1211.jar
/opt/apache-tomcat-7.0.73-3/lib/postgresql-9.4.1211.jar
sudo mv
/opt/apache-tomcat-7.0.73-4/webapps/geoserver/WEB-INF/lib/postgresql-9.4.1211.jar
/opt/apache-tomcat-7.0.73-4/lib/postgresql-9.4.1211.jar

*#Edit all the context.xml files for the different tomcat instances.*
sudo nano /opt/apache-tomcat-7.0.73-1/conf/context.xml
sudo nano /opt/apache-tomcat-7.0.73-2/conf/context.xml
sudo nano /opt/apache-tomcat-7.0.73-3/conf/context.xml
sudo nano /opt/apache-tomcat-7.0.73-4/conf/context.xml

*#Add the following lines in context.xml files which are edited.*
<Resource
    name="jdbc/resource_name" auth="Container" type="javax.sql.DataSource"
    driverClassName="org.postgresql.Driver"
    url="jdbc:postgresql://private_host_ip:5432/database_name"
    username="database_username"
    password="database_password"
    maxActive="20"
    maxIdle="10"
    maxWait="10000"
    minEvictableIdleTimeMillis="300000"
    timeBetweenEvictionRunsMillis="300000"
    validationQuery="SELECT 1"/>

*#Restart all tomcat instances*
sudo service tomcat-1 restart
sudo service tomcat-2 restart
sudo service tomcat-3 restart
sudo service tomcat-4 restart

Regards,
D.



--
View this message in context: 
http://osgeo-org.1560.x6.nabble.com/Database-pooling-for-clustered-Geoserver-configuration-tp5306937p5309251.html
Sent from the GeoServer - User mailing list archive at Nabble.com.

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Reply via email to