Author: ron.sigal(a)jboss.com
Date: 2008-08-30 02:20:07 -0400 (Sat, 30 Aug 2008)
New Revision: 4519
Modified:
remoting2/branches/2.x/src/main/org/jboss/remoting/serialization/impl/java/JavaSerializationManager.java
Log:
JBREM-1028: Uses ClearableObjectOutputStream.
Modified:
remoting2/branches/2.x/src/main/org/jboss/remoting/serialization/impl/java/JavaSerializationManager.java
===================================================================
---
remoting2/branches/2.x/src/main/org/jboss/remoting/serialization/impl/java/JavaSerializationManager.java 2008-08-29
01:18:58 UTC (rev 4518)
+++
remoting2/branches/2.x/src/main/org/jboss/remoting/serialization/impl/java/JavaSerializationManager.java 2008-08-30
06:20:07 UTC (rev 4519)
@@ -60,7 +60,7 @@
{
log.trace("Creating ObjectOutputStream");
}
- return new ObjectOutputStream(output);
+ return new ClearableObjectOutputStream(output);
}
/**
@@ -119,6 +119,11 @@
oos.reset();
oos.writeObject(dataObject);
oos.flush();
+
+ if (oos instanceof ClearableObjectOutputStream)
+ {
+ ((ClearableObjectOutputStream) oos).clear();
+ }
}
public Object receiveObject(InputStream inputStream, ClassLoader customClassLoader,
int version) throws IOException, ClassNotFoundException