This content has been marked as final.
Show 2 replies
-
1. Re: JBMESSAGING-1138 - Using Object lists on messages
timfox Nov 2, 2007 4:54 PM (in response to clebert.suconic)"clebert.suconic@jboss.com" wrote:
If you look at StreamUtils we are converting any List (or any Map) to ArrayList and HashMap.
that means if an user is using any special list (such as Vector, or any other custom lists) we are converting them to those maps.
Because of this, I'm changing MessageSupport::getPayloadAsByteArray to call Streamutils.writeObject with containerTypes=false.
I don't think that's a good fix.If you do that it's going to use Java serialization for other message types too.
We *only* want to use Java serialization for Object messages, not for other messages like map messages.
A better fix is to override getPayloadAsByteArray on the Objectmessage. -
2. Re: JBMESSAGING-1138 - Using Object lists on messages
timfox Nov 2, 2007 5:07 PM (in response to clebert.suconic)Better still create a method on MessageSupport doWrite(), that by default does:
StreamUtils.writeObject(daos, payload, true, true);
then override it on Object Message to do
StreamUtils.writeObject(daos, payload, false, true);
then you won't end up duplicating the getPayloadAsByteArray() logic