Fixed permissions patch. Split hibernate and cache configuration property files

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@2261 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Derek Hulley
2006-01-31 13:26:54 +00:00
parent 89abae6099
commit 6fa5688f5f
4 changed files with 10 additions and 8 deletions

View File

@@ -0,0 +1,4 @@
#
# The cache strategy
#
cache.strategy=read-write

View File

@@ -12,8 +12,3 @@ hibernate.cache.use_second_level_cache=true
hibernate.default_batch_fetch_size=1
hibernate.jdbc.batch_size=32
hibernate.connection.release_mode=auto
#
# The cache strategy
#
cache.strategy=read-write

View File

@@ -12,13 +12,13 @@
</property>
</bean>
<!-- load hibernate entity cache strategies -->
<bean id="hibernateConfigPlaceholderConfigurer" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
<bean id="cacheStrategiesPlaceholderConfigurer" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
<property name="ignoreUnresolvablePlaceholders">
<value>true</value>
</property>
<property name="locations">
<list>
<value>classpath:alfresco/domain/hibernate-cfg.properties</value>
<value>classpath:alfresco/domain/cache-strategies.properties</value>
</list>
</property>
</bean>

View File

@@ -103,6 +103,9 @@ public class PermissionDataPatch extends AbstractPatch
{
public Object doInHibernate(Session session)
{
// flush any outstanding entities
session.flush();
Query query = session.getNamedQuery(HibernateHelper.QUERY_UPDATE_PERM_ENTRY_TYPENAME);
query.setString("typeNameNew", TYPE_NAME_NEW)
.setString("typeNameOld", TYPE_NAME_OLD);