You should just instantiate DoComms with every previous connection you get. Say, something like this:
DoComms conn_c = new DoComms(server, con);
That way DoComms will be able to hold a reference to that connection for use later.
But always make sure that after getting the connection, you also close it in the finally block before instantiating your DoComms objects. So, once you finish processing everything, get to closing your connection like this:
try {
// get connection
// do stuff in threads
}
catch {
// handle
}
finally {
con.close();
}
And, for long-lived applications, use connection-pooling (e.g. C3P0 or Apache DBCP) to open/close connections as and when required. Although, that entirely depends on if the requirements of your application really need something like that.