/** * no need to synchronize any block in this method, as it is already synchronized on _srv since * it's only called by the <CODE>_srv.addNewWorkerConnection(s)</CODE> method. * * @throws IOException */ private void init() throws IOException { // wait until the _initCmd is ready, and send it over the socket while (_initCmd == null) { try { utils.Messenger.getInstance() .msg( "PDBTExecSingleCltWrkInitSrv.PDBTEW2Listener.init(): " + "W2Thread waiting on server to obtain init_cmd from client...", 1); _srv.wait(); // the thread calling this method is already synchronized on _srv. } catch (InterruptedException e) { // e.printStackTrace(); Thread.currentThread().interrupt(); } } _oos.writeObject(_initCmd); _oos.flush(); utils.Messenger.getInstance() .msg("PDBTExecSingleCltWrkInitSrv.PDBTEW2Listener.init(): done.", 1); }