From b961289eb6559d614ec08eb38932e674d58621f9 Mon Sep 17 00:00:00 2001 From: erik Date: Sat, 22 Mar 2008 17:59:03 +0000 Subject: [PATCH] automatic schema update done by configuring the localsessionfactory for testing. --- .../test.org.wamblee.security.hibernate.properties | 5 +++++ .../resources/spring/test.org.wamblee.security.database.xml | 3 +++ support/src/main/java/org/wamblee/cache/EhCache.java | 4 +++- .../org/wamblee/persistence/hibernate/HibernateSupport.java | 2 +- 4 files changed, 12 insertions(+), 2 deletions(-) diff --git a/security/src/test/resources/properties/test.org.wamblee.security.hibernate.properties b/security/src/test/resources/properties/test.org.wamblee.security.hibernate.properties index 42491b2c..47a21e2a 100644 --- a/security/src/test/resources/properties/test.org.wamblee.security.hibernate.properties +++ b/security/src/test/resources/properties/test.org.wamblee.security.hibernate.properties @@ -9,6 +9,11 @@ hibernate.dialect=org.hibernate.dialect.MySQLInnoDBDialect ################################################################################### hibernate.show_sql=false +############################################################################## +# schema update for test +############################################################################## +hibernate.schemaupdate=true + ################################################################################### # hibernate cache provider ################################################################################### diff --git a/security/src/test/resources/spring/test.org.wamblee.security.database.xml b/security/src/test/resources/spring/test.org.wamblee.security.database.xml index af51a1e3..c9209053 100644 --- a/security/src/test/resources/spring/test.org.wamblee.security.database.xml +++ b/security/src/test/resources/spring/test.org.wamblee.security.database.xml @@ -17,6 +17,9 @@ ${hibernate.cache.use_query_cache} + + ${hibernate.schemaupdate} + diff --git a/support/src/main/java/org/wamblee/cache/EhCache.java b/support/src/main/java/org/wamblee/cache/EhCache.java index 0dcb2b7a..ffbbab4b 100644 --- a/support/src/main/java/org/wamblee/cache/EhCache.java +++ b/support/src/main/java/org/wamblee/cache/EhCache.java @@ -24,6 +24,8 @@ import net.sf.ehcache.Cache; import net.sf.ehcache.CacheException; import net.sf.ehcache.CacheManager; import net.sf.ehcache.Element; +import net.sf.ehcache.config.Configuration; +import net.sf.ehcache.config.ConfigurationFactory; import org.apache.log4j.Logger; import org.wamblee.io.InputResource; @@ -61,7 +63,7 @@ public class EhCache