Fixed fallout from Hibernate upgrade.

- VersionCounter DAO was using unsupported getHibernateTemplate.save() method


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@2442 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Derek Hulley
2006-02-18 11:40:14 +00:00
parent 42a2cd165a
commit b3c0377af7
2 changed files with 2 additions and 9 deletions

View File

@@ -37,16 +37,13 @@ import org.alfresco.service.cmr.action.Action;
import org.alfresco.service.cmr.action.ActionCondition; import org.alfresco.service.cmr.action.ActionCondition;
import org.alfresco.service.cmr.action.ActionConditionDefinition; import org.alfresco.service.cmr.action.ActionConditionDefinition;
import org.alfresco.service.cmr.action.ActionDefinition; import org.alfresco.service.cmr.action.ActionDefinition;
import org.alfresco.service.cmr.action.ActionService;
import org.alfresco.service.cmr.action.CompositeAction; import org.alfresco.service.cmr.action.CompositeAction;
import org.alfresco.service.cmr.repository.ContentData; import org.alfresco.service.cmr.repository.ContentData;
import org.alfresco.service.cmr.repository.NodeRef; import org.alfresco.service.cmr.repository.NodeRef;
import org.alfresco.service.cmr.repository.NodeService; import org.alfresco.service.cmr.repository.NodeService;
import org.alfresco.service.cmr.repository.StoreRef;
import org.alfresco.service.namespace.QName; import org.alfresco.service.namespace.QName;
import org.alfresco.service.transaction.TransactionService; import org.alfresco.service.transaction.TransactionService;
import org.alfresco.util.BaseAlfrescoSpringTest; import org.alfresco.util.BaseAlfrescoSpringTest;
import org.alfresco.util.BaseSpringTest;
/** /**
* Action service test * Action service test

View File

@@ -16,8 +16,6 @@
*/ */
package org.alfresco.repo.version.common.counter.hibernate; package org.alfresco.repo.version.common.counter.hibernate;
import java.util.concurrent.locks.Lock;
import org.alfresco.repo.domain.StoreKey; import org.alfresco.repo.domain.StoreKey;
import org.alfresco.repo.domain.VersionCount; import org.alfresco.repo.domain.VersionCount;
import org.alfresco.repo.domain.hibernate.VersionCountImpl; import org.alfresco.repo.domain.hibernate.VersionCountImpl;
@@ -37,9 +35,6 @@ import org.springframework.orm.hibernate3.support.HibernateDaoSupport;
*/ */
public class HibernateVersionCounterDaoServiceImpl extends HibernateDaoSupport implements VersionCounterDaoService public class HibernateVersionCounterDaoServiceImpl extends HibernateDaoSupport implements VersionCounterDaoService
{ {
private Lock countReadLock;
private Lock countWriteLock;
/** /**
* Retrieves or creates a version counter * Retrieves or creates a version counter
* *
@@ -56,7 +51,8 @@ public class HibernateVersionCounterDaoServiceImpl extends HibernateDaoSupport i
{ {
// create a new one // create a new one
versionCounter = new VersionCountImpl(); versionCounter = new VersionCountImpl();
getHibernateTemplate().save(versionCounter, storeKey); versionCounter.setKey(storeKey);
getHibernateTemplate().save(versionCounter);
} }
return versionCounter; return versionCounter;
} }