//
// 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.
//
==== Database Connection Pool

The <<persistence,internal storage>> is the central place where all data of a given <<Core>> deployment are located.

After choosing the appropriate <<DBMS>>, it is of fundamental importance to provide an adequate configuration for the
related database https://en.wikipedia.org/wiki/Connection_pool[connection pool^]. 

The database connection pool can be:

. Application-managed (default); based on http://brettwooldridge.github.io/HikariCP/[HikariCP^], the related
parameters can be tuned in the related <<domains,domain>> configuration file, e.g. `domains/Master.properties`,
for the Master domain.
. <<JavaEE Container>>-managed, via the JNDI resource matching the name specified for a given <<domains,domain>>, e.g.
`java:comp/env/jdbc/syncopeMasterDataSource` for the Master domain. +
Each JavaEE Container provides its own way to accomplish this task:
  * https://tomcat.apache.org/tomcat-8.0-doc/jdbc-pool.html[Apache Tomcat 8^]
  * https://tomcat.apache.org/tomcat-8.5-doc/jdbc-pool.html[Apache Tomcat 8.5^]
  * https://javaeesquad.github.io/tutorials/glassfishDatasource/glassFishDatasource.html[Glassfish 4.1^]
  * https://payara.gitbooks.io/payara-server/content/documentation/user-guides/connection-pools/connection-pools.html[Payara^]
  * https://docs.jboss.org/author/display/WFLY9/DataSource+configuration[Wildfly 9^]
  * https://docs.jboss.org/author/display/WFLY10/DataSource+configuration[Wildfly 10^]