Package javax.jms

Examples of javax.jms.MessageFormatException.initCause()


        }
        catch (IndexOutOfBoundsException e)
        {
            MessageFormatException ex = new MessageFormatException(
                    "Error getting ListMessage element at " + index);
            ex.initCause(e);
            ex.setLinkedException(e);
            throw ex;
        }
    }
View Full Code Here


        }
        catch (IndexOutOfBoundsException e)
        {
            MessageFormatException ex = new MessageFormatException(
                    "Error removing ListMessage element at " + index);
            ex.initCause(e);
            ex.setLinkedException(e);
            throw ex;
        }
    }
View Full Code Here

        }
        catch (Exception e)
        {
            MessageFormatException ex = new MessageFormatException(
                    "Error setting ListMessage element at " + index);
            ex.initCause(e);
            ex.setLinkedException(e);
            throw ex;
        }
    }
View Full Code Here

            return _list.add(a);
        }
        catch (Exception e)
        {
            MessageFormatException ex = new MessageFormatException("Error adding to ListMessage");
            ex.initCause(e);
            ex.setLinkedException(e);
            throw ex;

        }
    }
View Full Code Here

        }
        catch (Exception e)
        {
            MessageFormatException ex = new MessageFormatException("Error adding to ListMessage at "
                    + index);
            ex.initCause(e);
            ex.setLinkedException(e);
            throw ex;
        }
    }
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

                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 boolean itemExists(String string) throws JMSException
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;
    }
   
    public static InvalidSelectorException createInvalidSelectorException(Exception e) {
        InvalidSelectorException se = new InvalidSelectorException(e.getMessage());
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.