Package javax.jms

Examples of javax.jms.MessageFormatException.initCause()


            try {
                payload = context.getTypeConverter().mandatoryConvertTo(Serializable.class, exchange, body);
            } catch (NoTypeConversionAvailableException e) {
                // cannot convert to serializable then thrown an exception to avoid sending a null message
                JMSException cause = new MessageFormatException(e.getMessage());
                cause.initCause(e);
                throw cause;
            }
            return session.createObjectMessage(payload);
        default:
            break;
View Full Code Here


                    Serializable payload = context.getTypeConverter().mandatoryConvertTo(Serializable.class, exchange, body);
                    message.setObject(payload);
                } catch (NoTypeConversionAvailableException e) {
                    // cannot convert to serializable then thrown an exception to avoid sending a null message
                    JMSException cause = new MessageFormatException(e.getMessage());
                    cause.initCause(e);
                    throw cause;
                }
            }
            return message;
        default:
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.