public void run() {
        try {
            //System.out.println("Executing DispatchTask" + msg);
            long oid = msg.getLongProperty(JMSRemoteSystem.MSG_PROP_OBJECT);
            long requestId = -1;
            if (!oneway) {
                requestId = msg.getLongProperty(JMSRemoteSystem.MSG_PROP_REQUEST);
            }

            Skeleton exportedObject = remoteSystem.exportedSkeletonsById.get(oid);
            Response response = null;
            Request request = null;
            if (exportedObject == null) {
                response = new Response(requestId, null, new NoSuchObjectException("" + oid));
            } else {
                try {
                    Thread.currentThread().setContextClassLoader(remoteSystem.getUserClassLoader(this));
                    request = (Request) (msg).getObject();
                    response = exportedObject.invoke(request);
                } catch (Throwable thrown) {
                    System.err.println("Error in rmi dispatch for " + exportedObject + "-" + exportedObject.getTargetClassLoader() + " / " + remoteSystem.getUserClassLoader());
                    thrown.printStackTrace();
                    
                    response = new Response(requestId, null, thrown);
                }
            }

            if (!oneway) {
                remoteSystem.sendResponse(msg, response);
            } else {
                if (response.exception != null) {
                    response.exception.printStackTrace();
                }
            }
        } catch (JMSException e) {
            // The request message must not have been properly created.. ignore for now.
            e.printStackTrace();
        } catch (Throwable thrown) {
            thrown.printStackTrace();
        }
    }