Package javax.jms

Examples of javax.jms.JMSException.initCause()


                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 (CharacterCodingException e)
        {
            JMSException jmse = new JMSException("Error decoding byte stream as a UTF8 string: " + e);
            jmse.setLinkedException(e);
            jmse.initCause(e);
            throw jmse;
        }
    }

    protected int readBytes(byte[] bytes) throws JMSException
View Full Code Here

        }
        catch(CharacterCodingException e)
        {
            JMSException jmse = new JMSException("Error decoding byte stream as a UTF8 string: " + e);
            jmse.setLinkedException(e);
            jmse.initCause(e);
            throw jmse;
        }
    }
}
View Full Code Here

                    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(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

                    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

      {
         // 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

         return xares;
      }
      catch (ResourceException e)
      {
         JMSException jmse = new JMSException("Unable to get XA Resource");
         jmse.initCause(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.