Running server app without timing out?

Hello all,I have a server application running on a linux server and am timing out after about 15 minutes. I do not know how to make this server program run indefinately. It is an application that listens for clients and responds appropriately. Any ideas?Thanks,Jared
[294 byte] By [jared_scotta] at [2007-9-19]
# 1

Here is my code if it helps. If I should post this to a different forum would someone please tell me.

NOTE: The app is running perfectly it just stops running after a time frame.

CODE:

public class MyServerApp{

//...variable delaration etc.

try{

server = new ServerSocket(5252);//listen to the socket

//tried without this, with it set to 0, and with this number

//server.setSoTimeout(360000000);

}catch(IOException e){

System.exit(-1);

}

while(true){

MyConnectionThread w;//thread that handles communication

try{

w = new MyConnectionThread(server.accept());//receive new client

Thread t = new Thread(w);//create new thread with our handler

t.start();//start new thread

} catch (IOException e) {

System.exit(-1);

}

}

}

//...clean up

}

class MyConnectionThread implements Runnable{//communication handler

//...

public void run(){//when run

//...variable declaration etc.

try{

//get streams from client socket

in = new BufferedReader(new InputStreamReader(client.getInputStream()));

out = new ObjectOutputStream(client.getOutputStream());

} catch (IOException e) {...}

while(true){

try{

line = in.readLine();//get data from client

out.writeBoolean(true);//test to see if running

out.flush();//flush information

break;//break out of loop

}catch(IOException e){break;}

}

try{//clean up

in.close();

out.close();

}catch(Exception e){...}

}

//...other functions

}

Hope you can help me from here. I am running it on a linux server.

jared_scotta at 2007-7-8 > top of java,Enterprise & Remote Computing,Web Tier APIs...