Commits

timemachine  committed 27a30ee

Updated config examples with c3p0 pooling settings.

  • Participants
  • Parent commits 4a955b9
  • Branches 1.1.x

Comments (0)

Files changed (12)

File timemachine-hibernate/config/scheduler-mysql-create-schema.properties

 
 # Use MySQL for scheduler as data store
 timemachine.scheduler.dataStore.class = timemachine.scheduler.hibernate.HibernateDataStore
-timemachine.scheduler.dataStore.hibernateDataStore.hibernate.hbm2ddl.auto = create
+timemachine.scheduler.dataStore.hibernateDataStore.hibernate.hbm2ddl.auto = update
 
 timemachine.scheduler.dataStore.hibernateDataStore.hibernate.connection.driver_class = com.mysql.jdbc.Driver
 timemachine.scheduler.dataStore.hibernateDataStore.hibernate.connection.url = jdbc:mysql://localhost:3306/tmscheduler
 timemachine.scheduler.dataStore.hibernateDataStore.hibernate.connection.username = admin
 timemachine.scheduler.dataStore.hibernateDataStore.hibernate.connection.password = admin123
-timemachine.scheduler.dataStore.hibernateDataStore.hibernate.connection.pool_size = 5
 timemachine.scheduler.dataStore.hibernateDataStore.hibernate.dialect = org.hibernate.dialect.MySQLDialect
 timemachine.scheduler.dataStore.hibernateDataStore.hibernate.show_sql = false
+timemachine.scheduler.dataStore.hibernateDataStore.hibernate.connection.pool_size = 5

File timemachine-hibernate/config/scheduler-mysql-jobs.properties

 timemachine.scheduler.dataStore.hibernateDataStore.hibernate.connection.url = jdbc:mysql://localhost:3306/tmscheduler
 timemachine.scheduler.dataStore.hibernateDataStore.hibernate.connection.username = admin
 timemachine.scheduler.dataStore.hibernateDataStore.hibernate.connection.password = admin123
-timemachine.scheduler.dataStore.hibernateDataStore.hibernate.connection.pool_size = 5
 timemachine.scheduler.dataStore.hibernateDataStore.hibernate.dialect = org.hibernate.dialect.MySQLDialect
 timemachine.scheduler.dataStore.hibernateDataStore.hibernate.show_sql = false
+timemachine.scheduler.dataStore.hibernateDataStore.hibernate.connection.pool_size = 5
 
 # Load some sample jobs
 timemachine.scheduler.userservice.jobLoader.class = timemachine.scheduler.userservice.JobLoaderService

File timemachine-hibernate/config/scheduler-mysql-node1.properties

 timemachine.scheduler.dataStore.hibernateDataStore.hibernate.connection.url = jdbc:mysql://localhost:3306/tmscheduler
 timemachine.scheduler.dataStore.hibernateDataStore.hibernate.connection.username = admin
 timemachine.scheduler.dataStore.hibernateDataStore.hibernate.connection.password = admin123
-timemachine.scheduler.dataStore.hibernateDataStore.hibernate.connection.pool_size = 5
 timemachine.scheduler.dataStore.hibernateDataStore.hibernate.dialect = org.hibernate.dialect.MySQLDialect
 timemachine.scheduler.dataStore.hibernateDataStore.hibernate.show_sql = false
+timemachine.scheduler.dataStore.hibernateDataStore.hibernate.c3p0.min_size=1
+timemachine.scheduler.dataStore.hibernateDataStore.hibernate.c3p0.max_size=5
+timemachine.scheduler.dataStore.hibernateDataStore.hibernate.c3p0.preferredTestQuery=SELECT 1

File timemachine-hibernate/config/scheduler-mysql-node2.properties

 timemachine.scheduler.dataStore.hibernateDataStore.hibernate.connection.url = jdbc:mysql://localhost:3306/tmscheduler
 timemachine.scheduler.dataStore.hibernateDataStore.hibernate.connection.username = admin
 timemachine.scheduler.dataStore.hibernateDataStore.hibernate.connection.password = admin123
-timemachine.scheduler.dataStore.hibernateDataStore.hibernate.connection.pool_size = 5
 timemachine.scheduler.dataStore.hibernateDataStore.hibernate.dialect = org.hibernate.dialect.MySQLDialect
 timemachine.scheduler.dataStore.hibernateDataStore.hibernate.show_sql = false
+timemachine.scheduler.dataStore.hibernateDataStore.hibernate.c3p0.min_size=1
+timemachine.scheduler.dataStore.hibernateDataStore.hibernate.c3p0.max_size=5
+timemachine.scheduler.dataStore.hibernateDataStore.hibernate.c3p0.preferredTestQuery=SELECT 1

File timemachine-hibernate/config/scheduler-mysql-node3.properties

 timemachine.scheduler.dataStore.hibernateDataStore.hibernate.connection.url = jdbc:mysql://localhost:3306/tmscheduler
 timemachine.scheduler.dataStore.hibernateDataStore.hibernate.connection.username = admin
 timemachine.scheduler.dataStore.hibernateDataStore.hibernate.connection.password = admin123
-timemachine.scheduler.dataStore.hibernateDataStore.hibernate.connection.pool_size = 5
 timemachine.scheduler.dataStore.hibernateDataStore.hibernate.dialect = org.hibernate.dialect.MySQLDialect
 timemachine.scheduler.dataStore.hibernateDataStore.hibernate.show_sql = false
+timemachine.scheduler.dataStore.hibernateDataStore.hibernate.c3p0.min_size=1
+timemachine.scheduler.dataStore.hibernateDataStore.hibernate.c3p0.max_size=5
+timemachine.scheduler.dataStore.hibernateDataStore.hibernate.c3p0.preferredTestQuery=SELECT 1

File timemachine-hibernate/config/scheduler-mysql.properties

-# Copyright 2012 Zemian Deng
-# 
-# Licensed 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.
-
-timemachine.scheduler.schedulerName = TimeMachineScheduler
-timemachine.scheduler.nodeName = Node1
-
-# Use MySQL for scheduler as data store
-timemachine.scheduler.dataStore.class = timemachine.scheduler.hibernate.HibernateDataStore
-
-timemachine.scheduler.dataStore.hibernateDataStore.hibernate.connection.driver_class = com.mysql.jdbc.Driver
-timemachine.scheduler.dataStore.hibernateDataStore.hibernate.connection.url = jdbc:mysql://localhost:3306/tmscheduler
-timemachine.scheduler.dataStore.hibernateDataStore.hibernate.connection.username = admin
-timemachine.scheduler.dataStore.hibernateDataStore.hibernate.connection.password = admin123
-timemachine.scheduler.dataStore.hibernateDataStore.hibernate.connection.pool_size = 5
-timemachine.scheduler.dataStore.hibernateDataStore.hibernate.dialect = org.hibernate.dialect.MySQLDialect
-timemachine.scheduler.dataStore.hibernateDataStore.hibernate.show_sql = false

File timemachine-hibernate/config/scheduler-oracle-create-schema.properties

 timemachine.scheduler.dataStore.hibernateDataStore.hibernate.connection.url = jdbc:oracle:thin:@localhost:1521:XE
 timemachine.scheduler.dataStore.hibernateDataStore.hibernate.connection.username = admin
 timemachine.scheduler.dataStore.hibernateDataStore.hibernate.connection.password = admin123
-timemachine.scheduler.dataStore.hibernateDataStore.hibernate.connection.pool_size = 5
 timemachine.scheduler.dataStore.hibernateDataStore.hibernate.dialect = org.hibernate.dialect.Oracle10gDialect
 timemachine.scheduler.dataStore.hibernateDataStore.hibernate.show_sql = false
+timemachine.scheduler.dataStore.hibernateDataStore.hibernate.connection.pool_size = 5

File timemachine-hibernate/config/scheduler-oracle-jobs.properties

 timemachine.scheduler.dataStore.hibernateDataStore.hibernate.connection.url = jdbc:oracle:thin:@localhost:1521:XE
 timemachine.scheduler.dataStore.hibernateDataStore.hibernate.connection.username = admin
 timemachine.scheduler.dataStore.hibernateDataStore.hibernate.connection.password = admin123
-timemachine.scheduler.dataStore.hibernateDataStore.hibernate.connection.pool_size = 5
 timemachine.scheduler.dataStore.hibernateDataStore.hibernate.dialect = org.hibernate.dialect.Oracle10gDialect
 timemachine.scheduler.dataStore.hibernateDataStore.hibernate.show_sql = false
+timemachine.scheduler.dataStore.hibernateDataStore.hibernate.connection.pool_size = 5
 
 # Load some sample jobs
 timemachine.scheduler.userservice.jobLoader.class = timemachine.scheduler.userservice.JobLoaderService

File timemachine-hibernate/config/scheduler-oracle-node1.properties

 timemachine.scheduler.dataStore.hibernateDataStore.hibernate.connection.url = jdbc:oracle:thin:@localhost:1521:XE
 timemachine.scheduler.dataStore.hibernateDataStore.hibernate.connection.username = admin
 timemachine.scheduler.dataStore.hibernateDataStore.hibernate.connection.password = admin123
-timemachine.scheduler.dataStore.hibernateDataStore.hibernate.connection.pool_size = 5
 timemachine.scheduler.dataStore.hibernateDataStore.hibernate.dialect = org.hibernate.dialect.Oracle10gDialect
 timemachine.scheduler.dataStore.hibernateDataStore.hibernate.show_sql = false
+timemachine.scheduler.dataStore.hibernateDataStore.hibernate.c3p0.min_size=1
+timemachine.scheduler.dataStore.hibernateDataStore.hibernate.c3p0.max_size=5
+timemachine.scheduler.dataStore.hibernateDataStore.hibernate.c3p0.preferredTestQuery=SELECT 1

File timemachine-hibernate/config/scheduler-oracle-node2.properties

 timemachine.scheduler.dataStore.hibernateDataStore.hibernate.connection.url = jdbc:oracle:thin:@localhost:1521:XE
 timemachine.scheduler.dataStore.hibernateDataStore.hibernate.connection.username = admin
 timemachine.scheduler.dataStore.hibernateDataStore.hibernate.connection.password = admin123
-timemachine.scheduler.dataStore.hibernateDataStore.hibernate.connection.pool_size = 5
 timemachine.scheduler.dataStore.hibernateDataStore.hibernate.dialect = org.hibernate.dialect.Oracle10gDialect
 timemachine.scheduler.dataStore.hibernateDataStore.hibernate.show_sql = false
+timemachine.scheduler.dataStore.hibernateDataStore.hibernate.c3p0.min_size=1
+timemachine.scheduler.dataStore.hibernateDataStore.hibernate.c3p0.max_size=5
+timemachine.scheduler.dataStore.hibernateDataStore.hibernate.c3p0.preferredTestQuery=SELECT 1

File timemachine-hibernate/config/scheduler-oracle-node3.properties

 timemachine.scheduler.dataStore.hibernateDataStore.hibernate.connection.url = jdbc:oracle:thin:@localhost:1521:XE
 timemachine.scheduler.dataStore.hibernateDataStore.hibernate.connection.username = admin
 timemachine.scheduler.dataStore.hibernateDataStore.hibernate.connection.password = admin123
-timemachine.scheduler.dataStore.hibernateDataStore.hibernate.connection.pool_size = 5
 timemachine.scheduler.dataStore.hibernateDataStore.hibernate.dialect = org.hibernate.dialect.Oracle10gDialect
 timemachine.scheduler.dataStore.hibernateDataStore.hibernate.show_sql = false
+timemachine.scheduler.dataStore.hibernateDataStore.hibernate.c3p0.min_size=1
+timemachine.scheduler.dataStore.hibernateDataStore.hibernate.c3p0.max_size=5
+timemachine.scheduler.dataStore.hibernateDataStore.hibernate.c3p0.preferredTestQuery=SELECT 1

File timemachine-hibernate/src/main/resources/timemachine/scheduler/hibernate/default-hibernate.properties

 timemachine.scheduler.dataStore.hibernateDataStore.hibernate.connection.url = jdbc:h2:~/h2-tmscheduler;DB_CLOSE_ON_EXIT=FALSE
 timemachine.scheduler.dataStore.hibernateDataStore.hibernate.connection.username = admin
 timemachine.scheduler.dataStore.hibernateDataStore.hibernate.connection.password = admin123
-timemachine.scheduler.dataStore.hibernateDataStore.hibernate.connection.pool_size = 5
 timemachine.scheduler.dataStore.hibernateDataStore.hibernate.dialect = org.hibernate.dialect.H2Dialect
 timemachine.scheduler.dataStore.hibernateDataStore.hibernate.show_sql = false
 timemachine.scheduler.dataStore.hibernateDataStore.hibernate.current_session_context_class = thread
 timemachine.scheduler.dataStore.hibernateDataStore.hibernate.cache.provider_class = org.hibernate.cache.NoCacheProvider
+timemachine.scheduler.dataStore.hibernateDataStore.hibernate.connection.pool_size = 5