221222223224225226227228229230231
{ // If a problem occurs during commit processing the session should be rolled back rollbackLocal(xid); JMSException e = new MessagingTransactionRolledBackException(t.getMessage()); e.initCause(t); throw e; } } public void rollbackLocal(Object xid) throws JMSException
427428429430431432433434435436437
} catch (Exception e) { JMSException je = new JMSException(e.getMessage()); je.initCause(e); throw je; } ClientMessage coreMessage = msg.getCoreMessage();
652653654655656657658659660661662
if (exceptionListener != null) { final JMSException je = new JMSException(me.toString(), failedOver?EXCEPTION_FAILOVER: EXCEPTION_DISCONNECT); je.initCause(me); new Thread(new Runnable() { public void run() {
576577578579580581582583584585586
return serverLocator.createSessionFactory(); } catch (Exception e) { JMSException ex = new JMSException (e.getMessage()); ex.initCause(e); throw ex; } } // Package protected ----------------------------------------------------------------------------
602603604605606607608609610611612
} catch (Exception e) { JMSException jmse = new JMSException("Failed to create session factory"); jmse.initCause(e); jmse.setLinkedException(e); throw jmse; }
369370371372373374375376377378379
} } catch (SystemException e) { JMSException jmsE = new javax.jms.IllegalStateException("Unexpected exception on the Transaction ManagerTransaction"); jmsE.initCause(e); throw jmsE; } } }
355356357358359360361362363364365
} return message; } catch (Exception e) { JMSException jmsEx = new JMSException("Failed to create JMS Message: " + e); jmsEx.setLinkedException(e); jmsEx.initCause(e); throw jmsEx; } } }; Object dest = destinationChooser.chooseDestination(exchange, in);
238239240241242243244245246247248
} catch (Exception e) { JMSException jmse = new JMSException("Exception when sending message:" + e.getMessage()); jmse.setLinkedException(e); jmse.initCause(e); throw jmse; } } @Override
200201202203204205206207208209210
} catch (AMQException e) { JMSException jmse = new JMSException("Error creating session: " + e); jmse.setLinkedException(e); jmse.initCause(e); throw jmse; } finally { if (!success)
656657658659660661662663664665666
getProtocolHandler(), producerId, immediate, mandatory); } catch (AMQException e) { JMSException ex = new JMSException("Error creating producer"); ex.initCause(e); ex.setLinkedException(e); throw ex; } catch(TransportException e)