I use tomcat 5.5.9 with J2SE 5.0 Update 4. My web application involves opening a tcp socket connection with an external server and closing it at logout. I find that when using tomcat as a service using tomcat5.exe, after 2000 uses (login followed by logout which is open the socket connection followed by close the socket connection), I cannot make a socket connection anymore with the external server. But if I start tomcat using startup.bat, there seems to be no problem even after 5000 uses. Why am I observing such a behavior?
I don't know, but the fact you get it only as a Windows service points to that mechanism, rather than Tomcat itself, being the culprit. Try to the user mailing list, maybe someone there could help more.