On 5/4/07, Zheng, Chuck <[EMAIL PROTECTED]> wrote:
Hi Trustin,
Thx for the reply. We need to be able to change the timeout value at runtime
via config bean. Does IoSession.setIdleTime(IdleStatus, idleTime) calls
java.net.Socket.setSoTimeout() - which takes millisecond according to the
javadoc. what limits MINA to use only seconds?
MINA uses non-blocking mode. SO_TIMEOUT cannot be used.
I've also having problems with connect timeout and retry with MINA 1.1.0
code base. I've set ( ( IoConnectorConfig )
connector.getDefaultConfig()).setConnectTimeout( 2 ); for 2 second. And here
are the problems:
1. I saw a ConnectException thrown by sun.nio.SocketChannelImpl during
MINA's SocketConnector.processSessions()'s invocation to
SocketChannel.finishConnect(). The ConnectException is eventually set to
ConnectionRequest, but I don not see how it is propgated to either of
- the caller of Connector.connect
- my IoHandler
- my IoServiceListener
How and where does MINA deliver this Connect timeout exception to
application? Without this info, How do I retry?
ConnectException is not propagated to IoHandler because the session is
not even created. A ConnectFuture instance is returned when you call
connect() method. You can get the result of the connection attempt
using the returned future.
2. the SocketConnector stuck in Running mode, but no event to IoHandler at
all. The JVM appears "hung"
Please explain us how to reproduce the problem in detail.
3. which I also need to lower to 800ms (changable at runtime via config
bean).
Well, you will have to choose proper scheduler library to implement
such timeout feature.
HTH,
Trustin
--
what we call human nature is actually human habit
--
http://gleamynode.net/
--
PGP Key ID: 0x0255ECA6