tuscany-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From n...@apache.org
Subject svn commit: r988666 - /tuscany/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
Date Tue, 24 Aug 2010 19:02:26 GMT
Author: nash
Date: Tue Aug 24 19:02:25 2010
New Revision: 988666

URL: http://svn.apache.org/viewvc?rev=988666&view=rev
Log:
Merge revision 920274 from trunk into the 1.6.1 branch

Modified:
    tuscany/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

Modified: tuscany/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
URL: http://svn.apache.org/viewvc/tuscany/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?rev=988666&r1=988665&r2=988666&view=diff
==============================================================================
--- tuscany/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
(original)
+++ tuscany/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
Tue Aug 24 19:02:25 2010
@@ -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;



Mime
View raw message