Default conf parameters for embedded db connection pool + docs
Project: http://git-wip-us.apache.org/repos/asf/syncope/repo Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/3088b033 Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/3088b033 Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/3088b033 Branch: refs/heads/master Commit: 3088b0335a7b6024b3fd84c12c2992d77ae6a0ef Parents: 0b96dfc Author: Francesco Chicchiriccò <ilgro...@apache.org> Authored: Fri May 26 10:26:43 2017 +0200 Committer: Francesco Chicchiriccò <ilgro...@apache.org> Committed: Fri May 26 10:26:53 2017 +0200 ---------------------------------------------------------------------- .../main/resources/domains/Master.properties | 5 ++- .../test/resources/domains/Master.properties | 5 ++- .../resources/mariadb/domains/Master.properties | 5 ++- .../resources/mysql/domains/Master.properties | 5 ++- .../resources/oracle/domains/Master.properties | 5 ++- .../postgres/domains/Master.properties | 5 ++- .../sqlserver/domains/Master.properties | 5 ++- .../systemadministration/dbcp.adoc | 39 ++++++++++++++++++++ .../systemadministration.adoc | 2 + 9 files changed, 69 insertions(+), 7 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/syncope/blob/3088b033/core/persistence-jpa/src/main/resources/domains/Master.properties ---------------------------------------------------------------------- diff --git a/core/persistence-jpa/src/main/resources/domains/Master.properties b/core/persistence-jpa/src/main/resources/domains/Master.properties index 385e4ea..02f01f5 100644 --- a/core/persistence-jpa/src/main/resources/domains/Master.properties +++ b/core/persistence-jpa/src/main/resources/domains/Master.properties @@ -22,6 +22,9 @@ Master.password=syncope Master.databasePlatform=org.apache.openjpa.jdbc.sql.PostgresDictionary Master.orm=META-INF/spring-orm.xml -# note: other connection pool settings can also be configured here, see MasterDomain.xml +Master.pool.initialSize=5 +Master.pool.maxActive=10 +Master.pool.maxIdle=5 +Master.pool.minIdle=5 Master.audit.sql=audit.sql http://git-wip-us.apache.org/repos/asf/syncope/blob/3088b033/core/persistence-jpa/src/test/resources/domains/Master.properties ---------------------------------------------------------------------- diff --git a/core/persistence-jpa/src/test/resources/domains/Master.properties b/core/persistence-jpa/src/test/resources/domains/Master.properties index a4f9aff..7bf3c40 100644 --- a/core/persistence-jpa/src/test/resources/domains/Master.properties +++ b/core/persistence-jpa/src/test/resources/domains/Master.properties @@ -22,6 +22,9 @@ Master.password= Master.databasePlatform=org.apache.openjpa.jdbc.sql.H2Dictionary Master.orm=META-INF/spring-orm.xml -# note: other connection pool settings can also be configured here, see MasterDomain.xml +Master.pool.initialSize=5 +Master.pool.maxActive=10 +Master.pool.maxIdle=5 +Master.pool.minIdle=5 Master.audit.sql=audit.sql http://git-wip-us.apache.org/repos/asf/syncope/blob/3088b033/fit/core-reference/src/main/resources/mariadb/domains/Master.properties ---------------------------------------------------------------------- diff --git a/fit/core-reference/src/main/resources/mariadb/domains/Master.properties b/fit/core-reference/src/main/resources/mariadb/domains/Master.properties index 16dc344..1853e47 100644 --- a/fit/core-reference/src/main/resources/mariadb/domains/Master.properties +++ b/fit/core-reference/src/main/resources/mariadb/domains/Master.properties @@ -22,6 +22,9 @@ Master.password=syncope Master.databasePlatform=org.apache.openjpa.jdbc.sql.MariaDBDictionary Master.orm=META-INF/spring-orm.xml -# note: other connection pool settings can also be configured here, see MasterDomain.xml +Master.pool.initialSize=5 +Master.pool.maxActive=10 +Master.pool.maxIdle=5 +Master.pool.minIdle=5 Master.audit.sql=audit.sql http://git-wip-us.apache.org/repos/asf/syncope/blob/3088b033/fit/core-reference/src/main/resources/mysql/domains/Master.properties ---------------------------------------------------------------------- diff --git a/fit/core-reference/src/main/resources/mysql/domains/Master.properties b/fit/core-reference/src/main/resources/mysql/domains/Master.properties index f104b1a..5939e34 100644 --- a/fit/core-reference/src/main/resources/mysql/domains/Master.properties +++ b/fit/core-reference/src/main/resources/mysql/domains/Master.properties @@ -22,6 +22,9 @@ Master.password=syncope Master.databasePlatform=org.apache.openjpa.jdbc.sql.MySQLDictionary(blobTypeName=LONGBLOB) Master.orm=META-INF/spring-orm.xml -# note: other connection pool settings can also be configured here, see MasterDomain.xml +Master.pool.initialSize=5 +Master.pool.maxActive=10 +Master.pool.maxIdle=5 +Master.pool.minIdle=5 Master.audit.sql=audit.sql http://git-wip-us.apache.org/repos/asf/syncope/blob/3088b033/fit/core-reference/src/main/resources/oracle/domains/Master.properties ---------------------------------------------------------------------- diff --git a/fit/core-reference/src/main/resources/oracle/domains/Master.properties b/fit/core-reference/src/main/resources/oracle/domains/Master.properties index db28b21..306de47 100644 --- a/fit/core-reference/src/main/resources/oracle/domains/Master.properties +++ b/fit/core-reference/src/main/resources/oracle/domains/Master.properties @@ -22,6 +22,9 @@ Master.password=syncope Master.databasePlatform=org.apache.openjpa.jdbc.sql.OracleDictionary Master.orm=META-INF/spring-orm-oracle.xml -# note: other connection pool settings can also be configured here, see MasterDomain.xml +Master.pool.initialSize=5 +Master.pool.maxActive=10 +Master.pool.maxIdle=5 +Master.pool.minIdle=5 Master.audit.sql=audit_oracle.sql http://git-wip-us.apache.org/repos/asf/syncope/blob/3088b033/fit/core-reference/src/main/resources/postgres/domains/Master.properties ---------------------------------------------------------------------- diff --git a/fit/core-reference/src/main/resources/postgres/domains/Master.properties b/fit/core-reference/src/main/resources/postgres/domains/Master.properties index 385e4ea..02f01f5 100644 --- a/fit/core-reference/src/main/resources/postgres/domains/Master.properties +++ b/fit/core-reference/src/main/resources/postgres/domains/Master.properties @@ -22,6 +22,9 @@ Master.password=syncope Master.databasePlatform=org.apache.openjpa.jdbc.sql.PostgresDictionary Master.orm=META-INF/spring-orm.xml -# note: other connection pool settings can also be configured here, see MasterDomain.xml +Master.pool.initialSize=5 +Master.pool.maxActive=10 +Master.pool.maxIdle=5 +Master.pool.minIdle=5 Master.audit.sql=audit.sql http://git-wip-us.apache.org/repos/asf/syncope/blob/3088b033/fit/core-reference/src/main/resources/sqlserver/domains/Master.properties ---------------------------------------------------------------------- diff --git a/fit/core-reference/src/main/resources/sqlserver/domains/Master.properties b/fit/core-reference/src/main/resources/sqlserver/domains/Master.properties index c7b3254..7d6e3ee 100644 --- a/fit/core-reference/src/main/resources/sqlserver/domains/Master.properties +++ b/fit/core-reference/src/main/resources/sqlserver/domains/Master.properties @@ -22,6 +22,9 @@ Master.password=syncope Master.databasePlatform=org.apache.openjpa.jdbc.sql.SQLServerDictionary Master.orm=META-INF/spring-orm-sqlserver.xml -# note: other connection pool settings can also be configured here, see MasterDomain.xml +Master.pool.initialSize=5 +Master.pool.maxActive=10 +Master.pool.maxIdle=5 +Master.pool.minIdle=5 Master.audit.sql=audit_sqlserver.sql http://git-wip-us.apache.org/repos/asf/syncope/blob/3088b033/src/main/asciidoc/reference-guide/workingwithapachesyncope/systemadministration/dbcp.adoc ---------------------------------------------------------------------- diff --git a/src/main/asciidoc/reference-guide/workingwithapachesyncope/systemadministration/dbcp.adoc b/src/main/asciidoc/reference-guide/workingwithapachesyncope/systemadministration/dbcp.adoc new file mode 100644 index 0000000..a5013f9 --- /dev/null +++ b/src/main/asciidoc/reference-guide/workingwithapachesyncope/systemadministration/dbcp.adoc @@ -0,0 +1,39 @@ +// +// 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://javaee.github.io/glassfish/doc/4.0/administration-guide.pdf[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^] \ No newline at end of file http://git-wip-us.apache.org/repos/asf/syncope/blob/3088b033/src/main/asciidoc/reference-guide/workingwithapachesyncope/systemadministration/systemadministration.adoc ---------------------------------------------------------------------- diff --git a/src/main/asciidoc/reference-guide/workingwithapachesyncope/systemadministration/systemadministration.adoc b/src/main/asciidoc/reference-guide/workingwithapachesyncope/systemadministration/systemadministration.adoc index 1e90d0f..2c12884 100644 --- a/src/main/asciidoc/reference-guide/workingwithapachesyncope/systemadministration/systemadministration.adoc +++ b/src/main/asciidoc/reference-guide/workingwithapachesyncope/systemadministration/systemadministration.adoc @@ -52,6 +52,8 @@ was generated, the configuration files will be first searched in include::dbms.adoc[] +include::dbcp.adoc[] + include::javaeecontainer.adoc[] include::highavailability.adoc[]