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

            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

        }
        catch (AMQPInvalidClassException aice)
        {
            MessageFormatException mfe = new MessageFormatException(AMQPInvalidClassException.INVALID_OBJECT_MSG + (object == null ? "null" : object.getClass()));
            mfe.setLinkedException(aice);
            mfe.initCause(aice);
            throw mfe;
        }
    }

    public Set<String> getPropertyNames()
View Full Code Here

            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

            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

        if (msg == null || msg.length() == 0) {
            msg = cause.toString();
        }
        MessageFormatException exception = new MessageFormatException(msg);
        exception.setLinkedException(cause);
        exception.initCause(cause);
        return exception;
    }
}
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

                    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.