mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-24 17:32:48 +00:00
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:
@@ -16,7 +16,6 @@
|
||||
*/
|
||||
package org.alfresco.repo.avm;
|
||||
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
|
@@ -17,7 +17,6 @@
|
||||
|
||||
package org.alfresco.repo.avm.hibernate;
|
||||
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
|
||||
import org.alfresco.repo.avm.AVMNode;
|
||||
|
@@ -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;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user