jms, refactoring