Last version on trunk may have issues
Hi gys, yesturday I tried to fix the Datagram bug (DIRMINA-732). I think it works on linux, I have no idea for windows (if someone can give it a try), and I know it fails on Mac OSX. The problem is that if we register the 'any' address (0.0.0.0) on a datagram acceptor, and try to get a session from it, like the way it's done on the failng test : .. InetSocketAddress bindAddress = new InetSocketAddress( AvailablePortFinder.getNextAvailable()); acceptor.setHandler(new TestHandler()); acceptor.bind(bindAddress); IoSession session = acceptor.newSession(new InetSocketAddress( 127.0.0.1, AvailablePortFinder.getNextAvailable()), bindAddress); ... we get an error, as the bindAddress is considered as a Inet4Address, when the acceptor is bound on a Inet6Address. As we store the address in a hashMap to check if they are equals, we have an issue, because whatever you do, a Inet4Address will always be different from a Inet6Address; I hacked the code atrociously by using a String translation for this address, but it does not work on Mac. Now, I'm dubious about the test. Why should be grab a session from the acceptor ? If someone has some idea about what's wrong about this test, that would be great ! -- Regards, Cordialement, Emmanuel Lécharny www.nextury.com
Re: Last version on trunk may have issues
Will try this on W$ once I get back home in couple of hrs. thanks ashish On Fri, Feb 12, 2010 at 3:37 PM, Emmanuel Lecharny elecha...@gmail.com wrote: Hi gys, yesturday I tried to fix the Datagram bug (DIRMINA-732). I think it works on linux, I have no idea for windows (if someone can give it a try), and I know it fails on Mac OSX. The problem is that if we register the 'any' address (0.0.0.0) on a datagram acceptor, and try to get a session from it, like the way it's done on the failng test : .. InetSocketAddress bindAddress = new InetSocketAddress( AvailablePortFinder.getNextAvailable()); acceptor.setHandler(new TestHandler()); acceptor.bind(bindAddress); IoSession session = acceptor.newSession(new InetSocketAddress( 127.0.0.1, AvailablePortFinder.getNextAvailable()), bindAddress); ... we get an error, as the bindAddress is considered as a Inet4Address, when the acceptor is bound on a Inet6Address. As we store the address in a hashMap to check if they are equals, we have an issue, because whatever you do, a Inet4Address will always be different from a Inet6Address; I hacked the code atrociously by using a String translation for this address, but it does not work on Mac. Now, I'm dubious about the test. Why should be grab a session from the acceptor ? If someone has some idea about what's wrong about this test, that would be great ! -- Regards, Cordialement, Emmanuel Lécharny www.nextury.com -- thanks ashish Blog: http://www.ashishpaliwal.com/blog My Photo Galleries: http://www.pbase.com/ashishpaliwal
Re: Last version on trunk may have issues
Works on W$, the build is successful. Do you want me to try anything specific? thanks ashish On Fri, Feb 12, 2010 at 3:37 PM, Emmanuel Lecharny elecha...@gmail.com wrote: Hi gys, yesturday I tried to fix the Datagram bug (DIRMINA-732). I think it works on linux, I have no idea for windows (if someone can give it a try), and I know it fails on Mac OSX. The problem is that if we register the 'any' address (0.0.0.0) on a datagram acceptor, and try to get a session from it, like the way it's done on the failng test : .. InetSocketAddress bindAddress = new InetSocketAddress( AvailablePortFinder.getNextAvailable()); acceptor.setHandler(new TestHandler()); acceptor.bind(bindAddress); IoSession session = acceptor.newSession(new InetSocketAddress( 127.0.0.1, AvailablePortFinder.getNextAvailable()), bindAddress); ... we get an error, as the bindAddress is considered as a Inet4Address, when the acceptor is bound on a Inet6Address. As we store the address in a hashMap to check if they are equals, we have an issue, because whatever you do, a Inet4Address will always be different from a Inet6Address; I hacked the code atrociously by using a String translation for this address, but it does not work on Mac. Now, I'm dubious about the test. Why should be grab a session from the acceptor ? If someone has some idea about what's wrong about this test, that would be great ! -- Regards, Cordialement, Emmanuel Lécharny www.nextury.com
Re: Last version on trunk may have issues
On 2/12/10 3:32 PM, Ashish wrote: Works on W$, the build is successful. Do you want me to try anything specific? I have committed some more fix (Removal of CircularQueue from the code, as it's not thread safe). Can someone check the build on windows ? mvn clean instal -Pserial Thanks ! -- Regards, Cordialement, Emmanuel Lécharny www.nextury.com
Re: Last version on trunk may have issues
On Sat, Feb 13, 2010 at 12:00 AM, Emmanuel Lécharny elecha...@apache.org wrote: On 2/12/10 3:32 PM, Ashish wrote: Works on W$, the build is successful. Do you want me to try anything specific? I have committed some more fix (Removal of CircularQueue from the code, as it's not thread safe). Can someone check the build on windows ? mvn clean instal -Pserial Thanks ! Onto it :-)
Re: Last version on trunk may have issues
On Sat, Feb 13, 2010 at 12:00 AM, Emmanuel Lécharny elecha...@apache.org wrote: On 2/12/10 3:32 PM, Ashish wrote: Works on W$, the build is successful. Do you want me to try anything specific? I have committed some more fix (Removal of CircularQueue from the code, as it's not thread safe). Can someone check the build on windows ? mvn clean instal -Pserial Works fine with Java 6. Don't have Java 5, Oracle asks me fill a form to download it :-(, will try to get it and run the build Here is the summary [INFO] [INFO] Reactor Summary: [INFO] [INFO] Apache MINA ... SUCCESS [2.593s] [INFO] Apache MINA Legal . SUCCESS [1.844s] [INFO] Apache MINA Parent POM SUCCESS [1.000s] [INFO] Apache MINA Core .. SUCCESS [1:25.375 s] [INFO] Apache MINA APR Transport . SUCCESS [3.750s] [INFO] Apache MINA Compression Filter SUCCESS [4.312s] [INFO] Apache MINA State Machine . SUCCESS [6.203s] [INFO] Apache MINA JavaBeans Integration . SUCCESS [5.375s] [INFO] Apache MINA XBean Integration . SUCCESS [6.344s] [INFO] Apache MINA OGNL Integration .. SUCCESS [2.609s] [INFO] Apache MINA JMX Integration ... SUCCESS [1.922s] [INFO] Apache MINA Examples .. SUCCESS [9.407s] [INFO] Apache MINA Serial Communication support .. SUCCESS [2.578s] [INFO] [INFO] [INFO] BUILD SUCCESSFUL [INFO] [INFO] Total time: 2 minutes 14 seconds [INFO] Finished at: Sat Feb 13 10:20:44 IST 2010 [INFO] Final Memory: 56M/63M [INFO] thanks ashish