directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Trustin Lee <trus...@gmail.com>
Subject Re: [mina] Can you use the same SessionHandler multiple times??
Date Wed, 01 Feb 2006 14:42:10 GMT
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