You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@synapse.apache.org by indika kumara <in...@gmail.com> on 2011/04/01 13:40:41 UTC

Re: CacheMediator - Why the SOAPEnvelope is cloned before serialization

Heshan,  I think you are correct. BTW, there is a method called
'serializeWithoutConsume' (Axom) . I may be more efficient than clone +
serialization.  In one location, the serialization to bytes is done for
replication purpose. In that case, we may be able to delay the serialization
and do later it on-demand when do the replication. That would avoid the
bytes to SOAP conversion when serving a request from the cached responses.
I could be wrong as I just browsed the code without paying much attention.

~ Indika

On Thu, Mar 31, 2011 at 8:32 PM, Heshan Suriyaarachchi <
heshan.suriyaarachchi@gmail.com> wrote:

> Hi Devs,
>
> In the CacheMediator we serialize the SOAPEnvelope after we clone it. So,
> I'm thinking the reason behind having it that way is to stop the content
> being lost after the serialization is done.
>
> MessageHelper.cloneSOAPEnvelope(synCtx.getEnvelope()).serialize(fbaos);
>
> So, can someone shed some light into why we have it that way? Correct me if
> I am wrong.
>
> --
> Regards,
> Heshan Suriyaarachchi
>
> http://heshans.blogspot.com/
>