Refactored persistence for AVM. I'm guessing because I dropped a number of

unnecessary flushes seems about 20% snappier.


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/BRANCHES/WCM-DEV2/root@3296 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Britt Park
2006-07-11 09:32:13 +00:00
parent a58a3c4f53
commit d0b5b14af1
46 changed files with 2172 additions and 506 deletions

View File

@@ -5,6 +5,7 @@ package org.alfresco.repo.avm.hibernate;
import java.sql.SQLException;
import org.alfresco.repo.avm.RetryingTransactionCallback;
import org.hibernate.HibernateException;
import org.hibernate.Session;
import org.springframework.orm.hibernate3.HibernateCallback;
@@ -18,13 +19,13 @@ public class HibernateCallbackWrapper implements HibernateCallback
/**
* The HibernateTxnCallback to execute.
*/
private HibernateTxnCallback fCallback;
private RetryingTransactionCallback fCallback;
/**
* Make one up.
* @param callback
*/
public HibernateCallbackWrapper(HibernateTxnCallback callback)
public HibernateCallbackWrapper(RetryingTransactionCallback callback)
{
fCallback = callback;
}
@@ -36,7 +37,7 @@ public class HibernateCallbackWrapper implements HibernateCallback
public Object doInHibernate(Session session) throws HibernateException,
SQLException
{
fCallback.perform(session);
fCallback.perform();
return null;
}
}