Examples of IllegalStateException


Examples of javax.jms.IllegalStateException

   * <code>IllegalStateException</code> instance.
   */
  public void rollback() throws JMSException
  {
    checkValidity();
    throw new IllegalStateException("Forbidden call on a component's session.");
  }
View Full Code Here

Examples of javax.jms.IllegalStateException

      validity = false;
    else
      validity = cnx.valid;

   if (! validity)
     throw new IllegalStateException("Invalid state: session is closed.");
  }
View Full Code Here

Examples of javax.jms.IllegalStateException

  protected void checkValidity() throws IllegalStateException
  {
    session.checkValidity();

    if (! valid)
      throw new IllegalStateException("Invalid call on a closed producer.");
  }
View Full Code Here

Examples of javax.jms.IllegalStateException

   *
   * @exception IllegalStateException  If the publisher is closed.
   */
  public javax.jms.Topic getTopic() throws JMSException {
    if (closed)
      throw new IllegalStateException("Forbidden call on a closed publisher.");

    return (javax.jms.Topic) super.dest;
  }
View Full Code Here

Examples of javax.jms.IllegalStateException

   *
   * @exception IllegalStateException  If the producer is closed.
   */
  public synchronized void setDisableMessageID(boolean value) throws JMSException {
    if (closed)
      throw new IllegalStateException("Forbidden call on a closed producer.");
  }
View Full Code Here

Examples of javax.jms.IllegalStateException

   * @exception IllegalStateException  If the producer is closed.
   * @exception JMSException  When setting an invalid delivery mode.
   */
  public synchronized void setDeliveryMode(int deliveryMode) throws JMSException {
    if (closed)
      throw new IllegalStateException("Forbidden call on a closed producer.");

    if (deliveryMode != javax.jms.DeliveryMode.PERSISTENT
        && deliveryMode != javax.jms.DeliveryMode.NON_PERSISTENT)
      throw new JMSException("Can't set invalid delivery mode.");

View Full Code Here

Examples of javax.jms.IllegalStateException

   * @exception IllegalStateException  If the producer is closed.
   * @exception JMSException  When setting an invalid priority.
   */
  public synchronized void setPriority(int priority) throws JMSException {
    if (closed)
      throw new IllegalStateException("Forbidden call on a closed producer.");

    if (priority < 0 || priority > 9)
      throw new JMSException("Can't set invalid priority value.");

    this.priority = priority;
View Full Code Here

Examples of javax.jms.IllegalStateException

   *
   * @exception IllegalStateException  If the producer is closed.
   */
  public synchronized void setTimeToLive(long timeToLive) throws JMSException {
    if (closed)
      throw new IllegalStateException("Forbidden call on a closed producer.");

    this.timeToLive = timeToLive;
  }
View Full Code Here

Examples of javax.jms.IllegalStateException

   *
   * @exception IllegalStateException  If the producer is closed.
   */
  public synchronized void setDisableMessageTimestamp(boolean value) throws JMSException {
    if (closed)
      throw new IllegalStateException("Forbidden call on a closed producer.");

    this.timestampDisabled = value;
  }
View Full Code Here

Examples of javax.jms.IllegalStateException

   *
   * @exception IllegalStateException  If the producer is closed.
   */
  public synchronized javax.jms.Destination getDestination() throws JMSException {
    if (closed)
      throw new IllegalStateException("Forbidden call on a closed producer.");

    return dest;
  }
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.