Package javax.jms

Examples of javax.jms.JMSRuntimeException


         stringPropertyNames.clear();
         properties.clear();
      }
      catch (RuntimeException e)
      {
         throw new JMSRuntimeException(e.getMessage());
      }
      return this;
   }
View Full Code Here


      {
         throw new MessageFormatRuntimeException(ce.getMessage());
      }
      catch (RuntimeException e)
      {
         throw new JMSRuntimeException(e.getMessage());
      }
   }
View Full Code Here

      {
         throw new MessageFormatRuntimeException(ce.getMessage());
      }
      catch (RuntimeException e)
      {
         throw new JMSRuntimeException(e.getMessage());
      }
   }
View Full Code Here

      {
         throw new MessageFormatRuntimeException(ce.getMessage());
      }
      catch (RuntimeException e)
      {
         throw new JMSRuntimeException(e.getMessage());
      }
   }
View Full Code Here

      {
         throw new MessageFormatRuntimeException(ce.getMessage());
      }
      catch (RuntimeException e)
      {
         throw new JMSRuntimeException(e.getMessage());
      }
   }
View Full Code Here

   @Override
   public JMSProducer setJMSCorrelationIDAsBytes(byte[] correlationID)
   {
      if (correlationID == null || correlationID.length == 0)
      {
         throw new JMSRuntimeException("Please specify a non-zero length byte[]");
      }
      jmsHeaderCorrelationIDAsBytes = Arrays.copyOf(correlationID, correlationID.length);
      return this;
   }
View Full Code Here

            msg = new HornetQTextMessage(message, session);
            break;
         }
         default:
         {
            throw new JMSRuntimeException("Invalid message type " + type);
         }
      }

      return msg;
   }
View Full Code Here

         throw HornetQJMSClientBundle.BUNDLE.invalidJavaIdentifier(name);
      }

      if (HornetQMessage.reservedIdentifiers.contains(name))
      {
         throw new JMSRuntimeException("The property name '" + name + "' is reserved due to selector syntax.");
      }

      if (name.startsWith("JMS_HORNETQ"))
      {
         throw new JMSRuntimeException("The property name '" + name + "' is illegal since it starts with JMS_HORNETQ");
      }
   }
View Full Code Here

            msg = new HornetQTextMessage(message, session);
            break;
         }
         default:
         {
            throw new JMSRuntimeException("Invalid message type " + type);
         }
      }

      return msg;
   }
View Full Code Here

         throw new IllegalArgumentException("The name of a property must not be an empty String.");
      }

      if (!isValidJavaIdentifier(name))
      {
         throw new JMSRuntimeException("The property name '" + name + "' is not a valid java identifier.");
      }

      if (HornetQMessage.reservedIdentifiers.contains(name))
      {
         throw new JMSRuntimeException("The property name '" + name + "' is reserved due to selector syntax.");
      }

      if (name.startsWith("JMS"))
      {
         if (name.length() > 3)
         {
            char c = name.charAt(3);
            if (c != 'X' && c != '_')
            {
               // See http://java.sun.com/javaee/5/docs/api/
               // (java.jms.Message javadoc)
               // "Property names must obey the rules for a message selector identifier"
               // "Any name that does not begin with 'JMS' is an application-specific property name"
               throw new JMSRuntimeException("The property name '" + name +
                                                  "' is illegal since it starts with JMS");
            }
         }
         else
         {
            throw new JMSRuntimeException("The property name '" + name + "' is illegal since it starts with JMS");
         }
      }
   }
View Full Code Here

TOP

Related Classes of javax.jms.JMSRuntimeException

Copyright © 2018 www.massapicom. 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.