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:
@@ -35,8 +35,8 @@ public class AVMCrawlTest extends AVMServiceTestBase
|
||||
*/
|
||||
public void testCrawl()
|
||||
{
|
||||
int n = 8; // Number of Threads.
|
||||
int m = 16; // How many multiples of content to start with.
|
||||
int n = 2; // Number of Threads.
|
||||
int m = 4; // How many multiples of content to start with.
|
||||
long runTime = 1200000; // Ten minutes
|
||||
fService.purgeRepository("main");
|
||||
fReaper.setInactiveBaseSleep(60000);
|
||||
|
@@ -351,6 +351,10 @@ public class AVMNodeDescriptor
|
||||
return fID;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the file length if applicable.
|
||||
* @return The file length.
|
||||
*/
|
||||
public long getLength()
|
||||
{
|
||||
return fLength;
|
||||
|
@@ -23,7 +23,6 @@ import java.util.ArrayList;
|
||||
import java.util.Map;
|
||||
import java.util.TreeMap;
|
||||
|
||||
import org.hibernate.stat.Statistics;
|
||||
import org.springframework.context.support.FileSystemXmlApplicationContext;
|
||||
|
||||
import junit.framework.TestCase;
|
||||
|
@@ -63,8 +63,7 @@ public class AVMStressTest extends AVMServiceTestBase
|
||||
3200, // read file
|
||||
10, // snapshot
|
||||
1000, // # ops
|
||||
fService,
|
||||
"" + i);
|
||||
fService);
|
||||
tester.refresh();
|
||||
Thread thread = new Thread(tester);
|
||||
testers.add(tester);
|
||||
|
@@ -78,11 +78,6 @@ class AVMTester implements Runnable
|
||||
*/
|
||||
private String[] fNames;
|
||||
|
||||
/**
|
||||
* The id of this thread.
|
||||
*/
|
||||
private String fID;
|
||||
|
||||
/**
|
||||
* Flag for whether this thread errored out.
|
||||
*/
|
||||
@@ -117,12 +112,10 @@ class AVMTester implements Runnable
|
||||
int readFile,
|
||||
int snapshot,
|
||||
int opCount,
|
||||
AVMService service,
|
||||
String id)
|
||||
AVMService service)
|
||||
{
|
||||
fError = false;
|
||||
fExit = false;
|
||||
fID = id;
|
||||
fService = service;
|
||||
fOpCount = opCount;
|
||||
int count = createFile + createDir + rename + createLayeredDir +
|
||||
|
@@ -19,7 +19,6 @@ package org.alfresco.repo.avm;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.hibernate.LockMode;
|
||||
import org.hibernate.Query;
|
||||
import org.hibernate.Session;
|
||||
|
||||
|
@@ -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