Configure a Tomcat datasource

asked 2014-12-03 07:25:03 -0600

Rodrigo gravatar image


I made a class to install Apache Tomcat 7.55 in my node, but I do not know how to configure a datasource in it.

The last step of my class is to deploy an application:

tomcat::war { 'my.war':
    catalina_base => '/opt/apache-tomcat/tomcat_7_0_55',
    war_source    => '/etc/puppet/resources/rmy.war',

After this step, I need to configure the following datasource in conf/server.xml file:

 <Context path="/my-app" docBase="my-app" debug="5" reloadable="true" crossContext="true">
                 <Resource name="jdbc/my-app-db" auth="Container" 
                          type="javax.sql.DataSource" maxActive="100" maxIdle="30" maxWait="5"
                          username="xxx" password="yyy"

How can I do this? I am using puppetlabs-tomcat module.


edit retag flag offensive close merge delete


Have you had any success with this? I'm looking for a way to do this, also.

felipe1982 gravatar imagefelipe1982 ( 2015-07-16 18:53:07 -0600 )edit