[jbosscache-issues] [JBoss JIRA] Updated: (JBCACHE-1382) Investigate use of ExposedBAOS instead of BAOS when marshalling objects
Manik Surtani (JIRA)
jira-events at lists.jboss.org
Tue Oct 14 05:29:23 EDT 2008
[ https://jira.jboss.org/jira/browse/JBCACHE-1382?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Manik Surtani updated JBCACHE-1382:
-----------------------------------
Fix Version/s: 2.2.1.CR2
> Investigate use of ExposedBAOS instead of BAOS when marshalling objects
> -----------------------------------------------------------------------
>
> Key: JBCACHE-1382
> URL: https://jira.jboss.org/jira/browse/JBCACHE-1382
> Project: JBoss Cache
> Issue Type: Feature Request
> Security Level: Public(Everyone can see)
> Reporter: Manik Surtani
> Assignee: Manik Surtani
> Fix For: 2.2.1.CR2, 2.2.1.GA, 3.0.0.ALPHA2, 3.0.0.GA
>
>
> From Bela's email:
> "At least in AbstractMarshaller:
> public byte[] objectToByteBuffer(Object obj) throws Exception
> {
> ByteArrayOutputStream baos = new ByteArrayOutputStream();
> ObjectOutputStream out = ObjectSerializationFactory.createObjectOutputStream(baos);
> objectToObjectStream(obj, out);
> out.close();
> return baos.toByteArray();
> }
> Here, an ExposedByteArrayOutputStream instead of a BAOS would prevent the COPY of the byte buffer. We also don't need to be concerned about reentrancy as the output streams are local (stack) variables...
> Maybe you guys should take a look at all occurrences of BAOS !"
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the jbosscache-issues
mailing list