activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jstrac...@apache.org
Subject svn commit: r452505 - in /incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq: command/ActiveMQObjectMessage.java kaha/ObjectMarshaller.java
Date Tue, 03 Oct 2006 14:05:12 GMT
Author: jstrachan
Date: Tue Oct  3 07:05:11 2006
New Revision: 452505

URL: http://svn.apache.org/viewvc?view=rev&rev=452505
Log:
applied patch from Hiroshi Ayukawa to ensure that object stream marshalling is all released
- many thanks! For discussion see: http://www.nabble.com/Broker-used-up-the-memory-tf2316972.html#a6598182

Modified:
    incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/command/ActiveMQObjectMessage.java
    incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/ObjectMarshaller.java

Modified: incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/command/ActiveMQObjectMessage.java
URL: http://svn.apache.org/viewvc/incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/command/ActiveMQObjectMessage.java?view=diff&rev=452505&r1=452504&r2=452505
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/command/ActiveMQObjectMessage.java
(original)
+++ incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/command/ActiveMQObjectMessage.java
Tue Oct  3 07:05:11 2006
@@ -94,6 +94,8 @@
                 DataOutputStream dataOut = new DataOutputStream(os);
                 ObjectOutputStream objOut = new ObjectOutputStream(dataOut);
                 objOut.writeObject(object);
+                objOut.flush();
+                objOut.reset();
                 objOut.close();
                 setContent(bytesOut.toByteSequence());
             } catch (IOException ioe) {

Modified: incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/ObjectMarshaller.java
URL: http://svn.apache.org/viewvc/incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/ObjectMarshaller.java?view=diff&rev=452505&r1=452504&r2=452505
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/ObjectMarshaller.java
(original)
+++ incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/ObjectMarshaller.java
Tue Oct  3 07:05:11 2006
@@ -50,8 +50,8 @@
         
         ObjectOutputStream objectOut=new ObjectOutputStream((OutputStream) dataOut);
         objectOut.writeObject(object);
-        objectOut.reset();
         objectOut.flush();
+        objectOut.reset();
     }
 
     /**



Mime
View raw message