Package javax.jms

Examples of javax.jms.JMSException.initCause()


                code = close.getReplyCode().toString();
            }

            JMSException ex = new JMSException(exc.getMessage(), code);
            ex.setLinkedException(exc);
            ex.initCause(exc);
            listener.onException(ex);
        }
    }

    public <T, E extends Exception> T executeRetrySupport(FailoverProtectedOperation<T,E> operation) throws E
View Full Code Here


                                 this, getProtocolHandler(), producerId, immediate, mandatory);
       }
       catch (AMQException e)
       {
           JMSException ex = new JMSException("Error creating producer");
           ex.initCause(e);
           ex.setLinkedException(e);
          
           throw ex;
       }
    }
View Full Code Here

                transactionManager.getTransaction().enlistResource(createXaResource(session));
            }
            return session;
        } catch (RollbackException e) {
            final JMSException jmsException = new JMSException("Rollback Exception");
            jmsException.initCause(e);
            throw jmsException;
        } catch (SystemException e) {
            final JMSException jmsException = new JMSException("System Exception");
            jmsException.initCause(e);
            throw jmsException;
View Full Code Here

            final JMSException jmsException = new JMSException("Rollback Exception");
            jmsException.initCause(e);
            throw jmsException;
        } catch (SystemException e) {
            final JMSException jmsException = new JMSException("System Exception");
            jmsException.initCause(e);
            throw jmsException;
        }
    }

    public synchronized void close() {
View Full Code Here

                    catch (AMQException e)
                    {
                        _logger.error("error:", e);
                        JMSException jmse = new JMSException("Error closing connection: " + e);
                        jmse.setLinkedException(e);
                        jmse.initCause(e);
                        throw jmse;
                    }
                }
            }
        }
View Full Code Here

            if (cause instanceof Exception)
            {
                je.setLinkedException((Exception) cause);
            }

            je.initCause(cause);
        }

        boolean closer = false;

        // in the case of an IOException, MINA has closed the protocol session so we set _closed to true
View Full Code Here

                declareDestination(amqDestination);
            }
            catch(Exception e)
            {
                JMSException ex = new JMSException("Error validating destination");
                ex.initCause(e);
                ex.setLinkedException(e);
               
                throw ex;
            }
            amqDestination.setExchangeExistsChecked(true);
View Full Code Here

        }
        catch (InterruptedException e)
        {
            JMSException jmse = new JMSException("Interrupted while waiting for flow control to be removed");
            jmse.setLinkedException(e);
            jmse.initCause(e);
            throw jmse;
        }

        getProtocolHandler().writeFrame(compositeFrame);
    }
View Full Code Here

               }
           }
           catch(AMQException ex)
           {
               JMSException e = new JMSException("Error occured while figuring out the node type");
               e.initCause(ex);
               e.setLinkedException(ex);
               throw e;
           }
           catch (TransportException e)
           {
View Full Code Here

               throw e;
           }
           catch (TransportException e)
           {
               JMSException jmse = new JMSException("Exception occured while figuring out the node type:" + e.getMessage());
               jmse.initCause(e);
               jmse.setLinkedException(e);
               throw jmse;
           }
        }
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.