Package javax.jms

Examples of javax.jms.JMSException.initCause()


      {
         // 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
View Full Code Here


      }
      catch (Exception e)
      {
         JMSException je = new JMSException(e.getMessage());

         je.initCause(e);

         throw je;
      }

      ClientMessage coreMessage = msg.getCoreMessage();
View Full Code Here

               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()
                     {
View Full Code Here

         return serverLocator.createSessionFactory();
      }
      catch (Exception e)
      {
         JMSException ex = new JMSException (e.getMessage());
         ex.initCause(e);
         throw ex;
      }
   }
  
   // Package protected ----------------------------------------------------------------------------
View Full Code Here

      }
      catch (Exception e)
      {
         JMSException jmse = new JMSException("Failed to create session factory");
        
         jmse.initCause(e);
         jmse.setLinkedException(e);
        
         throw jmse;
      }
View Full Code Here

            }
         }
         catch (SystemException e)
         {
            JMSException jmsE = new javax.jms.IllegalStateException("Unexpected exception on the Transaction ManagerTransaction");
            jmsE.initCause(e);
            throw jmsE;
         }
      }
   }
View Full Code Here

                    }
                    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);
View Full Code Here

        }
        catch (Exception e)
        {
            JMSException jmse = new JMSException("Exception when sending message:" + e.getMessage());
            jmse.setLinkedException(e);
            jmse.initCause(e);
            throw jmse;
        }
    }

    @Override
View Full Code Here

                        }
                        catch (AMQException e)
                        {
                            JMSException jmse = new JMSException("Error creating session: " + e);
                            jmse.setLinkedException(e);
                            jmse.initCause(e);
                            throw jmse;
                        }
                        finally
                        {
                            if (!success)
View Full Code Here

                                             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)
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.