directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Trustin Lee <>
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 <>:
> 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:


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.

what we call human nature is actually human habit
PGP Key ID: 0x854B996C

View raw message