objectInputStream = new ObjectInputStream(
new ByteArrayInputStream(serializedMessageContext));
System.out.println("Worker thread restoring message context from byte array");
reconstitutedMessageContext = (MessageContext)objectInputStream.readObject();
reconstitutedMessageContext.activate(configurationContext);
} else if (msgContext != null) {
System.out.println("Worker thread using message context");
reconstitutedMessageContext = msgContext;
}