airavata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lah...@apache.org
Subject [1/2] airavata git commit: fixing zk code
Date Fri, 24 Apr 2015 23:43:23 GMT
Repository: airavata
Updated Branches:
  refs/heads/master a6d876e9c -> b419e5b7a


fixing zk code


Project: http://git-wip-us.apache.org/repos/asf/airavata/repo
Commit: http://git-wip-us.apache.org/repos/asf/airavata/commit/672244e0
Tree: http://git-wip-us.apache.org/repos/asf/airavata/tree/672244e0
Diff: http://git-wip-us.apache.org/repos/asf/airavata/diff/672244e0

Branch: refs/heads/master
Commit: 672244e0d3fd1d9105e67e28b493929aad964528
Parents: 264bbeb
Author: Lahiru Gunathilake <glahiru@gmail.com>
Authored: Fri Apr 24 19:43:14 2015 -0400
Committer: Lahiru Gunathilake <glahiru@gmail.com>
Committed: Fri Apr 24 19:43:14 2015 -0400

----------------------------------------------------------------------
 .../util/AiravataServerThreadPoolExecutor.java  |  4 +-
 .../client/samples/CreateLaunchExperiment.java  |  2 +-
 .../airavata/gfac/server/GfacServerHandler.java | 12 +++-
 .../airavata/gfac/core/cpi/BetterGfacImpl.java  | 35 +++++++++--
 .../core/monitor/GfacInternalStatusUpdator.java | 61 ++++++++++----------
 .../gfac/core/utils/GFacThreadPoolExecutor.java |  2 +-
 .../airavata/gfac/core/utils/GFacUtils.java     |  2 +-
 .../server/OrchestratorServerHandler.java       |  2 +-
 .../OrchestratorServerThreadPoolExecutor.java   |  2 +-
 9 files changed, 79 insertions(+), 43 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/672244e0/airavata-api/airavata-api-server/src/main/java/org/apache/airavata/api/server/util/AiravataServerThreadPoolExecutor.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-api-server/src/main/java/org/apache/airavata/api/server/util/AiravataServerThreadPoolExecutor.java
b/airavata-api/airavata-api-server/src/main/java/org/apache/airavata/api/server/util/AiravataServerThreadPoolExecutor.java
index d55d2a7..b5a9b27 100644
--- a/airavata-api/airavata-api-server/src/main/java/org/apache/airavata/api/server/util/AiravataServerThreadPoolExecutor.java
+++ b/airavata-api/airavata-api-server/src/main/java/org/apache/airavata/api/server/util/AiravataServerThreadPoolExecutor.java
@@ -35,14 +35,14 @@ public class AiravataServerThreadPoolExecutor {
 
     private static ExecutorService threadPool;
 
-    public static ExecutorService getThreadPool() {
+    public static ExecutorService getCachedThreadPool() {
         if(threadPool ==null){
             threadPool = Executors.newCachedThreadPool();
         }
         return threadPool;
     }
 
-    public static ExecutorService getFixedThreadPool() {
+    public static ExecutorService client() {
         if(threadPool ==null){
             try {
                 threadPool = Executors.newFixedThreadPool(Integer.parseInt(ServerSettings.getSetting(AIRAVATA_SERVER_THREAD_POOL_SIZE)));

http://git-wip-us.apache.org/repos/asf/airavata/blob/672244e0/airavata-api/airavata-client-sdks/java-client-samples/src/main/java/org/apache/airavata/client/samples/CreateLaunchExperiment.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-client-sdks/java-client-samples/src/main/java/org/apache/airavata/client/samples/CreateLaunchExperiment.java
b/airavata-api/airavata-client-sdks/java-client-samples/src/main/java/org/apache/airavata/client/samples/CreateLaunchExperiment.java
index 62cd190..829ed85 100644
--- a/airavata-api/airavata-client-sdks/java-client-samples/src/main/java/org/apache/airavata/client/samples/CreateLaunchExperiment.java
+++ b/airavata-api/airavata-client-sdks/java-client-samples/src/main/java/org/apache/airavata/client/samples/CreateLaunchExperiment.java
@@ -61,7 +61,7 @@ public class CreateLaunchExperiment {
     private static String echoAppId = "Echo_418d87fe-c720-4079-acd9-7e78aaa6cf76";
     private static String mpiAppId = "HelloMPI_bfd56d58-6085-4b7f-89fc-646576830518";
     private static String wrfAppId = "WRF_7ad5da38-c08b-417c-a9ea-da9298839762";
-    private static String amberAppId = "Amber_3864a9dc-de75-4bd1-8e8e-a0d1c006a35c";
+    private static String amberAppId = "Amber_dda3d2bb-e128-4814-9ade-7de9070169be";
     private static String gromacsAppId = "GROMACS_05622038-9edd-4cb1-824e-0b7cb993364b";
     private static String espressoAppId = "ESPRESSO_10cc2820-5d0b-4c63-9546-8a8b595593c1";
     private static String lammpsAppId = "LAMMPS_2472685b-8acf-497e-aafe-cc66fe5f4cb6";

http://git-wip-us.apache.org/repos/asf/airavata/blob/672244e0/modules/gfac/airavata-gfac-service/src/main/java/org/apache/airavata/gfac/server/GfacServerHandler.java
----------------------------------------------------------------------
diff --git a/modules/gfac/airavata-gfac-service/src/main/java/org/apache/airavata/gfac/server/GfacServerHandler.java
b/modules/gfac/airavata-gfac-service/src/main/java/org/apache/airavata/gfac/server/GfacServerHandler.java
index 38caef2..befda78 100644
--- a/modules/gfac/airavata-gfac-service/src/main/java/org/apache/airavata/gfac/server/GfacServerHandler.java
+++ b/modules/gfac/airavata-gfac-service/src/main/java/org/apache/airavata/gfac/server/GfacServerHandler.java
@@ -192,6 +192,16 @@ public class GfacServerHandler implements GfacService.Iface, Watcher
{
                     break;
                 case Expired:case Disconnected:
                    logger.info("ZK Connection is "+ state.toString());
+                    try {
+                        zk = new ZooKeeper(AiravataZKUtils.getZKhostPort(), AiravataZKUtils.getZKTimeout(),
this);
+                    } catch (IOException e) {
+                        logger.error(e.getMessage(), e);
+                    } catch (ApplicationSettingsException e) {
+                        logger.error(e.getMessage(), e);
+                    }
+//                    synchronized (mutex) {
+//                        mutex.wait();  // waiting for the syncConnected event
+//                    }
             }
         }
     }
@@ -291,7 +301,7 @@ public class GfacServerHandler implements GfacService.Iface, Watcher {
 
     private GFac getGfac() throws TException {
         try {
-            return new BetterGfacImpl(registry, appCatalog, zk, publisher);
+            return new BetterGfacImpl(registry, appCatalog, new ZooKeeper(AiravataZKUtils.getZKhostPort(),
AiravataZKUtils.getZKTimeout(), this), publisher);
         } catch (Exception e) {
             throw new TException("Error initializing gfac instance", e);
         }

http://git-wip-us.apache.org/repos/asf/airavata/blob/672244e0/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/cpi/BetterGfacImpl.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/cpi/BetterGfacImpl.java
b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/cpi/BetterGfacImpl.java
index 45e320d..1f5124e 100644
--- a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/cpi/BetterGfacImpl.java
+++ b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/cpi/BetterGfacImpl.java
@@ -214,6 +214,7 @@ public class BetterGfacImpl implements GFac,Watcher {
             StringWriter errors = new StringWriter();
             e.printStackTrace(new PrintWriter(errors));
             GFacUtils.saveErrorDetails(jobExecutionContext, errors.toString(), CorrectiveAction.CONTACT_SUPPORT,
ErrorCategory.AIRAVATA_INTERNAL_ERROR );
+            closeZK(jobExecutionContext);
             throw new GFacException(e);
         }
     }
@@ -508,13 +509,16 @@ public class BetterGfacImpl implements GFac,Watcher {
             }
             return true;
         } catch (ApplicationSettingsException e) {
-            GFacUtils.saveErrorDetails(jobExecutionContext,  e.getCause().toString(), CorrectiveAction.CONTACT_SUPPORT,
ErrorCategory.AIRAVATA_INTERNAL_ERROR );
-            throw new GFacException("Error launching the Job",e);
+            GFacUtils.saveErrorDetails(jobExecutionContext, e.getCause().toString(), CorrectiveAction.CONTACT_SUPPORT,
ErrorCategory.AIRAVATA_INTERNAL_ERROR);
+            closeZK(jobExecutionContext);
+            throw new GFacException("Error launching the Job", e);
         } catch (KeeperException e) {
-            GFacUtils.saveErrorDetails(jobExecutionContext,  e.getCause().toString(), CorrectiveAction.CONTACT_SUPPORT,
ErrorCategory.AIRAVATA_INTERNAL_ERROR );
-            throw new GFacException("Error launching the Job",e);
+            GFacUtils.saveErrorDetails(jobExecutionContext, e.getCause().toString(), CorrectiveAction.CONTACT_SUPPORT,
ErrorCategory.AIRAVATA_INTERNAL_ERROR);
+            closeZK(jobExecutionContext);
+            throw new GFacException("Error launching the Job", e);
         } catch (InterruptedException e) {
             GFacUtils.saveErrorDetails(jobExecutionContext,  e.getCause().toString(), CorrectiveAction.CONTACT_SUPPORT,
ErrorCategory.AIRAVATA_INTERNAL_ERROR );
+            closeZK(jobExecutionContext);
             throw new GFacException("Error launching the Job",e);
         }
     }
@@ -526,6 +530,7 @@ public class BetterGfacImpl implements GFac,Watcher {
             return cancel(jobExecutionContext);
         } catch (Exception e) {
             GFacUtils.saveErrorDetails(jobExecutionContext,  e.getCause().toString(), CorrectiveAction.CONTACT_SUPPORT,
ErrorCategory.AIRAVATA_INTERNAL_ERROR );
+            closeZK(jobExecutionContext);
             log.error("Error inovoking the job with experiment ID: " + experimentID);
             throw new GFacException(e);
         }
@@ -606,6 +611,7 @@ public class BetterGfacImpl implements GFac,Watcher {
                     }
                     jobExecutionContext.setProperty(ERROR_SENT, "true");
                     jobExecutionContext.getNotifier().publish(new ExecutionFailEvent(e.getCause()));
+                    closeZK(jobExecutionContext);
                     throw new GFacException(e.getMessage(), e);
                 }
 //            }
@@ -618,6 +624,7 @@ public class BetterGfacImpl implements GFac,Watcher {
 //            throw new GFacException(e.getMessage(), e);
         } catch (Exception e) {
             log.error("Error occured while cancelling job for experiment : " + jobExecutionContext.getExperimentID(),
e);
+            closeZK(jobExecutionContext);
             throw new GFacException(e.getMessage(), e);
         }
     }
@@ -700,7 +707,8 @@ public class BetterGfacImpl implements GFac,Watcher {
 			}
 			jobExecutionContext.setProperty(ERROR_SENT, "true");
 			jobExecutionContext.getNotifier().publish(new ExecutionFailEvent(e.getCause()));
-			throw new GFacException(e.getMessage(), e);
+            closeZK(jobExecutionContext);
+            throw new GFacException(e.getMessage(), e);
 		}
     }
 
@@ -772,7 +780,8 @@ public class BetterGfacImpl implements GFac,Watcher {
 			}
 			jobExecutionContext.setProperty(ERROR_SENT, "true");
 			jobExecutionContext.getNotifier().publish(new ExecutionFailEvent(e.getCause()));
-			throw new GFacException(e.getMessage(), e);
+            closeZK(jobExecutionContext);
+            throw new GFacException(e.getMessage(), e);
 		}
     }
 
@@ -999,6 +1008,8 @@ public class BetterGfacImpl implements GFac,Watcher {
                         log.error(e1.getLocalizedMessage());
                     }
                     throw new GFacException(e);
+                }finally {
+                    closeZK(jobExecutionContext);
                 }
             }else{
                 log.info("Experiment execution is cancelled, so OutHandler invocation is
going to stop");
@@ -1021,6 +1032,16 @@ public class BetterGfacImpl implements GFac,Watcher {
         monitorPublisher.publish(new GfacExperimentStateChangeRequest(new MonitorID(jobExecutionContext),
GfacExperimentState.COMPLETED));
     }
 
+    private void closeZK(JobExecutionContext jobExecutionContext) {
+        try {
+            if(jobExecutionContext.getZk()!=null) {
+                jobExecutionContext.getZk().close();
+            }
+        } catch (InterruptedException e) {
+            log.error(e.getMessage(), e);
+        }
+    }
+
     /**
      * If handlers ran successfully we re-run only recoverable handlers
      * If handler never ran we run the normal invoke method
@@ -1167,6 +1188,8 @@ public class BetterGfacImpl implements GFac,Watcher {
                     log.error(e1.getLocalizedMessage());
                 }
                 throw new GFacException("Error Executing a OutFlow Handler", e);
+            }finally {
+                closeZK(jobExecutionContext);
             }
         }
         monitorPublisher.publish(new GfacExperimentStateChangeRequest(new MonitorID(jobExecutionContext),
GfacExperimentState.OUTHANDLERSINVOKED));

http://git-wip-us.apache.org/repos/asf/airavata/blob/672244e0/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/monitor/GfacInternalStatusUpdator.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/monitor/GfacInternalStatusUpdator.java
b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/monitor/GfacInternalStatusUpdator.java
index c0c9dd3..4457cac 100644
--- a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/monitor/GfacInternalStatusUpdator.java
+++ b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/monitor/GfacInternalStatusUpdator.java
@@ -29,6 +29,7 @@ import org.apache.airavata.common.utils.Constants;
 import org.apache.airavata.common.utils.ServerSettings;
 import org.apache.airavata.common.utils.listener.AbstractActivityListener;
 import org.apache.airavata.gfac.core.monitor.state.GfacExperimentStateChangeRequest;
+import org.apache.airavata.gfac.core.states.GfacExperimentState;
 import org.apache.airavata.gfac.core.utils.GFacUtils;
 import org.apache.airavata.messaging.core.Publisher;
 import org.apache.airavata.messaging.core.impl.RabbitMQProducer;
@@ -55,38 +56,40 @@ public class GfacInternalStatusUpdator implements AbstractActivityListener,
Watc
         String experimentPath = experimentNode + File.separator + ServerSettings.getSetting(Constants.ZOOKEEPER_GFAC_SERVER_NAME)
                 + File.separator + statusChangeRequest.getMonitorID().getExperimentID();
         Stat exists = null;
-        try {
-            if (!zk.getState().isConnected()) {
-                String zkhostPort = AiravataZKUtils.getZKhostPort();
-                zk = new ZooKeeper(zkhostPort, AiravataZKUtils.getZKTimeout(), this);
-                synchronized (mutex) {
-                    mutex.wait();
+        if(!(GfacExperimentState.COMPLETED.equals(statusChangeRequest.getState()) || GfacExperimentState.FAILED.equals(statusChangeRequest.getState())))
{
+            try {
+                if (!zk.getState().isConnected()) {
+                    String zkhostPort = AiravataZKUtils.getZKhostPort();
+                    zk = new ZooKeeper(zkhostPort, AiravataZKUtils.getZKTimeout(), this);
+                    synchronized (mutex) {
+                        mutex.wait();
+                    }
                 }
+                exists = zk.exists(experimentPath, false);
+                if (exists == null) {
+                    logger.error("ZK path: " + experimentPath + " does not exists !!");
+                    logger.error("Zookeeper is in an inconsistent state !!! ");
+                    return;
+                }
+            } catch (KeeperException e) {
+                logger.error("Error while updating zk", e);
+                throw new Exception(e.getMessage(), e);
+            } catch (InterruptedException e) {
+                logger.error("Error while updating zk", e);
+                throw new Exception(e.getMessage(), e);
+            } catch (IOException e) {
+                logger.error("Error while updating zk", e);
+                throw new Exception(e.getMessage(), e);
             }
-            exists = zk.exists(experimentPath, false);
-            if (exists == null) {
-                logger.error("ZK path: " + experimentPath + " does not exists !!");
-                logger.error("Zookeeper is in an inconsistent state !!! ");
-                return;
+            Stat state = zk.exists(experimentPath + File.separator + AiravataZKUtils.ZK_EXPERIMENT_STATE_NODE,
false);
+            if (state == null) {
+                // state znode has to be created
+                zk.create(experimentPath + File.separator + AiravataZKUtils.ZK_EXPERIMENT_STATE_NODE,
+                        String.valueOf(statusChangeRequest.getState().getValue()).getBytes(),
ZooDefs.Ids.OPEN_ACL_UNSAFE, CreateMode.PERSISTENT);
+            } else {
+                zk.setData(experimentPath + File.separator + AiravataZKUtils.ZK_EXPERIMENT_STATE_NODE,
+                        String.valueOf(statusChangeRequest.getState().getValue()).getBytes(),
state.getVersion());
             }
-        } catch (KeeperException e) {
-            logger.error("Error while updating zk", e);
-            throw new Exception(e.getMessage(), e);
-        } catch (InterruptedException e) {
-            logger.error("Error while updating zk", e);
-            throw new Exception(e.getMessage(), e);
-        } catch (IOException e) {
-            logger.error("Error while updating zk", e);
-            throw new Exception(e.getMessage(), e);
-        }
-        Stat state = zk.exists(experimentPath + File.separator + AiravataZKUtils.ZK_EXPERIMENT_STATE_NODE,
false);
-        if (state == null) {
-            // state znode has to be created
-            zk.create(experimentPath + File.separator + AiravataZKUtils.ZK_EXPERIMENT_STATE_NODE,
-                    String.valueOf(statusChangeRequest.getState().getValue()).getBytes(),
ZooDefs.Ids.OPEN_ACL_UNSAFE, CreateMode.PERSISTENT);
-        } else {
-            zk.setData(experimentPath + File.separator + AiravataZKUtils.ZK_EXPERIMENT_STATE_NODE,
-                    String.valueOf(statusChangeRequest.getState().getValue()).getBytes(),
state.getVersion());
         }
         switch (statusChangeRequest.getState()) {
             case COMPLETED:

http://git-wip-us.apache.org/repos/asf/airavata/blob/672244e0/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/utils/GFacThreadPoolExecutor.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/utils/GFacThreadPoolExecutor.java
b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/utils/GFacThreadPoolExecutor.java
index 3ce7a50..c6020b9 100644
--- a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/utils/GFacThreadPoolExecutor.java
+++ b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/utils/GFacThreadPoolExecutor.java
@@ -41,7 +41,7 @@ public class GFacThreadPoolExecutor {
         return threadPool;
     }
 
-    public static ExecutorService getFixedThreadPool() throws ApplicationSettingsException
{
+    public static ExecutorService client() throws ApplicationSettingsException {
         if(threadPool ==null){
             try {
                 threadPool = Executors.newFixedThreadPool(Integer.parseInt(ServerSettings.getSetting(GFAC_THREAD_POOL_SIZE)));

http://git-wip-us.apache.org/repos/asf/airavata/blob/672244e0/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/utils/GFacUtils.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/utils/GFacUtils.java
b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/utils/GFacUtils.java
index 206bbdd..cd2b4ed 100644
--- a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/utils/GFacUtils.java
+++ b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/utils/GFacUtils.java
@@ -1182,7 +1182,7 @@ public class GFacUtils {
 
 			String s1 = zk.create(newExpNode + File.separator + "operation", "submit".getBytes(),
ZooDefs.Ids.OPEN_ACL_UNSAFE,
 					CreateMode.PERSISTENT);
-			zk.exists(s1, true);// we want to know when this node get deleted
+			zk.exists(s1, false);// we want to know when this node get deleted
 			zk.create(newExpNode + AiravataZKUtils.DELIVERY_TAG_POSTFIX, longToBytes(deliveryTag),
ZooDefs.Ids.OPEN_ACL_UNSAFE,  // here we store the value of delivery message
 					CreateMode.PERSISTENT);
 		} else {

http://git-wip-us.apache.org/repos/asf/airavata/blob/672244e0/modules/orchestrator/airavata-orchestrator-service/src/main/java/org/apache/airavata/orchestrator/server/OrchestratorServerHandler.java
----------------------------------------------------------------------
diff --git a/modules/orchestrator/airavata-orchestrator-service/src/main/java/org/apache/airavata/orchestrator/server/OrchestratorServerHandler.java
b/modules/orchestrator/airavata-orchestrator-service/src/main/java/org/apache/airavata/orchestrator/server/OrchestratorServerHandler.java
index 88e1533..06dafb6 100644
--- a/modules/orchestrator/airavata-orchestrator-service/src/main/java/org/apache/airavata/orchestrator/server/OrchestratorServerHandler.java
+++ b/modules/orchestrator/airavata-orchestrator-service/src/main/java/org/apache/airavata/orchestrator/server/OrchestratorServerHandler.java
@@ -245,7 +245,7 @@ public class OrchestratorServerHandler implements OrchestratorService.Iface,
             if (executionType == ExecutionType.SINGLE_APP) {
                 //its an single application execution experiment
                 log.debugId(experimentId, "Launching single application experiment {}.",
experimentId);
-                OrchestratorServerThreadPoolExecutor.getFixedThreadPool().execute(new SingleAppExperimentRunner(experimentId,
token));
+                OrchestratorServerThreadPoolExecutor.getCachedThreadPool().execute(new SingleAppExperimentRunner(experimentId,
token));
             } else if (executionType == ExecutionType.WORKFLOW) {
                 //its a workflow execution experiment
                 log.debugId(experimentId, "Launching workflow experiment {}.", experimentId);

http://git-wip-us.apache.org/repos/asf/airavata/blob/672244e0/modules/orchestrator/airavata-orchestrator-service/src/main/java/org/apache/airavata/orchestrator/util/OrchestratorServerThreadPoolExecutor.java
----------------------------------------------------------------------
diff --git a/modules/orchestrator/airavata-orchestrator-service/src/main/java/org/apache/airavata/orchestrator/util/OrchestratorServerThreadPoolExecutor.java
b/modules/orchestrator/airavata-orchestrator-service/src/main/java/org/apache/airavata/orchestrator/util/OrchestratorServerThreadPoolExecutor.java
index c475724..1730998 100644
--- a/modules/orchestrator/airavata-orchestrator-service/src/main/java/org/apache/airavata/orchestrator/util/OrchestratorServerThreadPoolExecutor.java
+++ b/modules/orchestrator/airavata-orchestrator-service/src/main/java/org/apache/airavata/orchestrator/util/OrchestratorServerThreadPoolExecutor.java
@@ -36,7 +36,7 @@ public class OrchestratorServerThreadPoolExecutor {
 
 	    private static ExecutorService threadPool;
 
-	    public static ExecutorService getThreadPool() {
+	    public static ExecutorService getCachedThreadPool() {
 	        if(threadPool ==null){
 	            threadPool = Executors.newCachedThreadPool();
 	        }


Mime
View raw message