fix all Specimen test including new implementation for hibernate listeners
[cdmlib.git] / cdmlib-services / src / test / resources / unitils.properties
index 8e062793a94fea45d8197c1cdd7957bd32411629..b1bbedf93ceb50740036e25fabf73842c4e1d64f 100644 (file)
-unitils.modules=database,dbunit,hibernate,inject,spring\r
+#\r
+# NOTE: this is the unitils.properties file for the cdmlib-services module\r
+# a separate unitils.properties exists for cdmlib-io and for cdmlib-persistence\r
+#\r
+#\r
+# the list of all properties is found in\r
+# http://unitils.org/unitils-default.properties\r
+#\r
+\r
+### Unitils Modules ###\r
+# List of modules that is loaded. Overloading this list is normally not useful, unless you want to add a custom\r
+# module. Disabling a module can be performed by setting unitils.module.<modulename>.enabled to false.\r
+# If a module's specific dependencies are not found (e.g. hibernate is not in you classpath), this module is not loaded,\r
+# even if it is in this list and the enabled property is set to true. It's therefore not strictly necessary to disable\r
+# any of these modules.\r
+#DEFAULT: unitils.modules=database,dbunit,hibernate,mock,easymock,inject,spring,jpa\r
 unitils.module.easymock.enabled=false\r
+unitils.module.mock.enabled=false\r
+\r
+\r
+### Database ###\r
+#\r
+# Name or path of the user specific properties file. This file should contain the necessary parameters to connect to the\r
+# developer's own unit test schema. It is recommended to override the name of this file in the project specific properties\r
+# file, to include the name of the project. The system will try to find this file in the classpath, the user home folder\r
+# (recommended) or the local filesystem.\r
+unitils.configuration.localFileName=unitils-cdmlib-local.properties\r
+#\r
+updateDataBaseSchema.enabled=true\r
+#\r
+dataSetStructureGenerator.xsd.dirName=src/test/resources/eu/etaxonomy/cdm/service/\r
+#\r
+dbMaintainer.script.locations=src/test/resources/dbscripts\r
+dbMaintainer.dbVersionSource.autoCreateVersionTable=true\r
+dbMaintainer.autoCreateExecutedScriptsTable=true\r
+\r
+\r
+#\r
+# default database configurations for HSQL, H2 and MYSQL:\r
+#\r
 \r
-database.driverClassName=org.hsqldb.jdbcDriver\r
-database.url=jdbc:hsqldb:mem:cdm\r
+# HSQL #\r
+#\r
+#   NOTE: hsqldb v. <1.9 has a bug (http://sourceforge.net/tracker/?func=detail&atid=378131&aid=1407528&group_id=23316)\r
+#         due to which it is not possible to use batch updates, so we need to disable hibernate batching when using\r
+#         hsqldb in the app context:\r
+#\r
+#database.driverClassName=org.hsqldb.jdbcDriver\r
+#database.url=jdbc:hsqldb:mem:cdm\r
+##database.url=jdbc:hsqldb:file:/home/andreas/.hsqldb/cdm;hsqldb.default_table_type=cached\r
+#database.dialect=hsqldb\r
+#dbMaintainer.script.fileExtensions=hsqldb.ddl\r
+#database.userName=sa\r
+#database.password=\r
+#database.schemaNames=PUBLIC\r
+#org.dbunit.dataset.datatype.IDataTypeFactory.implClassName.hsqldb=org.dbunit.ext.hsqldb.HsqldbDataTypeFactory\r
+\r
+# H2 #\r
+#\r
+database.driverClassName=org.h2.Driver\r
+#database.driverClassName=com.p6spy.engine.spy.P6SpyDriver\r
+database.url=jdbc:h2:mem:cdm2\r
+#database.url=jdbc:h2:file:~/.h2/cdm\r
+database.dialect=h2\r
+dbMaintainer.script.fileExtensions=h2.sql\r
 database.userName=sa\r
 database.password=\r
-database.dialect=hsqldb\r
 database.schemaNames=PUBLIC\r
-org.dbunit.dataset.datatype.IDataTypeFactory.implClassName.hsqldb=eu.etaxonomy.cdm.test.integration.HsqldbDataTypeFactory\r
-dbMaintainer.fileScriptSource.scripts.locations=src/test/resources/dbscripts\r
+org.dbunit.dataset.datatype.IDataTypeFactory.implClassName.h2=org.dbunit.ext.h2.H2DataTypeFactory\r
+#org.dbunit.dataset.datatype.IDataTypeFactory.implClassName=org.dbunit.ext.h2.H2DataTypeFactory\r
+org.unitils.core.dbsupport.DbSupport.implClassName.h2=eu.etaxonomy.cdm.database.H2DbSupport\r
+database.storedIndentifierCase.h2=auto\r
+database.identifierQuoteString.h2=auto\r
 \r
-DatabaseModule.Transactional.value.default=commit\r
-transactionManager.type=spring\r
-updateDataBaseSchema.enabled=true\r
+#\r
+# MySQL #\r
+# cannot be used\r
+# 1. you need another ddl or sql file to generate the schema\r
+# 2. our DataSet xml files and the dataset.dtd contain upper-case table names like\r
+#    'TERMVOCABULARY_REPRESENTATION_AUD'  but hibernate expects CamelCase with mysql !!!!\r
+#    maybe we can workaround this by implementing a custom EJB3NamingStrategy like\r
+#    UppercaseTableNamingStrategy it must be set in the persitence.xml which returns table names\r
+#    always in uppercase, but this again causes problems with the @Tabel annotations which must\r
+#    exactly match the table names in the database. This means in order to use mysql for tests we would\r
+#    have to change the table names in all of our DataSet files.\r
+#\r
+#database.driverClassName=com.mysql.jdbc.Driver\r
+#database.url=jdbc:mysql://127.0.0.1:3306/test\r
+#database.userName=edit\r
+#database.password=wp5\r
+#database.dialect=mysql\r
+#database.schemaNames=test\r
+#dbMaintainer.script.fileExtensions=mysql.sql\r
+#org.dbmaintain.dbsupport.DbSupport.implClassName.mysql=org.dbmaintain.dbsupport.impl.MySqlDbSupport\r
+#org.dbunit.dataset.datatype.IDataTypeFactory.implClassName.mysqldb=org.dbunit.ext.mysql.MySqlDataTypeFactory\r
+\r
+\r
+#### Transaction mode ###\r
+#\r
+# If set to commit or rollback, each test is run in a transaction,\r
+# which is committed or rolled back after the test is finished.\r
+# Since we have many tests with incomplete data these tests would be\r
+# failing during commit so it is better use rollback as default\r
+# and set commit for individual test where necessary\r
+DatabaseModule.Transactional.value.default=rollback\r
+\r
+# org.unitils.database.transaction.impl.DefaultUnitilsTransactionManager is used by default:\r
+#\r
+#   Implements transactions for unit tests, by delegating to a spring PlatformTransactionManager.\r
+#   The concrete implementation of PlatformTransactionManager that is used depends on the test class.\r
+#   If a custom PlatformTransactionManager was configured in a spring ApplicationContext, this one is used.\r
+#   If not, a suitable subclass of PlatformTransactionManager is created, depending on the configuration\r
+#   of a test. E.g. if some ORM persistence unit was configured on the test, a PlatformTransactionManager\r
+#   that can offer transactional behavior for such a persistence unit is used.\r
+#   If no such configuration is found, a DataSourceTransactionManager is used.\r
+#\r
+# org.unitils.database.transaction.UnitilsTransactionManager.implClassName=org.unitils.database.transaction.impl.SpringTransactionManager\r
 \r
-dataSetStructureGenerator.xsd.dirName=src/test/resources/eu/etaxonomy/cdm/api/service/\r
-dbMaintainer.dbVersionSource.autoCreateVersionTable=true
\ No newline at end of file
+### Hibernate ###\r
+#\r
+HibernateModule.configuration.implClassName=org.hibernate.cfg.Configuration\r