Hi Everyone, can i have code of serverprogram which accepts several client connections using THREADPOOL concept,where each client send a file to server and server should respond to them with respective response file......i am asking like this because i am able to get several client request but i am not able to reply them back with the respective response files.....
views:
46answers:
1
A:
Most of modern J2EE application servers support that concept. Transform your application into a WAR and play with server thread pool/request time out settings.
UPDATE: If you don't like application servers, then use Executors utility class from JDK, create a new ExceutorService through that by wrapping your long running action into Runnable interface and creating a ThreadFactory for that, and then use awaitTermination method. If it returns false, then your thread encountered a time out and you can send some nice error message to your client.
Superfilin
2009-10-30 14:14:04
hiee guys actually even i tried to paste my code here but its is not allowing me to paste that much code....so i asked u for a server pgm which uses thread...mainly server should accept sum file like xml or text from several clients and that file should be processed and respective response files shuld b sent back to respective clients
2009-11-02 04:26:33
Sounds like a web server accepting HTTP GET/POST/PUT requests ;) Try tomcat, jetty, jboss, glassfish. It's very hard to give any advice here as you are not very descriptive about the actual problem you have.
Superfilin
2009-11-02 06:46:34