Janhavi,
It is also important to make sure that when ever you get JMS Exceptions, you obtain the linked Exception as well like
exception.getLinkedException()
This will give the specific error code, with which you will come to know the exact mq exception cause by looking up the mqrc details.
Thanks.