A rename and a minor code rearrangement.

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/BRANCHES/WCM-DEV2/root@3333 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Britt Park
2006-07-18 00:58:23 +00:00
parent 60cdda3f13
commit fff2fb6b05
5 changed files with 16 additions and 16 deletions

View File

@@ -17,7 +17,6 @@
package org.alfresco.repo.avm.hibernate;
import java.util.Iterator;
import java.util.List;
import org.alfresco.repo.avm.AVMNode;

View File

@@ -37,9 +37,9 @@ import org.springframework.transaction.TransactionStatus;
* Helper for DAOs.
* @author britt
*/
public class HibernateTxn extends HibernateTemplate implements RetryingTransaction
public class HibernateRetryingTransaction extends HibernateTemplate implements RetryingTransaction
{
private static Logger fgLogger = Logger.getLogger(HibernateTxn.class);
private static Logger fgLogger = Logger.getLogger(HibernateRetryingTransaction.class);
/**
* The transaction manager.
*/
@@ -64,7 +64,7 @@ public class HibernateTxn extends HibernateTemplate implements RetryingTransacti
* Make one up.
* @param sessionFactory The SessionFactory.
*/
public HibernateTxn()
public HibernateRetryingTransaction()
{
fRandom = new Random();
}
@@ -82,15 +82,6 @@ public class HibernateTxn extends HibernateTemplate implements RetryingTransacti
status =
fTransactionManager.getTransaction(write ? fWriteDefinition : fReadDefinition);
execute(new HibernateCallbackWrapper(callback));
try
{
fTransactionManager.commit(status);
}
catch (TransactionException te)
{
throw new AVMException("Transaction Exception.", te);
}
return;
}
catch (Throwable t)
{
@@ -133,6 +124,15 @@ public class HibernateTxn extends HibernateTemplate implements RetryingTransacti
}
throw new AVMException("Unrecoverable error.", t);
}
try
{
fTransactionManager.commit(status);
}
catch (TransactionException te)
{
throw new AVMException("Transaction Exception.", te);
}
return;
}
}