"manik.surtani(a)jboss.com" wrote :
| Or is there something clever in your MarshalledValue class that just passes the byte[]
payload in writeExternal()?
Here's what it does (I take no credit or blame; long predates me ;) )
| public void writeExternal(ObjectOutput out) throws IOException
| {
| int length = serializedForm != null ? serializedForm.length : 0;
| out.writeInt(length);
| if( length > 0 )
| {
| out.write(serializedForm); // this is a byte[] created in the c'tor
| }
| out.writeInt(hashCode);
| }
The class is in the AS server module, org.jboss.invocation.MarshalledValue. It was
originally written for use in remote invocations, and thus doesn't lazy-serialize.
When we started using it for caching, that IMHO was a mistake; we should have written a
version that has the behavior discussed on this thread.
anonymous wrote : Or any other JDK objects - Dates, etc.
Just have to be careful to exclude anything that can wrap a non-JDK type. Also can't
use instanceof in type checking.
Re: "releaseObjectReferences(fqn)" as the method name, sounds good. The
"flush" name was just me being lazy in my post. :)
+1 as well to having this be the default behavior.
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4115215#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...