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()
|
public void testCrawl()
|
||||||
{
|
{
|
||||||
int n = 8; // Number of Threads.
|
int n = 2; // Number of Threads.
|
||||||
int m = 16; // How many multiples of content to start with.
|
int m = 4; // How many multiples of content to start with.
|
||||||
long runTime = 1200000; // Ten minutes
|
long runTime = 1200000; // Ten minutes
|
||||||
fService.purgeRepository("main");
|
fService.purgeRepository("main");
|
||||||
fReaper.setInactiveBaseSleep(60000);
|
fReaper.setInactiveBaseSleep(60000);
|
||||||
|
@@ -351,6 +351,10 @@ public class AVMNodeDescriptor
|
|||||||
return fID;
|
return fID;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the file length if applicable.
|
||||||
|
* @return The file length.
|
||||||
|
*/
|
||||||
public long getLength()
|
public long getLength()
|
||||||
{
|
{
|
||||||
return fLength;
|
return fLength;
|
||||||
|
@@ -23,7 +23,6 @@ import java.util.ArrayList;
|
|||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.TreeMap;
|
import java.util.TreeMap;
|
||||||
|
|
||||||
import org.hibernate.stat.Statistics;
|
|
||||||
import org.springframework.context.support.FileSystemXmlApplicationContext;
|
import org.springframework.context.support.FileSystemXmlApplicationContext;
|
||||||
|
|
||||||
import junit.framework.TestCase;
|
import junit.framework.TestCase;
|
||||||
|
@@ -63,8 +63,7 @@ public class AVMStressTest extends AVMServiceTestBase
|
|||||||
3200, // read file
|
3200, // read file
|
||||||
10, // snapshot
|
10, // snapshot
|
||||||
1000, // # ops
|
1000, // # ops
|
||||||
fService,
|
fService);
|
||||||
"" + i);
|
|
||||||
tester.refresh();
|
tester.refresh();
|
||||||
Thread thread = new Thread(tester);
|
Thread thread = new Thread(tester);
|
||||||
testers.add(tester);
|
testers.add(tester);
|
||||||
|
@@ -78,11 +78,6 @@ class AVMTester implements Runnable
|
|||||||
*/
|
*/
|
||||||
private String[] fNames;
|
private String[] fNames;
|
||||||
|
|
||||||
/**
|
|
||||||
* The id of this thread.
|
|
||||||
*/
|
|
||||||
private String fID;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Flag for whether this thread errored out.
|
* Flag for whether this thread errored out.
|
||||||
*/
|
*/
|
||||||
@@ -117,12 +112,10 @@ class AVMTester implements Runnable
|
|||||||
int readFile,
|
int readFile,
|
||||||
int snapshot,
|
int snapshot,
|
||||||
int opCount,
|
int opCount,
|
||||||
AVMService service,
|
AVMService service)
|
||||||
String id)
|
|
||||||
{
|
{
|
||||||
fError = false;
|
fError = false;
|
||||||
fExit = false;
|
fExit = false;
|
||||||
fID = id;
|
|
||||||
fService = service;
|
fService = service;
|
||||||
fOpCount = opCount;
|
fOpCount = opCount;
|
||||||
int count = createFile + createDir + rename + createLayeredDir +
|
int count = createFile + createDir + rename + createLayeredDir +
|
||||||
|
@@ -19,7 +19,6 @@ package org.alfresco.repo.avm;
|
|||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import org.hibernate.LockMode;
|
|
||||||
import org.hibernate.Query;
|
import org.hibernate.Query;
|
||||||
import org.hibernate.Session;
|
import org.hibernate.Session;
|
||||||
|
|
||||||
|
@@ -23,13 +23,9 @@ import org.alfresco.repo.avm.AVMException;
|
|||||||
import org.alfresco.repo.avm.AVMNotFoundException;
|
import org.alfresco.repo.avm.AVMNotFoundException;
|
||||||
import org.hibernate.HibernateException;
|
import org.hibernate.HibernateException;
|
||||||
import org.hibernate.JDBCException;
|
import org.hibernate.JDBCException;
|
||||||
import org.hibernate.ObjectNotFoundException;
|
|
||||||
import org.hibernate.Session;
|
import org.hibernate.Session;
|
||||||
import org.hibernate.SessionFactory;
|
import org.hibernate.SessionFactory;
|
||||||
import org.hibernate.StaleStateException;
|
|
||||||
import org.hibernate.Transaction;
|
import org.hibernate.Transaction;
|
||||||
import org.hibernate.exception.GenericJDBCException;
|
|
||||||
import org.hibernate.exception.LockAcquisitionException;
|
|
||||||
import org.springframework.dao.DataRetrievalFailureException;
|
import org.springframework.dao.DataRetrievalFailureException;
|
||||||
import org.springframework.dao.DeadlockLoserDataAccessException;
|
import org.springframework.dao.DeadlockLoserDataAccessException;
|
||||||
import org.springframework.dao.OptimisticLockingFailureException;
|
import org.springframework.dao.OptimisticLockingFailureException;
|
||||||
@@ -103,38 +99,38 @@ public class HibernateTxn extends HibernateTemplate
|
|||||||
{
|
{
|
||||||
// Do nothing.
|
// 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);
|
long interval;
|
||||||
}
|
synchronized (fRandom)
|
||||||
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;
|
interval = fRandom.nextInt(1000);
|
||||||
synchronized (fRandom)
|
|
||||||
{
|
|
||||||
interval = fRandom.nextInt(1000);
|
|
||||||
}
|
|
||||||
Thread.sleep(interval);
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
catch (InterruptedException ie)
|
|
||||||
{
|
|
||||||
// Do nothing.
|
|
||||||
}
|
}
|
||||||
|
Thread.sleep(interval);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (t instanceof OptimisticLockingFailureException)
|
catch (InterruptedException ie)
|
||||||
{
|
{
|
||||||
continue;
|
// Do nothing.
|
||||||
}
|
}
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
if (t instanceof OptimisticLockingFailureException)
|
||||||
|
{
|
||||||
|
continue;
|
||||||
}
|
}
|
||||||
if (t instanceof AVMException)
|
if (t instanceof AVMException)
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user