Re: [JBoss-dev] MarshalledValue
I didn't make this change so I don't know why it was done. This is not how MarshalledValue is coded in 3.2 so change it to the 3.2 version which still has the serializedForm setup in the ctor. Scott Stark Chief Technology Officer JBoss Group, LLC - Original Message - From: Dain Sundstrom [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Saturday, March 08, 2003 4:53 PM Subject: Re: [JBoss-dev] MarshalledValue Scott what is the deal with this? Can I make this change? -dain On Monday, March 3, 2003, at 04:16 AM, Alex Loubyansky wrote: MarshalledValue's constructor is public MarshalledValue(Object obj) throws IOException { baos = new ByteArrayOutputStream(); MarshalledValueOutputStream mvos = new MarshalledValueOutputStream(baos); mvos.writeObject(obj); mvos.flush(); isHashComputed = false; } Here is get(): public Object get() throws IOException, ClassNotFoundException { if (serializedForm == null) return null; ByteArrayInputStream bais = new ByteArrayInputStream(serializedForm); MarshalledValueInputStream mvis = new MarshalledValueInputStream(bais); return mvis.readObject(); } Should the constructor include the line serializedForm = baos.toByteArray(); ? searializedForm is initialized only in readExternal(). Thus, for instances constructed with 'new MarshalledValue(obj)' all the methods except for readExternal/writeExternal are broken. Or am I missing something? PS: this is for all MarshalledValue's in invocation.*, aop.* and interception.*. Thanks, alex --- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf ___ Jboss-development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development --- This SF.net email is sponsored by: Etnus, makers of TotalView, The debugger for complex code. Debugging C/C++ programs can leave you feeling lost and disoriented. TotalView can help you find your way. Available on major UNIX and Linux platforms. Try it free. www.etnus.com ___ Jboss-development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development --- This SF.net email is sponsored by: Etnus, makers of TotalView, The debugger for complex code. Debugging C/C++ programs can leave you feeling lost and disoriented. TotalView can help you find your way. Available on major UNIX and Linux platforms. Try it free. www.etnus.com ___ Jboss-development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development
Re: [JBoss-dev] MarshalledValue
I'll take a look at 3.2. I think the problem is we keep both the ByteArrayOutputStream and the byte[] in the class, which ends up with two copies of the byte array in memory. I'll see what I can do. -dain On Sunday, March 9, 2003, at 10:34 AM, Scott M Stark wrote: I didn't make this change so I don't know why it was done. This is not how MarshalledValue is coded in 3.2 so change it to the 3.2 version which still has the serializedForm setup in the ctor. Scott Stark Chief Technology Officer JBoss Group, LLC - Original Message - From: Dain Sundstrom [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Saturday, March 08, 2003 4:53 PM Subject: Re: [JBoss-dev] MarshalledValue Scott what is the deal with this? Can I make this change? -dain On Monday, March 3, 2003, at 04:16 AM, Alex Loubyansky wrote: MarshalledValue's constructor is public MarshalledValue(Object obj) throws IOException { baos = new ByteArrayOutputStream(); MarshalledValueOutputStream mvos = new MarshalledValueOutputStream(baos); mvos.writeObject(obj); mvos.flush(); isHashComputed = false; } Here is get(): public Object get() throws IOException, ClassNotFoundException { if (serializedForm == null) return null; ByteArrayInputStream bais = new ByteArrayInputStream(serializedForm); MarshalledValueInputStream mvis = new MarshalledValueInputStream(bais); return mvis.readObject(); } Should the constructor include the line serializedForm = baos.toByteArray(); ? searializedForm is initialized only in readExternal(). Thus, for instances constructed with 'new MarshalledValue(obj)' all the methods except for readExternal/writeExternal are broken. Or am I missing something? PS: this is for all MarshalledValue's in invocation.*, aop.* and interception.*. Thanks, alex --- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf ___ Jboss-development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development --- This SF.net email is sponsored by: Etnus, makers of TotalView, The debugger for complex code. Debugging C/C++ programs can leave you feeling lost and disoriented. TotalView can help you find your way. Available on major UNIX and Linux platforms. Try it free. www.etnus.com ___ Jboss-development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development --- This SF.net email is sponsored by: Etnus, makers of TotalView, The debugger for complex code. Debugging C/C++ programs can leave you feeling lost and disoriented. TotalView can help you find your way. Available on major UNIX and Linux platforms. Try it free. www.etnus.com ___ Jboss-development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development --- This SF.net email is sponsored by: Etnus, makers of TotalView, The debugger for complex code. Debugging C/C++ programs can leave you feeling lost and disoriented. TotalView can help you find your way. Available on major UNIX and Linux platforms. Try it free. www.etnus.com ___ Jboss-development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development
Re: [JBoss-dev] MarshalledValue
Scott what is the deal with this? Can I make this change? -dain On Monday, March 3, 2003, at 04:16 AM, Alex Loubyansky wrote: MarshalledValue's constructor is public MarshalledValue(Object obj) throws IOException { baos = new ByteArrayOutputStream(); MarshalledValueOutputStream mvos = new MarshalledValueOutputStream(baos); mvos.writeObject(obj); mvos.flush(); isHashComputed = false; } Here is get(): public Object get() throws IOException, ClassNotFoundException { if (serializedForm == null) return null; ByteArrayInputStream bais = new ByteArrayInputStream(serializedForm); MarshalledValueInputStream mvis = new MarshalledValueInputStream(bais); return mvis.readObject(); } Should the constructor include the line serializedForm = baos.toByteArray(); ? searializedForm is initialized only in readExternal(). Thus, for instances constructed with 'new MarshalledValue(obj)' all the methods except for readExternal/writeExternal are broken. Or am I missing something? PS: this is for all MarshalledValue's in invocation.*, aop.* and interception.*. Thanks, alex --- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf ___ Jboss-development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development --- This SF.net email is sponsored by: Etnus, makers of TotalView, The debugger for complex code. Debugging C/C++ programs can leave you feeling lost and disoriented. TotalView can help you find your way. Available on major UNIX and Linux platforms. Try it free. www.etnus.com ___ Jboss-development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development
[JBoss-dev] MarshalledValue
MarshalledValue's constructor is public MarshalledValue(Object obj) throws IOException { baos = new ByteArrayOutputStream(); MarshalledValueOutputStream mvos = new MarshalledValueOutputStream(baos); mvos.writeObject(obj); mvos.flush(); isHashComputed = false; } Here is get(): public Object get() throws IOException, ClassNotFoundException { if (serializedForm == null) return null; ByteArrayInputStream bais = new ByteArrayInputStream(serializedForm); MarshalledValueInputStream mvis = new MarshalledValueInputStream(bais); return mvis.readObject(); } Should the constructor include the line serializedForm = baos.toByteArray(); ? searializedForm is initialized only in readExternal(). Thus, for instances constructed with 'new MarshalledValue(obj)' all the methods except for readExternal/writeExternal are broken. Or am I missing something? PS: this is for all MarshalledValue's in invocation.*, aop.* and interception.*. Thanks, alex --- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf ___ Jboss-development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development