refactoring read/write jms text into MessageImpl