// We explicitly set the Marshaller since otherwise remoting tries to resolve the marshaller
// every time which is very slow - see org.jboss.remoting.transport.socket.ProcessInvocation
// This can make a massive difference on performance. We also do this in
// ServerConnectionEndpoint.setCallbackClient.
client.setMarshaller(new JMSWireFormat());
client.setUnMarshaller(new JMSWireFormat());
onewayClient.setMarshaller(new JMSWireFormat());
onewayClient.setUnMarshaller(new JMSWireFormat());
Map metadata = new HashMap();
metadata.put(InvokerLocator.DATATYPE, "jms");