Vivek Pandey wrote:
> I would thnik so, otherwise we need to create new transport pipe for
> every request.
They already have to manage multiple pipelines anyway, so I don't think
it's too much trouble for them to manage multiple encoders/decoders.
And I thought it does allow encoder/decoder to reuse some of the most
costly objects.
Besides, some transport are single-threaded (such as an e-mail transport
based on POP3), so I think it makes a good design sense to make them
non-reentrant.
I think what we need is a clone method on pipe, encoder, and decoder, so
that whoever invokes the pipe can clone it if necessary.
--
Kohsuke Kawaguchi
Sun Microsystems kohsuke.kawaguchi_at_sun.com