Package javax.jms

Examples of javax.jms.IllegalStateException


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

         if (this.clientID != null)
         {
            throw new IllegalStateException("Cannot set clientID, already set as " + this.clientID);
         }

         serverPeer.checkClientID(clientID);

         log.debug(this + "setting client ID to " + clientID);
View Full Code Here


   {
      try
      {
         if (closed)
         {
            throw new IllegalStateException("Connection is closed");
         }
         setStarted(true);
         log.debug(this + " started");
      }
      catch (Throwable t)
View Full Code Here

   {
      try
      {
         if (closed)
         {
            throw new IllegalStateException("Connection is closed");
         }
        
         setStarted(false);
        
         log.debug("Connection " + id + " stopped");
View Full Code Here

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

   {   
      try
      {     
         if (closed)
         {
            throw new IllegalStateException("Connection is closed");
         }
                             
         if (request.getRequestType() == TransactionRequest.ONE_PHASE_COMMIT_REQUEST)
         {
            if (trace) { log.trace(this + " received ONE_PHASE_COMMIT request"); }
View Full Code Here

   {
      synchronized (sessions)
      {
         if (sessions.remove(new Integer(sessionId)) == null)
         {
            throw new IllegalStateException("Cannot find session with id " +
               sessionId + " to remove");
         }
      }
   }
View Full Code Here

            ServerSessionEndpoint session =
               serverPeer.getSession(new Integer(sessionState.getSessionId()));
           
            if (session == null)
            {              
               throw new IllegalStateException("Cannot find session with id " +
                  sessionState.getSessionId());
            }

            session.acknowledgeTransactionally(sessionState.getAcks(), tx);
         }
View Full Code Here

                     .getServerPeer().getMessageCounterManager()
                     .unregisterMessageCounter(counterName);

            if (counter == null)
            {
               throw new IllegalStateException("Cannot find counter to remove " + counterName);
            }
         }
      }

   }
View Full Code Here

         // and the original transaction is committed, then this means the same message has been
         // delivered twice which breaks the once and only once delivery guarantee.
        
         if (rm.checkForAcksInSession(state.getSessionID()))
         {
            throw new IllegalStateException(
               "Attempt to close an XASession when there are still uncommitted acknowledgements!");
         }       
      }
           
      int ackMode = state.getAcknowledgeMode();
View Full Code Here

         if (trace) { log.trace(this + " added to CLIENT_ACKNOWLEDGE list delivery " + info); }
        
         // Sanity check
         if (info.getConnectionConsumerSession() != null)
         {
            throw new IllegalStateException(
               "CLIENT_ACKNOWLEDGE cannot be used with a connection consumer");
         }
                 
         state.getClientAckList().add(info);
      }
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.