Enhancements to FSR.

1) Performance imporvements (client and server are now multi-threaded + other performance work)
2) Pluggable transport protocols (ENH-145)
3) Changes to initialisation (ALFCOM-135)
4) Changes to the action service to enable multiple async event queues.

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@11022 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Mark Rogers
2008-09-25 15:10:58 +00:00
parent 2a4b7c9eef
commit e98ab1750a
31 changed files with 1890 additions and 500 deletions

View File

@@ -71,6 +71,7 @@ public class ThreadPoolExecutorFactoryBean implements FactoryBean, InitializingB
private static final boolean DEFAULT_THREAD_DAEMON = Boolean.TRUE;
private static final int DEFAULT_WORK_QUEUE_SIZE = -1;
private static final RejectedExecutionHandler DEFAULT_REJECTED_EXECUTION_HANDLER = new ThreadPoolExecutor.CallerRunsPolicy();
private String poolName = "";
private int corePoolSize;
private int maximumPoolSize;
@@ -183,6 +184,11 @@ public class ThreadPoolExecutorFactoryBean implements FactoryBean, InitializingB
threadFactory.setThreadDaemon(threadDaemon);
threadFactory.setThreadPriority(threadPriority);
if(poolName.length() > 0)
{
threadFactory.setNamePrefix(poolName);
}
if (workQueueSize < 0)
{
workQueueSize = Integer.MAX_VALUE;
@@ -227,4 +233,14 @@ public class ThreadPoolExecutorFactoryBean implements FactoryBean, InitializingB
{
return ThreadPoolExecutor.class;
}
public String getPoolName()
{
return this.poolName;
}
public void setPoolName(String poolName)
{
this.poolName = poolName;
}
}

View File

@@ -54,7 +54,7 @@ public class TraceableThreadFactory implements ThreadFactory
}
private final ThreadGroup group;
private final String namePrefix;
private String namePrefix;
private final AtomicInteger threadNumber;
private boolean threadDaemon;
private int threadPriority;
@@ -98,4 +98,15 @@ public class TraceableThreadFactory implements ThreadFactory
return thread;
}
public void setNamePrefix(String namePrefix)
{
this.namePrefix = namePrefix;
}
public String getNamePrefix()
{
return this.namePrefix;
}
}