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

git-svn-id: https://svn.apache.org/repos/asf/incubator/activemq/trunk@452505 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
James Strachan 2006-10-03 14:05:11 +00:00
parent 917927fe6d
commit 8d42a5af7f
2 changed files with 3 additions and 1 deletions

View File

@ -94,6 +94,8 @@ public class ActiveMQObjectMessage extends ActiveMQMessage implements ObjectMess
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) {

View File

@ -50,8 +50,8 @@ public class ObjectMarshaller implements Marshaller{
ObjectOutputStream objectOut=new ObjectOutputStream((OutputStream) dataOut);
objectOut.writeObject(object);
objectOut.reset();
objectOut.flush();
objectOut.reset();
}
/**