Project

General

Profile

« Previous | Next » 

Revision 1690288d

Added by Andreas Kohlbecker about 8 years ago

following 'Simple advice on Connection testing' : testConnectionOnCheckout = true

View differences:

src/main/resources/c3p0.properties
1 1
#
2
# The CDM-Server intatiates the 3cp0 connection pools on behalf of the cdm-remote-webapp insances and passes 
3
# the the connection pool per JNDI to the webapps. Thus we need to repeat the configuration as defined in 
4
# cdmlib-persistence\src\main\resources\c3p0-config.xml
2
# The CDM-Server instantiates the 3cp0 connection pools on behalf of the cdm-remote-webapp instances and passes 
3
# the the connection pool per JNDI to the cdm-webapp instances. Thus we need to repeat the configuration as 
4
# defined in cdmlib-persistence\src\main\resources\c3p0-config.xml
5 5
#
6 6

  
7 7
## idleConnectionTestPeriod: 
8 8
#	 		if this is a number greater than 0, c3p0
9 9
#			will test all idle, pooled but unchecked-out connections, every this
10 10
#			number of seconds
11
c3p0.idleConnectionTestPeriod = 60
11
# c3p0.idleConnectionTestPeriod = 60
12 12

  
13
## automaticTestTable: 
13
c3p0.testConnectionOnCheckout = true
14

  
15
## automatichoweverTestTable: 
14 16
#			If provided, c3p0 will create an
15 17
#			empty table of the specified name, and use queries against that table
16 18
#			to test the Connection. If automaticTestTable is provided, c3p0 will
......
20 22
#			Connection.
21 23
c3p0.automaticTestTable = _c3p0ConnectionTest
22 24

  
23
# however one additinal setting is required
24
com.mchange.v2.c3p0.management.ManagementCoordinator=com.mchange.v2.c3p0.management.NullManagementCoordinator
25
# explicitly telling c3p0 to use the log4j logging library
26
# see http://www.mchange.com/projects/c3p0/#configuring_logging
27
com.mchange.v2.log.MLog = log4j
28

  
29
# if you do not want c3p0 to register MBeans with your JMX environment, you can suppress JMX support entirely
30
# for some reason this is required for the cdm-server:
31
c3p0.management.ManagementCoordinator=com.mchange.v2.c3p0.management.NullManagementCoordinator

Also available in: Unified diff