try {
IDebugRequestMessage theMsg = (IDebugRequestMessage) request;
synchronized (byteArrayOutputStream) {
byteArrayOutputStream.reset();
theMsg.setID(lastRequestID++);
theMsg.serialize(dataOutputStream);
int messageSize = byteArrayOutputStream.size();
synchronized (connectionOut) {
requestsTable.put(theMsg.getID(), theMsg);
connectionOut.writeInt(messageSize);