mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-24 17:32:48 +00:00
Just cleaning up some warnings.
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/BRANCHES/WCM-DEV2/root@3280 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -23,13 +23,9 @@ import org.alfresco.repo.avm.AVMException;
|
||||
import org.alfresco.repo.avm.AVMNotFoundException;
|
||||
import org.hibernate.HibernateException;
|
||||
import org.hibernate.JDBCException;
|
||||
import org.hibernate.ObjectNotFoundException;
|
||||
import org.hibernate.Session;
|
||||
import org.hibernate.SessionFactory;
|
||||
import org.hibernate.StaleStateException;
|
||||
import org.hibernate.Transaction;
|
||||
import org.hibernate.exception.GenericJDBCException;
|
||||
import org.hibernate.exception.LockAcquisitionException;
|
||||
import org.springframework.dao.DataRetrievalFailureException;
|
||||
import org.springframework.dao.DeadlockLoserDataAccessException;
|
||||
import org.springframework.dao.OptimisticLockingFailureException;
|
||||
@@ -103,38 +99,38 @@ public class HibernateTxn extends HibernateTemplate
|
||||
{
|
||||
// Do nothing.
|
||||
}
|
||||
// Translate the exception.
|
||||
if (t instanceof JDBCException)
|
||||
}
|
||||
// Translate the exception.
|
||||
if (t instanceof JDBCException)
|
||||
{
|
||||
t = convertJdbcAccessException((JDBCException)t);
|
||||
}
|
||||
else if (t instanceof HibernateException)
|
||||
{
|
||||
t = convertHibernateAccessException((HibernateException)t);
|
||||
}
|
||||
// If we've lost a race or we've deadlocked, retry.
|
||||
if (t instanceof DeadlockLoserDataAccessException)
|
||||
{
|
||||
try
|
||||
{
|
||||
t = convertJdbcAccessException((JDBCException)t);
|
||||
}
|
||||
else if (t instanceof HibernateException)
|
||||
{
|
||||
t = convertHibernateAccessException((HibernateException)t);
|
||||
}
|
||||
// If we've lost a race or we've deadlocked, retry.
|
||||
if (t instanceof DeadlockLoserDataAccessException)
|
||||
{
|
||||
try
|
||||
long interval;
|
||||
synchronized (fRandom)
|
||||
{
|
||||
long interval;
|
||||
synchronized (fRandom)
|
||||
{
|
||||
interval = fRandom.nextInt(1000);
|
||||
}
|
||||
Thread.sleep(interval);
|
||||
continue;
|
||||
}
|
||||
catch (InterruptedException ie)
|
||||
{
|
||||
// Do nothing.
|
||||
interval = fRandom.nextInt(1000);
|
||||
}
|
||||
Thread.sleep(interval);
|
||||
continue;
|
||||
}
|
||||
if (t instanceof OptimisticLockingFailureException)
|
||||
catch (InterruptedException ie)
|
||||
{
|
||||
continue;
|
||||
// Do nothing.
|
||||
}
|
||||
continue;
|
||||
}
|
||||
if (t instanceof OptimisticLockingFailureException)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
if (t instanceof AVMException)
|
||||
{
|
||||
|
Reference in New Issue
Block a user