Package javax.jms

Examples of javax.jms.JMSException.initCause()


                    return t;
                }
                catch(Exception e)
                {
                    JMSException ex = new JMSException("Error creating durable topic");
                    ex.initCause(e);
                    ex.setLinkedException(e);
                    throw ex;
                }
            }
            else
View Full Code Here


        }
        catch (Exception e)
        {
            JMSException jmse = new JMSException("Error creating connection: " + e.getMessage());
            jmse.setLinkedException(e);
            jmse.initCause(e);
            throw jmse;
        }
    }

    public Connection createConnection(String userName, String password) throws JMSException
View Full Code Here

            }
            catch (Exception e)
            {
                JMSException jmse = new JMSException("Error creating connection: " + e.getMessage());
                jmse.setLinkedException(e);
                jmse.initCause(e);
                throw jmse;
            }
        }
        else
        {
View Full Code Here

        }
        catch (Exception e)
        {
            JMSException jmse = new JMSException("Error creating connection: " + e.getMessage());
            jmse.setLinkedException(e);
            jmse.initCause(e);
            throw jmse;
        }
    }

    /**
 
View Full Code Here

            }
            catch (Exception e)
            {
                JMSException jmse = new JMSException("Error creating XA Connection: " + e.getMessage());
                jmse.setLinkedException(e);
                jmse.initCause(e);
                throw jmse;
            }
        }
        else
        {
View Full Code Here

    {
        // errors are passed via the queue too since there is no way of interrupting the poll() via the API.
        if (o instanceof Throwable)
        {
            JMSException e = new JMSException("Message consumer forcibly closed due to error: " + o);
            e.initCause((Throwable) o);
            if (o instanceof Exception)
            {
                e.setLinkedException((Exception) o);
            }
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

                byteArrayFieldInputStream.close();
                byteArrayFieldInputStream = null;
            } catch (IOException e) {
                JMSException jmse = new JMSException("Exception:"+
                        "StreamMessage:readBytes()" + e.getMessage());
                jmse.initCause(e);
                throw jmse;
            }
        }
        return bytesRead;
    }
View Full Code Here

                String errMsg = _lgrMID_EXC +
                        ":ERROR setting StreamMessage body"+
                        ":Exception="+ ex.getMessage();
                _loggerJM.severe(errMsg);
                JMSException jmse = new javax.jms.JMSException(errMsg);
                jmse.initCause(ex);
                throw jmse;
            }
        }
    }
View Full Code Here

            String errMsg = _lgrMID_EXC +
                    ":Exception:StreamMessage."+methodName+
                    ":message="+ e.getMessage();
            _loggerJM.severe(errMsg);
            JMSException jmse = new javax.jms.JMSException(errMsg);
            jmse.initCause(e);
            throw jmse;
        }
        //reset flag
        this.byteArrayReadState = false;
        this.notYetProcessedPrimitiveObject = null;
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.