Created
July 17, 2018 14:23
-
-
Save fmontes/a248e0aa344113ed6664aa48b648588e to your computer and use it in GitHub Desktop.
This file contains hidden or 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
<Context path="${catalina.home}/webapps/ROOT" docBase="${catalina.home}/webapps/ROOT" reloadable="false" crossContext="true"> | |
<JarScanner scanBootstrapClassPath="false" scanClassPath="false"> | |
<JarScanFilter tldSkip="*.jar" pluggabilitySkip="*.jar"/> | |
</JarScanner> | |
<Resources allowLinking="true" /> | |
<!-- | |
The class loader behaviour changed on recent tomcat versions, with the new default behaviour | |
we are unable to set a -javaagent and with that we won't be able to use instrumentation, setting the | |
delegate to true will restored the loader behaviour. | |
"Set to true if you want the class loader to follow the standard Java2 delegation model, | |
and attempt to load classes from parent class loaders before looking inside the web | |
application. | |
Set to false (the default) to have the class loader look inside the web application | |
first, before asking parent class loaders to find requested classes or resources." | |
-http://tomcat.apache.org/tomcat-7.0-doc/config/loader.html | |
--> | |
<Loader delegate="true"/><!--https://issues.apache.org/bugzilla/show_bug.cgi?id=55943#c13--> | |
<Resource name="mail/MailSession" auth="Container" type="javax.mail.Session" mail.smtp.host="localhost" /> | |
<!-- | |
IMPORTANT | |
maxActive = The maximum number of active connections that can be allocated from this pool at the same time. | |
Your number of server threads should be the sum of threads for every connector (http, https, AJP, etc) | |
in your server.xml file. | |
We recommend you set your number of connections to be your max server threads + 10 | |
abandonWhenPercentageFull = Connections that have been abandoned (timed out) wont get closed unless the | |
number of connections in use are above the percentage defined. | |
Documentation for Resource settings: https://tomcat.apache.org/tomcat-8.5-doc/jdbc-pool.html | |
--> | |
<!-- H2--> | |
<Resource name="jdbc/dotCMSPool" auth="Container" | |
factory="org.apache.tomcat.jdbc.pool.DataSourceFactory" | |
type="javax.sql.DataSource" | |
driverClassName="org.h2.Driver" | |
url="jdbc:h2:WEB-INF/H2_DATABASE/h2_dotcms_data;MVCC=TRUE;LOCK_TIMEOUT=15000" | |
username="sa" password="sa" maxActive="60" maxIdle="10" maxWait="60000" | |
removeAbandoned="true" removeAbandonedTimeout="60" logAbandoned="false" | |
timeBetweenEvictionRunsMillis="30000" validationQuery="SELECT 1" testOnBorrow="true" testWhileIdle="true" | |
abandonWhenPercentageFull="50"/> | |
<!-- POSTGRESQL | |
<Resource name="jdbc/dotCMSPool" auth="Container" | |
type="javax.sql.DataSource" | |
factory="org.apache.tomcat.jdbc.pool.DataSourceFactory" | |
driverClassName="org.postgresql.Driver" | |
url="jdbc:postgresql://localhost/dotcms" | |
username="{your db user}" password="{your db password}" maxActive="60" maxIdle="10" maxWait="60000" | |
removeAbandoned="true" removeAbandonedTimeout="60" logAbandoned="true" | |
timeBetweenEvictionRunsMillis="30000" validationQuery="SELECT 1" testOnBorrow="true" testWhileIdle="true" | |
abandonWhenPercentageFull="50"/> | |
--> | |
<!-- MYSQL UTF8 | |
<Resource name="jdbc/dotCMSPool" auth="Container" | |
factory="org.apache.tomcat.jdbc.pool.DataSourceFactory" | |
type="javax.sql.DataSource" driverClassName="com.mysql.jdbc.Driver" | |
url="jdbc:mysql://localhost/dotcms?characterEncoding=UTF-8&useLegacyDatetimeCode=false&serverTimezone=UTC" | |
username="{your db user}" password="{your db password}" maxActive="60" maxIdle="10" maxWait="60000" | |
removeAbandoned="true" removeAbandonedTimeout="60" logAbandoned="true" | |
timeBetweenEvictionRunsMillis="30000" validationQuery="SELECT 1" testOnBorrow="true" testWhileIdle="true" | |
abandonWhenPercentageFull="50"/> | |
--> | |
<!-- Oracle | |
<Resource name="jdbc/dotCMSPool" auth="Container" | |
factory="org.apache.tomcat.jdbc.pool.DataSourceFactory" | |
type="javax.sql.DataSource" driverClassName="oracle.jdbc.OracleDriver" | |
url="jdbc:oracle:thin:@localhost:1521:XE" | |
username="{your db user}" password="{your db password}" maxActive="60" maxIdle="10" maxWait="60000" | |
removeAbandoned="true" removeAbandonedTimeout="60" logAbandoned="true" | |
timeBetweenEvictionRunsMillis="30000" testOnBorrow="true" validationQuery="SELECT 1 from DUAL" testWhileIdle="true" | |
abandonWhenPercentageFull="50"/> | |
--> | |
<!-- MSSQL | |
<Resource name="jdbc/dotCMSPool" auth="Container" | |
factory="org.apache.tomcat.jdbc.pool.DataSourceFactory" | |
type="javax.sql.DataSource" driverClassName="com.microsoft.sqlserver.jdbc.SQLServerDriver" | |
url="jdbc:sqlserver://{your server}.database.windows.net:1433;databaseName={your DB name}" | |
username="{your user}@{your server}" password="{your password}" maxActive="60" maxIdle="10" maxWait="60000" | |
removeAbandoned="true" removeAbandonedTimeout="60" logAbandoned="true" | |
timeBetweenEvictionRunsMillis="30000" testOnBorrow="true" testWhileIdle="true" validationQuery="SELECT 1" defaultTransactionIsolation="READ_COMMITTED" | |
abandonWhenPercentageFull="50"/> | |
--> | |
</Context> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment