Re: Tutorial on ProtocolCodecFilter, state and threads

2007-07-28 Thread Adam Fisk
Belated thanks! -Adam On 7/16/07, Maarten Bosteels <[EMAIL PROTECTED]> wrote: > > Adam, Trustin, > > I added your comments to the tutorial. > > Maarten > > On 7/16/07, Trustin Lee <[EMAIL PROTECTED]> wrote: > > > > Hi Adam, > > > > On 6/23/07, Adam Fisk <[EMAIL PROTECTED]> wrote: > > > That's al

Re: Tutorial on ProtocolCodecFilter, state and threads

2007-07-16 Thread Trustin Lee
On 7/16/07, Maarten Bosteels <[EMAIL PROTECTED]> wrote: Adam, Trustin, I added your comments to the tutorial. Thanks, Maarten! Trustin -- what we call human nature is actually human habit -- http://gleamynode.net/ -- PGP Key ID: 0x0255ECA6

Re: Tutorial on ProtocolCodecFilter, state and threads

2007-07-16 Thread Maarten Bosteels
Adam, Trustin, I added your comments to the tutorial. Maarten On 7/16/07, Trustin Lee <[EMAIL PROTECTED]> wrote: Hi Adam, On 6/23/07, Adam Fisk <[EMAIL PROTECTED]> wrote: > That's also how AsyncWeb is implemented, incidentally, with a separate > encoder and decoder stored as a session attrib

Re: Tutorial on ProtocolCodecFilter, state and threads

2007-07-16 Thread Trustin Lee
Hi Adam, On 6/23/07, Adam Fisk <[EMAIL PROTECTED]> wrote: That's also how AsyncWeb is implemented, incidentally, with a separate encoder and decoder stored as a session attribute for each session. The code for HttpServerCodecFactory does this with the following: public ProtocolDecoder getDec

Re: Tutorial on ProtocolCodecFilter, state and threads

2007-07-12 Thread Adam Fisk
Anyone else have thoughts on this issue? It still seems like a key part of understanding MINA, and I do think the Maarten's overall excellent and very helpful tutorial is misleading as it stands on this point. -Adam On 6/23/07, Maarten Bosteels <[EMAIL PROTECTED]> wrote: On 6/23/07, Adam Fis

Re: Tutorial on ProtocolCodecFilter, state and threads

2007-06-23 Thread Maarten Bosteels
On 6/23/07, Adam Fisk <[EMAIL PROTECTED]> wrote: Hi Maarten- Thanks for the link to that discussion thread. It seems like there's quite a bit of confusion on this point, though. The thread really didn't reach a common consensus in my reading of it. > Indeed, I want thread-2 to see the chang

Re: Tutorial on ProtocolCodecFilter, state and threads

2007-06-22 Thread Adam Fisk
That's also how AsyncWeb is implemented, incidentally, with a separate encoder and decoder stored as a session attribute for each session. The code for HttpServerCodecFactory does this with the following: public ProtocolDecoder getDecoder() throws Exception { (topLevelState creation omitted)

Re: Tutorial on ProtocolCodecFilter, state and threads

2007-06-22 Thread Adam Fisk
Hi Maarten- Thanks for the link to that discussion thread. It seems like there's quite a bit of confusion on this point, though. The thread really didn't reach a common consensus in my reading of it. Indeed, I want thread-2 to see the changes made by thread-1. But without synchronization, th

Re: Tutorial on ProtocolCodecFilter, state and threads

2007-06-22 Thread Maarten Bosteels
On 6/22/07, Adam Fisk <[EMAIL PROTECTED]> wrote: Thanks for getting back to me Maarten. Responses inline. > It's not because thread-1 has finished its decode call before thread-2 > starts handling more data, > that thread-2- will "see" the changes to the decoderState made by > thread-1. > Thi

Re: Tutorial on ProtocolCodecFilter, state and threads

2007-06-22 Thread Adam Fisk
Thanks for getting back to me Maarten. Responses inline. It's not because thread-1 has finished its decode call before thread-2 starts handling more data, that thread-2- will "see" the changes to the decoderState made by thread-1. This is a consequence of The Java Memory Model (do a google sea

Re: Tutorial on ProtocolCodecFilter, state and threads

2007-06-22 Thread Maarten Bosteels
Hello Adam, On 6/22/07, Adam Fisk <[EMAIL PROTECTED]> wrote: I've got a quick question for Maarten and anyone else on the snippet on threads and IoSession attributes from tutorial on ProtocolCodecFilter. The tutorial reads as follows: --- start quote -- "We store the state of the decoding pro

Tutorial on ProtocolCodecFilter, state and threads

2007-06-22 Thread Adam Fisk
I've got a quick question for Maarten and anyone else on the snippet on threads and IoSession attributes from tutorial on ProtocolCodecFilter. The tutorial reads as follows: --- start quote -- "We store the state of the decoding process in a session attribute. It would also be possible to store