Apache Directory Project - [jira] Commented: (DIRMINA-135) exception during a connector.connect() aren't caught b

This is Interesting: Free IT Magazines  
Home > Archive > Apache Directory Project > November 2005 > [jira] Commented: (DIRMINA-135) exception during a connector.connect() aren't caught b





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author [jira] Commented: (DIRMINA-135) exception during a connector.connect() aren't caught b
Trustin Lee (JIRA)

2005-11-30, 5:45 pm

[ http://issues.apache.org/jira/brows...action_12358918 ]

Trustin Lee commented on DIRMINA-135:
-------------------------------------

You can use a Callback in ConnectFuture instead. IoSession is not created if a connection is not established.

> exception during a connector.connect() aren't caught by filters
> ---------------------------------------------------------------
>
> Key: DIRMINA-135
> URL: http://issues.apache.org/jira/browse/DIRMINA-135
> Project: Directory MINA
> Type: Bug
> Versions: 0.8, 0.8.1, 0.8.2
> Environment: MINA 0.8 and a SocketConnector
> Reporter: Julien Vermillard
> Priority: Minor


>
> I try to do a reconnection filter, automaticly connecting and reconnecting a connector until it works.
> if theinitial connector.connect(...) fail, and exception is thrown, but it's not caught by IoFilter chain. It's not really a bug I think but I added a simple fix :
> in SocketConnector class in the connect method :
> public IoSession connect( SocketAddress address, SocketAddress localAddress,
> int timeout, IoHandler handler ) throws IOException
> I changed :
> ....
> if( request.exception != null )
> {
> ExceptionUtil.throwException( request.exception );
> }
> ....
> into
> ....
> if( request.exception != null )
> {
> filters.exceptionCaught(null,request.exception );
> ExceptionUtil.throwException( request.exception );
> }
> ....
> and now my filters get the exception normaly, perhaps it's an idea to add it to MINA 0.8 ?


--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secur...nistrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira


Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com