try
{
jmsMessage = session.createMessage();
jmsMessage.setStringProperty(DistributedTestConstants.MSG_COMMAND_PROPERTY, command.getType().name());
final JsonHandler jsonHandler = new JsonHandler();
jmsMessage.setStringProperty(DistributedTestConstants.MSG_JSON_PROPERTY, jsonHandler.marshall(command));
}
catch (final JMSException jmse)
{
throw new DistributedTestException("Unable to convert command " + command + " to JMS Message", jmse);
}