mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-24 17:32:48 +00:00
Added a leetle bit of logging in a few places.
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/BRANCHES/WCM-DEV2/root@3328 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -27,7 +27,6 @@ import org.alfresco.repo.avm.AVMNodeUnwrapper;
|
||||
import org.alfresco.repo.avm.DirectoryNode;
|
||||
import org.alfresco.repo.avm.Repository;
|
||||
import org.hibernate.Query;
|
||||
import org.hibernate.Session;
|
||||
import org.springframework.orm.hibernate3.support.HibernateDaoSupport;
|
||||
|
||||
/**
|
||||
|
@@ -23,6 +23,7 @@ import org.alfresco.repo.avm.AVMException;
|
||||
import org.alfresco.repo.avm.AVMNotFoundException;
|
||||
import org.alfresco.repo.avm.RetryingTransactionCallback;
|
||||
import org.alfresco.repo.avm.RetryingTransaction;
|
||||
import org.apache.log4j.Logger;
|
||||
import org.springframework.dao.DataRetrievalFailureException;
|
||||
import org.springframework.dao.DeadlockLoserDataAccessException;
|
||||
import org.springframework.dao.OptimisticLockingFailureException;
|
||||
@@ -38,6 +39,7 @@ import org.springframework.transaction.TransactionStatus;
|
||||
*/
|
||||
public class HibernateTxn extends HibernateTemplate implements RetryingTransaction
|
||||
{
|
||||
private static Logger fgLogger = Logger.getLogger(HibernateTxn.class);
|
||||
/**
|
||||
* The transaction manager.
|
||||
*/
|
||||
@@ -99,7 +101,7 @@ public class HibernateTxn extends HibernateTemplate implements RetryingTransacti
|
||||
// If we've lost a race or we've deadlocked, retry.
|
||||
if (t instanceof DeadlockLoserDataAccessException)
|
||||
{
|
||||
System.err.println("Deadlock.");
|
||||
fgLogger.info("Deadlock");
|
||||
try
|
||||
{
|
||||
long interval;
|
||||
@@ -117,7 +119,7 @@ public class HibernateTxn extends HibernateTemplate implements RetryingTransacti
|
||||
}
|
||||
if (t instanceof OptimisticLockingFailureException)
|
||||
{
|
||||
System.err.println("Lost Race.");
|
||||
fgLogger.info("Lost Race");
|
||||
continue;
|
||||
}
|
||||
if (t instanceof AVMException)
|
||||
|
Reference in New Issue
Block a user