User: chirino 
  Date: 01/09/26 21:09:36

  Modified:    src/main/org/jboss/mq/il/uil UILClientILService.java
                        UILServerIL.java
  Log:
  Cleaning up the ILs a little bit.  It was reported that client connections
  were not being closed properly on Linux.  We are now explicitly closing
  the serverIL sockets on the OIL and UIL ILs.
  
  Revision  Changes    Path
  1.4       +3 -1      jbossmq/src/main/org/jboss/mq/il/uil/UILClientILService.java
  
  Index: UILClientILService.java
  ===================================================================
  RCS file: 
/cvsroot/jboss/jbossmq/src/main/org/jboss/mq/il/uil/UILClientILService.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- UILClientILService.java   2001/09/26 05:02:28     1.3
  +++ UILClientILService.java   2001/09/27 04:09:36     1.4
  @@ -29,7 +29,7 @@
    *
    * @author    Norbert Lataille ([EMAIL PROTECTED])
    * @author    Hiram Chirino ([EMAIL PROTECTED])
  - * @version   $Revision: 1.3 $
  + * @version   $Revision: 1.4 $
    * @created   August 16, 2001
    */
   public class UILClientILService implements Runnable, org.jboss.mq.il.ClientILService
  @@ -97,6 +97,7 @@
            out = new ObjectOutputStream(new 
BufferedOutputStream(serverIL.mSocket.getOutputStream(2)));
            out.flush();
            in = new ObjectInputStream(new 
BufferedInputStream(serverIL.mSocket.getInputStream(2)));
  +         socket = serverIL.socket;
   
         }
         catch (IOException e)
  @@ -202,6 +203,7 @@
         {
            out.close();
            in.close();
  +         socket.close();
         }
         catch (IOException e)
         {
  
  
  
  1.4       +22 -4     jbossmq/src/main/org/jboss/mq/il/uil/UILServerIL.java
  
  Index: UILServerIL.java
  ===================================================================
  RCS file: /cvsroot/jboss/jbossmq/src/main/org/jboss/mq/il/uil/UILServerIL.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- UILServerIL.java  2001/09/26 05:02:28     1.3
  +++ UILServerIL.java  2001/09/27 04:09:36     1.4
  @@ -37,7 +37,7 @@
    *
    * @author    Hiram Chirino ([EMAIL PROTECTED])
    * @author    Norbert Lataille ([EMAIL PROTECTED])
  - * @version   $Revision: 1.3 $
  + * @version   $Revision: 1.4 $
    * @created   August 16, 2001
    */
   public class UILServerIL implements java.io.Serializable, Cloneable, 
org.jboss.mq.il.ServerIL
  @@ -75,6 +75,10 @@
      /**
       * Description of the Field
       */
  +   protected transient Socket socket;
  +   /**
  +    * Description of the Field
  +    */
      protected transient SocketMultiplexor mSocket;
      /**
       * Description of the Field
  @@ -302,6 +306,7 @@
         checkConnection();
         out.writeByte(m_connectionClosing);
         waitAnswer();
  +      destroyConnection();
      }
   
      /**
  @@ -474,20 +479,33 @@
      }
   
      /**
  -    * #Description of the Method
  +    * Used to establish a new connection to the server
       *
       * @exception Exception  Description of Exception
       */
      protected void createConnection()
             throws Exception
      {
  -      Socket socket = new Socket(addr, port);
  +      socket = new Socket(addr, port);
         mSocket = new SocketMultiplexor(socket);
         out = new ObjectOutputStream(new 
BufferedOutputStream(mSocket.getOutputStream(1)));
         out.flush();
         in = new ObjectInputStream(new 
BufferedInputStream(mSocket.getInputStream(1)));
      }
  -
  +   
  +   /**
  +    * Used to close the current connection with the server
  +    *
  +    * @exception Exception  Description of Exception
  +    */
  +   protected void destroyConnection()
  +          throws Exception
  +   {
  +      out.close();
  +      in.close();      
  +      // The scoket is closed by the ClientIL
  +   }
  +   
      /**
       * #Description of the Method
       *
  
  
  

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

Reply via email to