protected void checkBodyReadable ( String callingMethodName ) throws MessageNotReadableException { if ( ! bodyReadOnly ) { throw ( javax . jms . MessageNotReadableException ) JmsErrorUtils . newThrowable ( javax . jms . MessageNotReadableException . class , "WRITE_ONLY_MESSAGE_BODY_CWSIA0109" , new Object [ ] { callingMethodName } , tc ) ; } }
If the message body is write - only throw a MessageNotReadableException .