Skip to content

Instantly share code, notes, and snippets.

@amusarra
Created June 15, 2011 21:23
Show Gist options
  • Save amusarra/1028155 to your computer and use it in GitHub Desktop.
Save amusarra/1028155 to your computer and use it in GitHub Desktop.
Apache Tomcat 6.0 - JNDI Datasource
<?xml version="1.0" encoding="UTF-8"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<Context reloadable="true" crossContext="true">
<!-- maxActive: Maximum number of dB connections in pool. Make sure you
configure your mysqld max_connections large enough to handle
all of your db connections. Set to -1 for no limit.
-->
<!-- maxIdle: Maximum number of idle dB connections to retain in pool.
Set to -1 for no limit. See also the DBCP documentation on this
and the minEvictableIdleTimeMillis configuration parameter.
-->
<!-- maxWait: Maximum time to wait for a dB connection to become available
in ms, in this example 10 seconds. An Exception is thrown if
this timeout is exceeded. Set to -1 to wait indefinitely.
-->
<!-- username and password: PostgreSQL dB username and password for dB connections -->
<!-- driverClassName: Class name for the JDBC driver is
org.postgresql.Driver -->
<!-- url: The JDBC connection url for connecting to your PostgreSQL dB.
-->
<Resource name="jdbc/LiferayPool" auth="Container" type="javax.sql.DataSource"
maxActive="100" maxIdle="30" maxWait="10000"
username="liferay-1" password="liferay12345" driverClassName="org.postgresql.Driver"
url="jdbc:postgresql://liferay-portal-db-1.local:5432/liferay-1?charSet=UTF-8"/>
</Context>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment