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

  Modified:    src/main/org/jboss/mq/il/uil UILServerILService.java
  Log:
  - keep service alive after connection reset by peer
  
  Revision  Changes    Path
  1.13      +12 -3     jbossmq/src/main/org/jboss/mq/il/uil/UILServerILService.java
  
  Index: UILServerILService.java
  ===================================================================
  RCS file: 
/cvsroot/jboss/jbossmq/src/main/org/jboss/mq/il/uil/UILServerILService.java,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- UILServerILService.java   2001/10/21 05:38:13     1.12
  +++ UILServerILService.java   2001/11/04 03:01:26     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;
  @@ -46,7 +47,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 UILServerILService extends org.jboss.mq.il.ServerILJMXService 
implements Runnable, UILServerILServiceMBean
   {
  @@ -169,10 +170,18 @@
            in = new ObjectInputStream(new 
BufferedInputStream(mSocket.getInputStream(1)));
   
         }
  +      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 UILServerILService.");
  +         return;
  +      }
         catch (IOException e)
         {
  -         log.warn("Could not initialize the UILServerIL Service.", e);
  -         running = false;
  +         log.warn("IOException occured. Cannot initialize the UILServerILService.");
            return;
         }
   
  
  
  

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

Reply via email to