Refactoring the JMS implementation to use marshalling.

AFDP-92