private void startMigrating(Socket socket, MigratableProcess process, String hostName) throws IOException {
    	ObjectOutputStream out = new ObjectOutputStream(socket.getOutputStream());
    	DataInputStream in = new DataInputStream(socket.getInputStream());
        boolean status = false;
        try {    	
            out.writeObject(process);
            status = in.readBoolean();
        }
    	catch (IOException e1) {
    		LOG.error(process.getClass().getSimpleName() +
                    "[" + process.getId() + "] migration error", e1);
    		restartProcess(process);
        	socket.close();
        	return;
    	}
        if (status) {
            System.out.println("Successfully migrated " +
                    process.getClass().getSimpleName() +
                    "[" + process.getId() + "]");
        } 
        else {
            System.out.println("Failed to migrate " +
                    process.getClass().getSimpleName() +
                    "[" + process.getId() + "]");
    		restartProcess(process);
        }
        try {
            in.close();
            out.close();
        }
        catch (IOException e) {
	        System.out.println("file close failed: " +
	                e.getMessage());
        }
        socket.close();
    }