Revised Jms2MessageProducerInvocationHandler implementation with switch statement

Issue: SPR-11950