From cdef918e07dfda249b5d8e03bea38dc1ca99f15d Mon Sep 17 00:00:00 2001 From: Britt Park Date: Thu, 6 Jul 2006 02:08:21 +0000 Subject: [PATCH] Hibernate parts of AVM now based on Spring PlatformTransactionManager abstraction. Configurations to match. git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/BRANCHES/WCM-DEV2/root@3286 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261 --- config/alfresco/avm-console-context.xml | 26 +++- config/alfresco/avm-console.properties | 4 +- config/alfresco/avm-test-context.xml | 48 +++++++ config/alfresco/avm-test.properties | 2 +- .../org/alfresco/repo/avm/AVMServiceImpl.java | 2 +- .../org/alfresco/repo/avm/OrphanReaper.java | 7 +- .../hibernate/HibernateCallbackWrapper.java | 42 +++++++ .../repo/avm/hibernate/HibernateTxn.java | 117 +++++++++--------- 8 files changed, 183 insertions(+), 65 deletions(-) create mode 100644 source/java/org/alfresco/repo/avm/hibernate/HibernateCallbackWrapper.java diff --git a/config/alfresco/avm-console-context.xml b/config/alfresco/avm-console-context.xml index 445dd4b357..0a43242607 100644 --- a/config/alfresco/avm-console-context.xml +++ b/config/alfresco/avm-console-context.xml @@ -14,7 +14,7 @@ - PROPAGATION_REQUIRES_NEW @@ -92,13 +92,33 @@ - - + + + + + + + + + + + + + + + + + + + + + diff --git a/config/alfresco/avm-console.properties b/config/alfresco/avm-console.properties index 30b1384f15..c12eccf301 100644 --- a/config/alfresco/avm-console.properties +++ b/config/alfresco/avm-console.properties @@ -12,6 +12,6 @@ hibernate.connection.isolation=2 hibernate.default_batch_fetch_size=16 hibernate.jdbc.batch_versioned_data=true hibernate.cache.use_second_level_cache=true -hibernate.hbm2ddl.auto=create +hibernate.hbm2ddl.auto=update # AVM specific properties. -avm.initialize=true +avm.initialize=false diff --git a/config/alfresco/avm-test-context.xml b/config/alfresco/avm-test-context.xml index 33c4a9bd40..c002253f84 100644 --- a/config/alfresco/avm-test-context.xml +++ b/config/alfresco/avm-test-context.xml @@ -63,12 +63,60 @@ + + + + + + + + + + + + + + + PROPAGATION_REQUIRES_NEW + + + ISOLATION_READ_COMMITTED + + + true + + + + + + + PROPAGATION_REQUIRES_NEW + + + ISOLATION_READ_COMMITTED + + + false + + + + + + + + + + +