Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
New development version.
[jaceP2P.git] / src / jaceP2P / Task.java
index 7dfd861..ffad2e9 100644 (file)
@@ -3,6 +3,7 @@ package jaceP2P;
 import java.io.ByteArrayOutputStream;
 import java.io.ObjectInputStream;
 import java.io.ObjectOutputStream;
+import java.rmi.ConnectException;
 import java.rmi.RemoteException;
 import java.util.Vector;
 
@@ -56,7 +57,8 @@ public class Task implements Runnable, Cloneable, java.io.Serializable {
        public Task sauv;
        public BackupConvg sauvConvg = new BackupConvg();
        public boolean postReloading = false;
-       public Vector<?> reduceAll;
+       @SuppressWarnings("unchecked")
+       public Vector reduceAll;
 
        int cpt = 0;
        int count = 0;
@@ -319,9 +321,13 @@ public class Task implements Runnable, Cloneable, java.io.Serializable {
                                                // else
                                                // SenderSocket.Instance().getBuffer().add(msg);
                                        }
+                                       
+                               } catch( ConnectException ce ) {
+                                       recev.getHostStub().suicide2( "Not responding!" ) ;
                                } catch (Exception e) {
                                        System.err.println("Unable to send data message to " + dest
                                                        + ": " + e);
+//                                     recev.getHostStub().suicide2( "Not responding!" ) ;
                                }
                                // System.out.println("TASK : g mis un msg qui doit etre envoye");
                                // envoie toujours asynchrone !!!!!!!! : le Message partira
@@ -397,7 +403,7 @@ public class Task implements Runnable, Cloneable, java.io.Serializable {
                                // + ")   taille MsgQueue : " + MsgQueue.Instance().getSize());
                        } catch (Exception e) {
                                if (Register.Instance().getListeOfTasks() == null)
-                                       System.err.println("Tasks list is null: " + e);
+                                       System.err.println("Tasks list is null2: " + e);
                        }
                        try {
                                JaceSession.Instance().getTaskThread().sleep(10);