User: hiram   
  Date: 00/11/29 09:06:37

  Modified:    src/java/org/spydermq/distributed/server
                        ConnectionReceiverOIL.java
                        ConnectionReceiverOILClient.java
                        ConnectionReceiverUIL.java
                        ConnectionReceiverUILClient.java
                        DistributedJMSServerOIL.java
                        DistributedJMSServerOILClient.java
                        DistributedJMSServerUIL.java
                        DistributedJMSServerUILClient.java
  Log:
  Fixed a memory leak due to not doing reset()s on the ObjectOutputStreams.
  The ObjectOutputStream would hold on to a reference of sent messages
  so they would never get gc'ed.
  
  Revision  Changes    Path
  1.10      +1 -1      
spyderMQ/src/java/org/spydermq/distributed/server/ConnectionReceiverOIL.java
  
  Index: ConnectionReceiverOIL.java
  ===================================================================
  RCS file: 
/products/cvs/ejboss/spyderMQ/src/java/org/spydermq/distributed/server/ConnectionReceiverOIL.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- ConnectionReceiverOIL.java        2000/11/27 23:03:17     1.9
  +++ ConnectionReceiverOIL.java        2000/11/29 17:06:36     1.10
  @@ -146,7 +146,7 @@
                                                out.writeByte(1);
                                        }
                                        out.writeObject(e.getMessage());
  -                                     out.flush();
  +                                     out.reset();
                                        out.flush();
                                } catch (IOException e2) {
                                        failure("Result write",e2);
  
  
  
  1.11      +1 -0      
spyderMQ/src/java/org/spydermq/distributed/server/ConnectionReceiverOILClient.java
  
  Index: ConnectionReceiverOILClient.java
  ===================================================================
  RCS file: 
/products/cvs/ejboss/spyderMQ/src/java/org/spydermq/distributed/server/ConnectionReceiverOILClient.java,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- ConnectionReceiverOILClient.java  2000/11/19 20:00:01     1.10
  +++ ConnectionReceiverOILClient.java  2000/11/29 17:06:36     1.11
  @@ -59,6 +59,7 @@
        {
                Exception throwException=null;
                try {
  +                     out.reset();
                        out.flush();
                        int val=in.readByte();
                        switch(val) {
  
  
  
  1.4       +2 -1      
spyderMQ/src/java/org/spydermq/distributed/server/ConnectionReceiverUIL.java
  
  Index: ConnectionReceiverUIL.java
  ===================================================================
  RCS file: 
/products/cvs/ejboss/spyderMQ/src/java/org/spydermq/distributed/server/ConnectionReceiverUIL.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- ConnectionReceiverUIL.java        2000/11/27 23:03:51     1.3
  +++ ConnectionReceiverUIL.java        2000/11/29 17:06:36     1.4
  @@ -42,7 +42,7 @@
    *   @author Norbert Lataille ([EMAIL PROTECTED])
    *   @author Hiram Chirino ([EMAIL PROTECTED])
    * 
  - *   @version $Revision: 1.3 $
  + *   @version $Revision: 1.4 $
    */
   public class ConnectionReceiverUIL 
        implements Runnable, ConnectionReceiverSetup
  @@ -159,6 +159,7 @@
                                                out.writeByte(1);
                                                out.writeObject(e);
                                        }
  +                                     out.reset();
                                        out.flush();
                                } catch (IOException e2) {
                                        failure("Result write",e2);
  
  
  
  1.3       +2 -1      
spyderMQ/src/java/org/spydermq/distributed/server/ConnectionReceiverUILClient.java
  
  Index: ConnectionReceiverUILClient.java
  ===================================================================
  RCS file: 
/products/cvs/ejboss/spyderMQ/src/java/org/spydermq/distributed/server/ConnectionReceiverUILClient.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- ConnectionReceiverUILClient.java  2000/11/19 20:00:02     1.2
  +++ ConnectionReceiverUILClient.java  2000/11/29 17:06:36     1.3
  @@ -30,7 +30,7 @@
    *   @author Norbert Lataille ([EMAIL PROTECTED])
    *   @author Hiram Chirino ([EMAIL PROTECTED])
    * 
  - *   @version $Revision: 1.2 $
  + *   @version $Revision: 1.3 $
    */
   import org.spydermq.multiplexor.SocketMultiplexor;public class 
ConnectionReceiverUILClient
        implements ConnectionReceiver, Serializable
  @@ -61,6 +61,7 @@
        {
                Exception throwException=null;
                try {
  +                     out.reset();
                        out.flush();
                        int val=in.readByte();
                        switch(val) {
  
  
  
  1.6       +4 -1      
spyderMQ/src/java/org/spydermq/distributed/server/DistributedJMSServerOIL.java
  
  Index: DistributedJMSServerOIL.java
  ===================================================================
  RCS file: 
/products/cvs/ejboss/spyderMQ/src/java/org/spydermq/distributed/server/DistributedJMSServerOIL.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- DistributedJMSServerOIL.java      2000/11/19 20:00:01     1.5
  +++ DistributedJMSServerOIL.java      2000/11/29 17:06:36     1.6
  @@ -23,8 +23,9 @@
   import java.io.ObjectInputStream;
   import java.io.BufferedInputStream;
   import java.io.IOException;
  +import org.spydermq.SpyAcknowledgementItem;
   
  -import org.spydermq.SpyAcknowledgementItem;public class DistributedJMSServerOIL
  +public class DistributedJMSServerOIL
        implements Runnable, DistributedJMSServerSetup, DistributedJMSServerOILMBean
   {
   
  @@ -172,6 +173,7 @@
                                        else {
                                                out.writeByte(1);
                                                out.writeObject(result);
  +                                             out.reset();
                                        }
                                        out.flush();
                                } catch (IOException e) {
  @@ -188,6 +190,7 @@
                                try {
                                        out.writeByte(2);
                                        out.writeObject(e.getMessage());
  +                                     out.reset();
                                        out.flush();
                                } catch (IOException e2) {
                                        failure("Result write",e2);
  
  
  
  1.4       +1 -0      
spyderMQ/src/java/org/spydermq/distributed/server/DistributedJMSServerOILClient.java
  
  Index: DistributedJMSServerOILClient.java
  ===================================================================
  RCS file: 
/products/cvs/ejboss/spyderMQ/src/java/org/spydermq/distributed/server/DistributedJMSServerOILClient.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- DistributedJMSServerOILClient.java        2000/11/19 20:00:01     1.3
  +++ DistributedJMSServerOILClient.java        2000/11/29 17:06:36     1.4
  @@ -75,6 +75,7 @@
        public Object waitAnswer() throws RemoteException
        {
                try {
  +                     out.reset();
                        out.flush();
                        int val=in.readByte();
                        if (val==0) return null;
  
  
  
  1.4       +3 -1      
spyderMQ/src/java/org/spydermq/distributed/server/DistributedJMSServerUIL.java
  
  Index: DistributedJMSServerUIL.java
  ===================================================================
  RCS file: 
/products/cvs/ejboss/spyderMQ/src/java/org/spydermq/distributed/server/DistributedJMSServerUIL.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- DistributedJMSServerUIL.java      2000/11/27 23:03:52     1.3
  +++ DistributedJMSServerUIL.java      2000/11/29 17:06:36     1.4
  @@ -36,7 +36,7 @@
    *   @author Norbert Lataille ([EMAIL PROTECTED])
    *   @author Hiram Chirino ([EMAIL PROTECTED])
    * 
  - *   @version $Revision: 1.3 $
  + *   @version $Revision: 1.4 $
    */
   import org.spydermq.multiplexor.SocketMultiplexor;import 
org.spydermq.SpyAcknowledgementItem;public class DistributedJMSServerUIL
        implements Runnable, DistributedJMSServerSetup, DistributedJMSServerUILMBean
  @@ -192,6 +192,7 @@
                                        else {
                                                out.writeByte(1);
                                                out.writeObject(result);
  +                                             out.reset();
                                        }
                                        out.flush();
                                } catch (IOException e) {
  @@ -208,6 +209,7 @@
                                try {
                                        out.writeByte(2);
                                        out.writeObject(e);
  +                                     out.reset();
                                        out.flush();
                                } catch (IOException e2) {
                                        failure("Result write",e2);
  
  
  
  1.3       +2 -1      
spyderMQ/src/java/org/spydermq/distributed/server/DistributedJMSServerUILClient.java
  
  Index: DistributedJMSServerUILClient.java
  ===================================================================
  RCS file: 
/products/cvs/ejboss/spyderMQ/src/java/org/spydermq/distributed/server/DistributedJMSServerUILClient.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- DistributedJMSServerUILClient.java        2000/11/19 20:00:02     1.2
  +++ DistributedJMSServerUILClient.java        2000/11/29 17:06:36     1.3
  @@ -34,7 +34,7 @@
    *   @author Norbert Lataille ([EMAIL PROTECTED])
    *   @author Hiram Chirino ([EMAIL PROTECTED])
    * 
  - *   @version $Revision: 1.2 $
  + *   @version $Revision: 1.3 $
    */
   import org.spydermq.multiplexor.SocketMultiplexor;import 
org.spydermq.SpyAcknowledgementItem;public class DistributedJMSServerUILClient
        implements DistributedJMSServer, Serializable
  @@ -97,6 +97,7 @@
        public Object waitAnswer() throws RemoteException
        {
                try {
  +                     out.reset();
                        out.flush();
                        int val=in.readByte();
                        if (val==0) return null;
  
  
  

Reply via email to