Package javax.jms

Examples of javax.jms.IllegalStateException


         {
            DeliveryInfo delivery = state.getAutoAckInfo();
           
            if (delivery == null)
            {
               throw new IllegalStateException("Cannot find delivery to AUTO_ACKNOWLEDGE");
            }
                                
            if (trace) { log.trace(this + " auto acknowledging delivery " + delivery); }
             
View Full Code Here


           
      SessionState state = getState(invocation);
     
      if (state.isTransacted())
      {
         throw new IllegalStateException("Cannot recover a transacted session");
      }
     
      if (trace) { log.trace("recovering the session"); }
      
      //Call redeliver
View Full Code Here

   {
      SessionState state = getState(invocation);

      if (!state.isTransacted())
      {
         throw new IllegalStateException("Cannot commit a non-transacted session");
      }

      if (state.isXA())
      {
         throw new TransactionInProgressException("Cannot call commit on an XA session");
View Full Code Here

   {
      SessionState state = getState(invocation);

      if (!state.isTransacted())
      {
         throw new IllegalStateException("Cannot rollback a non-transacted session");
      }

      if (state.isXA())
      {
         throw new TransactionInProgressException("Cannot call rollback on an XA session");
View Full Code Here

     
      MessageListener listener = (MessageListener)mi.getArguments()[0];
     
      if (listener == null)
      {
         throw new IllegalStateException("Cannot set a null MessageListener on the session");
      }
     
      getState(invocation).setDistinguishedListener(listener);
     
      return null;
View Full Code Here

      int maxDeliveries = ((Integer)mi.getArguments()[3]).intValue();
      SessionDelegate connectionConsumerDelegate = ((SessionDelegate)mi.getArguments()[4]);
     
      if (m == null)
      {
         throw new IllegalStateException("Cannot add a null message to the session");
      }

      AsfMessageHolder holder = new AsfMessageHolder();
      holder.msg = m;
      holder.consumerID = theConsumerID;
View Full Code Here

   public Session getSession() throws JMSException
   {     
      SessionState state = (SessionState)((DelegateSupport)delegate).getState();
      if (!state.isXA())
      {
         throw new IllegalStateException("Isn't an XASession");
      }
     
      return this;
   }
View Full Code Here

                 
         MessageCounter counter = serverPeer.getMessageCounterManager().unregisterMessageCounter(counterName);
        
         if (counter == null)
         {
            throw new IllegalStateException("Cannot find counter to unregister " + counterName);
         }
        
         queue.deactivate();
         queue.unload();
        
View Full Code Here

   {
      try
      {
         if (closed)
         {
            throw new IllegalStateException("Browser is closed");
         }

         log.debug(this + " is being resetted");

         iterator = createIterator();
View Full Code Here

   {
      try
      {
         if (closed)
         {
            throw new IllegalStateException("Browser is closed");
         }

         if (iterator == null)
         {
            iterator = createIterator();
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.