Thomas Harning wrote:
Is there any reasonable way to use Unix domain sockets w/ Mina (more
generally... Java).
AFAIK, AF_UNIX are not supported in Java. Maybe using the Apr PAI could
do the trick (
http://mina.apache.org/report/trunk/xref/org/apache/mina/transport/socket/apr/AprSession.html
http://mina.apache.org/report/trunk/xref/org/apache/mina/transport/socket/apr/AprSocketAcceptor.html,
http://mina.apache.org/report/trunk/xref/org/apache/mina/transport/socket/apr/AprSocketConnector.html
http://mina.apache.org/report/trunk/xref/org/apache/mina/transport/socket/apr/AprSocketSession.html
)
I have an application using Mina which sometimes needs to be restarted
for JAR updates and oftentimes (even if I perform cleanup) it has to
try ~40 times [about 1/2 - 2 minutes] to listen on a TCP port due to
the thread close problem.
You can also tune some linux/unix parameter like TCP_FIN_WAIt (from the
top of my head) to reduce the time during which the socket is still
open. Another option is to carefully close all the sockets when you stop
the server (which mean some programmatic handling of such a shutdown)
If unix-domain sockets are completely unavailable, is there a better
way to get the socket to unhook immediately....
None that I know... May be someone else does know ?
--
--
cordialement, regards,
Emmanuel Lécharny
www.iktek.com
directory.apache.org