directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Samuel Doyle <sdoyl...@yahoo.com>
Subject Re: [mina] Can you use the same SessionHandler multiple times??
Date Wed, 01 Feb 2006 17:09:47 GMT
Thanks, any instance specific information I need is
only related t o the session. Now, that code snippet I
included is residing in mina which is also acting as a
server so it is basically a gateway for routing in a
sense. Is what I'm doing in that example the correct
Mina way?

Thanks, S.D.

--- Trustin Lee <trustin@gmail.com> wrote:

> Hi Samuel,
> 
> 2006/2/1, Samuel Doyle <sdoyle_2@yahoo.com>:
> >
> > If I'm opening up multiple persistent connections
> to
> > say two hosts can I use the same session handler
> > multiple times or do I need to create a new
> instance.
> > For example:
> 
> 
> <snip/>
> 
> Do I need to keep doing
> >    sessionHandler = new MYSessionHandler( );
> > within the loop or just doing it once outside is
> fine?
> 
> 
> It depends on your implementation.  If you store any
> stateful information as
> an instance member, you should do it inside the
> loop.  Otherwise, it's OK to
> do it only once.  In most cases, once is sufficient.
> 
> HTH,
> Trustin
> --
> what we call human nature is actually human habit
> --
> http://gleamynode.net/
> PGP Key ID: 0x854B996C
> 


Mime
View raw message