Hi,

there are a few problematic JIRA's related to the way those classes are implemented. Mainly people are complaining on Vista and also when MINA is used inside an applet, that it creates some ServerSocket and a Socket in order to define the default socket/datagram configuration on the system those applications are running on.

Despite the fact that this test is done in order to provide a set of default values, it does more harm than it helps, as it's pretty intrusive. We have to find a better way to do that, or may be remove this feature from the framework.

Last, not least, it does not deal with ServerSocket options, which are a sub-set of the Socket options (and I'm not sure MINA 2 covers all the socket options anyway).

Here are the options supported by Socket/ServerSocket/Datagram on java 1.5 :

Datagram
--------
SO_BROADCAST
SO_RCVBUF
SO_REUSEADDR
SO_SNDBUF
SO_TIMEOUT
IP_TOS

Socket
------
SO_KEEPALIVE
SO_OOBINLINE
SO_RCVBUF
SO_REUSEADDR
SO_SNDBUF
SO_LINGER
SO_TIMEOUT
TCP_NODELAY
IP_TOS

ServerSocket
------------
SO_RCVBUF
SO_REUSEADDR
SO_TIMEOUT


As we need an existing socket to check this socket capability, the current framework tries to create such a socket/datagram, and check for the default options, setting some booleans accordingly. We can do it the same way but on the first created socket, and stores the result in static parameters. We just have to define a single boolean (configInitialized) which will be turned to true as soon as we have created the first socket/datagram/serverSocket. Of course, this part must be synchronized.

Anyone has a better idea ?

--
--
cordialement, regards,
Emmanuel Lécharny
www.iktek.com
directory.apache.org


Reply via email to