Ok! Porting done to MINA 2.0 M6

Porting was easy. The thread didn't had answer to why an Agent need
access to Logger?
So, if we use MINA Transport mapping, we will definitely need SLF4J,
and that shouldn't be an issue :-)

Should I change this code

ConnectFuture cf = connector.connect(new
InetSocketAddress(getAddress().getInetAddress(),
getAddress().getPort()));
        cf.awaitUninterruptibly();

to

for (;;) {
              try {
                  ConnectFuture future = connector.connect(new
InetSocketAddress(
                          HetAddress().getInetAddress(),
getAddress().getPort()));
                  future.awaitUninterruptibly();
                  session = future.getSession();
                  break;
              } catch (RuntimeIoException e) {
                  System.err.println("Failed to connect.");
                  e.printStackTrace();
              }
          }


Will test this tomorrow. Not sure if SNMP4J guys have any test suite for this

thanks
ashish

On Fri, Sep 11, 2009 at 7:42 PM, Julien Vermillard
<[email protected]> wrote:
> Le Fri, 11 Sep 2009 19:35:49 +0530,
> Ashish <[email protected]> a écrit :
>
>> On Fri, Sep 11, 2009 at 7:26 PM, Julien Vermillard
>> <[email protected]> wrote:
>> > Le Fri, 11 Sep 2009 19:08:49 +0530,
>> > Ashish <[email protected]> a écrit :
>> >> >
>> >> > Here a MINA based transport for SNMP4J :
>> >> > http://people.apache.org/~jvermillard/snmp4j/
>> >> >
>> >> > Julien
>> >>
>> >> Interesting. Never knew it existed :-)
>> >>
>> >> Great work. I would love to use it. The most interesting part
>> >> would be to benchmark the two implementations.
>> >> A good topic to write about :-)
>> >>
>> > Wowow a possible user ;)
>> > Perhaps you'll need to fix the code for use latest MINA 2, but it's
>> > probably trivial.
>> >
>> > Julien
>>
>>
>> Yes I would be very keen on using this.
>> By any chance, do SNMP4J guys know about this? I read that they were
>> looking for porting their lib to NIO.
>>
>> As I write this mail, I am integrating your code in SNMP4J code on my
>> machine. Once I am done, will definitely blog about this.
>>
> Here the thread on SMP4J ML (was crossposted to mina-dev)
> http://lists.agentpp.org/pipermail/snmp4j/2008-May/002935.html
> Julien
>



-- 
thanks
ashish

Blog: http://www.ashishpaliwal.com/blog
My Photo Galleries: http://www.pbase.com/ashishpaliwal

Reply via email to