Exceptions in Thread
I have a program that creates and starts Threads that invokes a webservice..I just want to know if incase one Thread had an exception will it effect the processing of other threads, or it will effect the execution of the program?
here is my code (part of the program) that creates and starts the Threads:
while(rs.next()){
try{
Thread dbThread =new Thread();
dbThread =new querythread(key, rs.getString("db_name"), sessionid, rs.getString("ws_url"));
dbThread.start();
System.out.println("Send query thread to " + rs.getString("db_name"));
}catch (Exception e){}
}
here is my querythread:
publicclass querythreadextends Thread{
public querythread(String key,String db,String sessionid, String ws_url){
this.key=key;
this.db=db;
this.sessionid=sessionid;
this.ws_url=ws_url;
}
publicvoid run(){
Service service=new Service();
Call call;
call = (Call) service.createCall();
call.setTargetEndpointAddress(new URL(ws_url));
call.setOperationName(new QName("query"));
String[][] a=(String[][])call.invoke(new Object[]{new String(key),new String(db)});
}catch (ServiceException e){
System.out.println("Service Exception on "+ ws_url);
e.printStackTrace();
}catch (MalformedURLException e){
System.out.println("Service Exception on "+ ws_url);
e.printStackTrace();
}catch (RemoteException e){
System.out.println("Remote Exception on "+ ws_url);
e.printStackTrace();
}catch (InstantiationException e){
System.out.println("InstatiatioException on "+ ws_url);
e.printStackTrace();
}catch (IllegalAccessException e){
System.out.println("IllegalAccess Exception on "+ ws_url);
e.printStackTrace();
}catch (ClassNotFoundException e){
System.out.println("ClassNotFound Exception on "+ ws_url);
e.printStackTrace();
}catch (FileNotFoundException e){
System.out.println("FileNotFoundException on "+ ws_url);
e.printStackTrace();
}catch (IOException e){
System.out.println("IOException on "+ ws_url);
e.printStackTrace();
}
Thanks in advance for your help.

