You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@mina.apache.org by boB Gage <bg...@ekosystems.com> on 2008/11/21 16:19:57 UTC
IoSession's getConfig() returning same object for multiple sessions
I am trying to maintain several IoSession to different devices, using
different protocols all at the same time. However, when I set the
Reader Idle time for any one session it affects all sessions.
Debugging has revealed that IoSession.getConfig() is returning the same
IoSessionConfig object when called from multiple IoSessions.
I put a debug line similar to:
logger.debug("Session ["+session.getId()+"], Config
["+session.getConfig()+"]");
just inside my ProtocolHandler object (extends IoHandlerAdapter)
methods: sessionOpened(), sessionClosed(), exceptionCaught(), and
messageReceived().
Three different IoSessions are opened, using three different protocol
handlers all descended from the above object. The debug reveals the
same session.getConfig() result even while reporting different
session.getId() results.
Thanks in advance!!
boB
Re: IoSession's getConfig() returning same object for multiple sessions
Posted by Emmanuel Lecharny <el...@gmail.com>.
boB Gage wrote:
> I am trying to maintain several IoSession to different devices, using
> different protocols all at the same time. However, when I set the
> Reader Idle time for any one session it affects all sessions.
>
> Debugging has revealed that IoSession.getConfig() is returning the
> same IoSessionConfig object when called from multiple IoSessions.
>
> I put a debug line similar to:
> logger.debug("Session ["+session.getId()+"], Config
> ["+session.getConfig()+"]");
> just inside my ProtocolHandler object (extends IoHandlerAdapter)
> methods: sessionOpened(), sessionClosed(), exceptionCaught(), and
> messageReceived().
>
> Three different IoSessions are opened, using three different protocol
> handlers all descended from the above object. The debug reveals the
> same session.getConfig() result even while reporting different
> session.getId() results.
Yep, this is a known issue. There is more : this IoSessionConfig is set
up statically, using a socket and a serverSocket to determinate the OS
network layer capacity, which is a really bad idea when running an
application based on MINA in a brwoser (applet) or on Vista (which is
pretty picky when it comes to allow resource usage...).
We are working on fixing this.
Thanks !
--
--
cordialement, regards,
Emmanuel Lécharny
www.iktek.com
directory.apache.org