# ConfigDB Properties
# This file configures JDBC connections to the configdb. The configdb holds data
# about where to find context specific data.
# The driver properties should be kept at their defaults.

# useSeperateWrite must be true for mysql master slave replication setups
# and false if not.
useSeparateWrite=false

# the read connection must point to the database slave
readDriverClass=com.mysql.jdbc.Driver
# readURL holds the database host and the used schema name
readUrl=jdbc:mysql://localhost/configdb
# username for the database user 
readProperty.1=user=openexchange
# password for the database user
readProperty.2=password=secret
# The driver properties should be kept at their defaults.
readProperty.3=useUnicode=true
readProperty.4=characterEncoding=UTF-8
readProperty.5=autoReconnect=true
readProperty.6=useServerPrepStmts=false
readProperty.7=useTimezone=true
readProperty.8=serverTimezone=UTC
readProperty.9=connectTimeout=15000
readProperty.10=socketTimeout=15000

# the write connection must point to the database master
writeDriverClass=com.mysql.jdbc.Driver
# writeURL holds the database host and the used schema name
writeUrl=jdbc:mysql://localhost/configdb
# username for the database user
writeProperty.1=user=openexchange
# password for the database user
writeProperty.2=password=secret
# The driver properties should be kept at their defaults
writeProperty.3=useUnicode=true
writeProperty.4=characterEncoding=UTF-8
writeProperty.5=autoReconnect=true
writeProperty.6=useServerPrepStmts=false
writeProperty.7=useTimezone=true
writeProperty.8=serverTimezone=UTC
writeProperty.9=connectTimeout=15000
writeProperty.10=socketTimeout=15000

# Timeinterval of cleaner thread in milliseconds. This thread removes idle timed
# out database connections and removes not used database connection pools.
# after each cleanerInterval.
cleanerInterval=10000

# Number of connections to keep open although they aren't used.
# This value is overwritten for OX databases from configdb. Sould be 0 so that
# no unnecessary connection are kept in the memory.
minIdle=0

# Number of maximum idle connections. More connections aren't pooled and closed.
# -1 stands for unlimited.
maxIdle=-1

# Maximum time in milliseconds a connection can be idle. If this time is 
# exceeded, the connection gets closed.
maxIdleTime=60000

# If exhaustedAction is set to BLOCK, not more than maxActive connections
# will be opened to the mysql database.
# This value is overwritten for OX databases from configdb.
maxActive=100

# If exhaustedAction is set to BLOCK, a thread will not wait for more than 
# maxWait milliseconds.
maxWait=10000

# Maximum time in milliseconds a connection will be used. After this time
# the connection get closed.
maxLifeTime=600000

# BLOCK: If maxActive number of connections is reached threads have to wait for a connection.
# FAIL: If maxActive number of connections is reached an exception is thrown.
# GROW: Open more connections even if maxActive is already reached.
# This value is overwritten for OX databases from configdb.
exhaustedAction=BLOCK

# Validate connections if they are activated. This is not necessary because the
# activation already includes a check if the connection isn't closed.
testOnActivate=false

# Check if connections can be reused after they are returned to the pool. 
testOnDeactivate=true

# Not useful for connections.
testOnIdle=false

# if testThreads is set to true, more information is logged to the Open-Xchange
# log files about database connections.  If this option is enabled the
# performance may degrade dramatically. The JVM has to generate then a lot of
# method call stack dumps.
testThreads=false

# Force use of write connections
# Must be true in Admin Daemon configuration!
writeOnly=false
