Examples of JMSRuntimeException


Examples of javax.jms.JMSRuntimeException

         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

Examples of javax.jms.JMSRuntimeException

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

      return msg;
   }
View Full Code Here

Examples of javax.jms.JMSRuntimeException

         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

Examples of javax.jms.JMSRuntimeException

         case JMSContext.SESSION_TRANSACTED:
         {
            return;
         }
         default:
            throw new JMSRuntimeException("Invalid Session Mode: " + mode);
      }
   }
View Full Code Here

Examples of javax.jms.JMSRuntimeException

      {
         producer.setDeliveryMode(deliveryMode);
      }
      catch (JMSException e)
      {
         JMSRuntimeException e2 = new JMSRuntimeException(e.getMessage());
         e2.initCause(e);
         throw e2;
      }
      return this;
   }
View Full Code Here

Examples of javax.jms.JMSRuntimeException

      {
         return producer.getDeliveryMode();
      }
      catch (JMSException e)
      {
         JMSRuntimeException e2 = new JMSRuntimeException(e.getMessage());
         e2.initCause(e);
         throw e2;
      }
   }
View Full Code Here

Examples of javax.jms.JMSRuntimeException

      {
         producer.setPriority(priority);
      }
      catch (JMSException e)
      {
         JMSRuntimeException e2 = new JMSRuntimeException(e.getMessage());
         e2.initCause(e);
         throw e2;
      }
      return this;
   }
View Full Code Here

Examples of javax.jms.JMSRuntimeException

      {
         return producer.getPriority();
      }
      catch (JMSException e)
      {
         JMSRuntimeException e2 = new JMSRuntimeException(e.getMessage());
         e2.initCause(e);
         throw e2;
      }
   }
View Full Code Here

Examples of javax.jms.JMSRuntimeException

         producer.setTimeToLive(timeToLive );
         return this;
      }
      catch (JMSException e)
      {
         JMSRuntimeException e2 = new JMSRuntimeException(e.getMessage());
         e2.initCause(e);
         throw e2;
      }
   }
View Full Code Here

Examples of javax.jms.JMSRuntimeException

         timeToLive = producer.getTimeToLive();
         return timeToLive;
      }
      catch (JMSException e)
      {
         JMSRuntimeException e2 = new JMSRuntimeException(e.getMessage());
         e2.initCause(e);
         throw e2;
      }
   }
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.