User: charles_chan
  Date: 01/11/03 19:01:25

  Modified:    src/main/org/jboss/mq/il/oil OILServerILService.java
  Log:
  - keep service alive after connection reset by peer
  
  Revision  Changes    Path
  1.13      +12 -3     jbossmq/src/main/org/jboss/mq/il/oil/OILServerILService.java
  
  Index: OILServerILService.java
  ===================================================================
  RCS file: 
/cvsroot/jboss/jbossmq/src/main/org/jboss/mq/il/oil/OILServerILService.java,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- OILServerILService.java   2001/10/21 05:38:13     1.12
  +++ OILServerILService.java   2001/11/04 03:01:25     1.13
  @@ -15,6 +15,7 @@
   import java.net.InetAddress;
   import java.net.ServerSocket;
   import java.net.Socket;
  +import java.net.SocketException;
   import java.net.UnknownHostException;
   import java.rmi.RemoteException;
   import java.util.Properties;
  @@ -47,7 +48,7 @@
    * Implements the ServerILJMXService which is used to manage the JVM IL.
    *
    * @author    Hiram Chirino ([EMAIL PROTECTED])
  - * @version   $Revision: 1.12 $
  + * @version   $Revision: 1.13 $
    */
   public class OILServerILService extends org.jboss.mq.il.ServerILJMXService 
implements Runnable, OILServerILServiceMBean
   {
  @@ -165,10 +166,18 @@
            in = new ObjectInputStream(new 
BufferedInputStream(socket.getInputStream()));
   
         }
  +      catch (SocketException e)
  +      {
  +         // There is no easy way (other than string comparison) to
  +         // determine if the socket exception is caused by connection
  +         // reset by peer. In this case, it's okay to ignore both
  +         // SocketException and IOException.
  +         log.warn("SocketException occured (Connection reset by peer?). Cannot 
initialize the OILServerILService.");
  +         return;
  +      }
         catch (IOException e)
         {
  -         log.warn("Could not initialize the OILServerIL Service.", e);
  -         running = false;
  +         log.warn("IOException occured. Cannot initialize the OILServerILService.");
            return;
         }
   
  
  
  

_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to