Package javax.jms

Examples of javax.jms.IllegalStateException


   * @exception IllegalStateException  Systematically.
   */
  public javax.jms.QueueBrowser createBrowser(javax.jms.Queue queue)
         throws JMSException
  {
    throw new IllegalStateException("Forbidden call on a TopicSession.");
  }
View Full Code Here


   *
   * @exception IllegalStateException  Systematically.
   */
  public javax.jms.Queue createQueue(String queueName) throws JMSException
  {
    throw new IllegalStateException("Forbidden call on a TopicSession.");
  }
View Full Code Here

   *
   * @exception IllegalStateException  Systematically.
   */
  public javax.jms.TemporaryQueue createTemporaryQueue() throws JMSException
  {
    throw new IllegalStateException("Forbidden call on a TopicSession.");
  }
View Full Code Here

      return (javax.jms.QueueConnection) o;
    } catch (javax.resource.spi.SecurityException exc) {
      throw new JMSSecurityException("Invalid user identification: " + exc);
    } catch (javax.resource.spi.CommException exc) {
      throw new IllegalStateException("Could not connect to the JORAM server: "
                                      + exc);
    } catch (javax.resource.ResourceException exc) {
      throw new JMSException("Could not create connection: " + exc);
    }
  }
View Full Code Here

   * Checks if the session is closed.
   * If true, an IllegalStateException is raised.
   */
  protected synchronized void checkClosed() throws IllegalStateException {
    if (status == Status.CLOSE)
      throw new IllegalStateException("Forbidden call on a closed session.");
  }
View Full Code Here

   * Checks if the calling thread is the thread of control. If not,
   * an IllegalStateException is raised.
   */
  private synchronized void checkThreadOfControl() throws IllegalStateException {
    if (singleThreadOfControl != null && Thread.currentThread() != singleThreadOfControl)
      throw new IllegalStateException("Illegal control thread");
  }
View Full Code Here

   */
  private void checkSessionMode(int expectedSessionMode) throws IllegalStateException {
    if (sessionMode == SessionMode.NONE) {
      setSessionMode(sessionMode);
    } else if (sessionMode != expectedSessionMode) {
      throw new IllegalStateException("Bad session mode");
    }
  }
View Full Code Here

    checkClosed();
    checkThreadOfControl();

    if (!transacted)
      throw new IllegalStateException("Can't commit a non transacted" + " session.");

    if (logger.isLoggable(BasicLevel.DEBUG))
      logger.log(BasicLevel.DEBUG, "--- " + this + ": committing...");

    // If the transaction was scheduled: canceling.
View Full Code Here

    checkClosed();
    checkThreadOfControl();

    if (!transacted)
      throw new IllegalStateException("Can't rollback a non transacted" + " session.");

    if (logger.isLoggable(BasicLevel.DEBUG))
      logger.log(BasicLevel.DEBUG, "--- " + this + ": rolling back...");

    // If the transaction was scheduled: canceling.
View Full Code Here

    checkClosed();
    checkThreadOfControl();

    if (transacted)
      throw new IllegalStateException("Can't recover a transacted session.");
   
    if (logger.isLoggable(BasicLevel.DEBUG))
      logger.log(BasicLevel.DEBUG, "--- " + this + " recovering...");

    if (daemon != null && daemon.isCurrentThread()) {
View Full Code Here

TOP

Related Classes of javax.jms.IllegalStateException

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.