Package javax.jms

Examples of javax.jms.JMSException


      catch (Throwable t)
      {
         // If a problem occurs during commit processing the session should be rolled back
         rollbackLocal(xid);
        
         JMSException e = new MessagingTransactionRolledBackException(t.getMessage());
         e.initCause(t);
         throw e;        
      }
   }
View Full Code Here


               if (delegate == null)
               {
                  // the delegate corresponding to the actualServerID not found among the cached
                  // delegates. TODO Could this ever happen? Should we send back the cf, or update it
                  // instead of just the id??
                  throw new JMSException("Cannot find a cached connection factory delegate for " +
                     "node " + actualServerID);
               }

            }
         }
         catch (MessagingNetworkFailureException e)
         {
            delegate = null;
            log.warn("Exception captured on createConnection... hopping to a new connection factory", e);
            // Currently hardcoded
            Thread.sleep(2000);
         }
      }

      throw new JMSException("Maximum number of failover attempts exceeded. " +
                             "Cannot find a server to failover onto.");
   }
View Full Code Here

        
         ManagedDestination dest = (ManagedDestination)dm.getDestination(name, true);
        
         if (dest == null)
         {
            throw new JMSException("There is no administratively defined queue with name:" + name);
         }       
  
         return new JBossQueue(dest.getName());
      }
      catch (Throwable t)
View Full Code Here

        
         ManagedDestination dest = (ManagedDestination)dm.getDestination(name, false);
                 
         if (dest == null)
         {
            throw new JMSException("There is no administratively defined topic with name:" + name);
         }       
  
         return new JBossTopic(name);
      }
      catch (Throwable t)
View Full Code Here

  
         String clientID = connectionEndpoint.getClientID();
  
         if (clientID == null)
         {
            throw new JMSException("null clientID on connection");
         }
        
         String queueName = MessageQueueNameHelper.createSubscriptionName(clientID, subscriptionName);
        
         Binding binding = postOffice.getBindingForQueueName(queueName);
View Full Code Here

           
            // We have a durable subscription, look it up
            String clientID = connectionEndpoint.getClientID();
            if (clientID == null)
            {
               throw new JMSException("Cannot create durable subscriber without a valid client ID");
            }
           
            // See if there any bindings with the same client_id.subscription_name name
           
            String name = MessageQueueNameHelper.createSubscriptionName(clientID, subscriptionName);
View Full Code Here

        
         if (dest.isQueue())
         {
            if (!postOffice.route(ref, new JMSCondition(true, dest.getName()), tx))
            {
               throw new JMSException("Failed to route " + ref + " to " + dest.getName());
            }
         }
         else
         {
            postOffice.route(ref, new JMSCondition(false, dest.getName()), tx);  
View Full Code Here

         dis = null;
         dos = null;     
      }
      catch (Exception e)
      {
         JMSException e2 = new JMSException(e.getMessage());
         e2.setStackTrace(e.getStackTrace());
         throw e2;
      }
   }
View Full Code Here

      {
         internalThread.join(TIMEOUT);
        
         if (internalThread.isAlive())
         {           
            throw new JMSException(this + " Waited " + TIMEOUT + " ms for internal thread to complete, but it didn't");
         }
      }
      catch (InterruptedException e)
      {
         if (trace) { log.trace(this + " Thread interrupted while waiting for internal thread to complete"); }
View Full Code Here

   public void setBytes(String name, byte[] value, int offset, int length) throws JMSException
   {
      checkName(name);
      if (offset + length > value.length)
      {
         throw new JMSException("Array is too small");
      }
      byte[] temp = new byte[length];
      for (int i = 0; i < length; i++)
      {
         temp[i] = value[i + offset];
View Full Code Here

TOP

Related Classes of javax.jms.JMSException

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.