diff options
author | nash <nash@13f79535-47bb-0310-9956-ffa450edef68> | 2010-08-24 19:02:25 +0000 |
---|---|---|
committer | nash <nash@13f79535-47bb-0310-9956-ffa450edef68> | 2010-08-24 19:02:25 +0000 |
commit | 947f11593e855c9a44359e87fc11e30f27509cb9 (patch) | |
tree | 6a085ac1480e4ae7d477a3b77e9ab41eb7076c3b /sca-java-1.x/branches | |
parent | 0f5c93ae5b4ced5ac2ed35d80af3d02d1d60d4dd (diff) |
Merge revision 920274 from trunk into the 1.6.1 branch
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@988666 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'sca-java-1.x/branches')
-rw-r--r-- | sca-java-1.x/branches/sca-java-1.6.1/modules/implementation-bpel-ode/src/main/java/org/apache/tuscany/sca/implementation/bpel/ode/EmbeddedODEServer.java | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/sca-java-1.x/branches/sca-java-1.6.1/modules/implementation-bpel-ode/src/main/java/org/apache/tuscany/sca/implementation/bpel/ode/EmbeddedODEServer.java b/sca-java-1.x/branches/sca-java-1.6.1/modules/implementation-bpel-ode/src/main/java/org/apache/tuscany/sca/implementation/bpel/ode/EmbeddedODEServer.java index 84c40defd9..1ed85c18ca 100644 --- a/sca-java-1.x/branches/sca-java-1.6.1/modules/implementation-bpel-ode/src/main/java/org/apache/tuscany/sca/implementation/bpel/ode/EmbeddedODEServer.java +++ b/sca-java-1.x/branches/sca-java-1.6.1/modules/implementation-bpel-ode/src/main/java/org/apache/tuscany/sca/implementation/bpel/ode/EmbeddedODEServer.java @@ -26,6 +26,7 @@ import java.util.Properties; import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; +import java.util.concurrent.ThreadFactory; import javax.transaction.TransactionManager; import javax.xml.namespace.QName; @@ -147,9 +148,18 @@ public class EmbeddedODEServer { if (__log.isDebugEnabled()) { __log.debug("ODE initializing"); } + ThreadFactory threadFactory = new ThreadFactory() { + int threadNumber = 0; + public Thread newThread(Runnable r) { + threadNumber += 1; + Thread t = new Thread(r, "EmbeddedODEServer-"+threadNumber); + t.setDaemon(true); + return t; + } + }; //FIXME: externalize the configuration for ThreadPoolMaxSize - _executorService = Executors.newCachedThreadPool(); + _executorService = Executors.newCachedThreadPool(threadFactory); _bpelServer = new BpelServerImpl(); _scheduler = createScheduler(); @@ -222,6 +232,7 @@ public class EmbeddedODEServer { protected Scheduler createScheduler() { SimpleScheduler scheduler = new SimpleScheduler(new GUID().toString(),new JdbcDelegate(_db.getDataSource())); + scheduler.setExecutorService(_executorService); scheduler.setTransactionManager(_txMgr); return scheduler; |