Examples of InvalidClientIDException


Examples of javax.jms.InvalidClientIDException

    @Override
    public void addConnection(ConnectionContext context, ConnectionInfo info) throws Exception {
        String clientId = info.getClientId();
        if (clientId == null) {
            throw new InvalidClientIDException("No clientID specified for connection request");
        }
        synchronized (clientIdSet) {
            ConnectionContext oldContext = clientIdSet.get(clientId);
            if (oldContext != null) {
              if (context.isFaultTolerant() || context.isNetworkConnection()){
                //remove the old connection
                try{
                  removeConnection(oldContext, info, new Exception("remove stale client"));
                }catch(Exception e){
                  LOG.warn("Failed to remove stale connection ",e);
                }
              }else{
                throw new InvalidClientIDException("Broker: " + getBrokerName() + " - Client: " + clientId + " already connected from "
                                                   + oldContext.getConnection().getRemoteAddress());
              }
            } else {
                clientIdSet.put(clientId, context);
            }
View Full Code Here

Examples of javax.jms.InvalidClientIDException

    @Override
    public void removeConnection(ConnectionContext context, ConnectionInfo info, Throwable error) throws Exception {
        String clientId = info.getClientId();
        if (clientId == null) {
            throw new InvalidClientIDException("No clientID specified for connection disconnect request");
        }
        synchronized (clientIdSet) {
            ConnectionContext oldValue = clientIdSet.get(clientId);
            // we may be removing the duplicate connection, not the first
            // connection to be created
View Full Code Here

Examples of javax.jms.InvalidClientIDException

     * @throws InvalidClientIDException if the ClientID of the Connection is a duplicate
     */
    public void registerConnection(BrokerClient client, ConnectionInfo info) throws JMSException {
        String clientId = info.getClientId();
        if (clientIds.containsKey(clientId)) {
            throw new InvalidClientIDException("Duplicate clientId: " + info);
        }
        getBroker().addClient(client, info);
        log.info("Adding new client: " + clientId + " on transport: " + client.getChannel());
        clientIds.put(clientId, client);
    }
View Full Code Here

Examples of javax.jms.InvalidClientIDException

            {
               // Durable sub

               if (connection.getClientID() == null)
               {
                  throw new InvalidClientIDException("Cannot create durable subscription - client ID has not been set");
               }

               if (dest.isTemporary())
               {
                  throw new InvalidDestinationException("Cannot create a durable subscription on a temporary topic");
View Full Code Here

Examples of javax.jms.InvalidClientIDException

         String clientID = spec.getClientID();

         // Durable sub
         if (clientID == null)
         {
            throw new InvalidClientIDException("Cannot create durable subscription for " + subscriptionName +
                                               " - client ID has not been set");
         }

         SimpleString queueName = new SimpleString(HornetQDestination.createQueueNameForDurableSubscription(clientID,
                                                                                                            subscriptionName));
View Full Code Here

Examples of javax.jms.InvalidClientIDException

         String clientID = spec.getClientID();

         // Durable sub
         if (clientID == null)
         {
            throw new InvalidClientIDException("Cannot create durable subscription for " + subscriptionName +
                                               " - client ID has not been set");
         }

         SimpleString queueName = new SimpleString(HornetQDestination.createQueueNameForDurableSubscription(clientID,
                                                                                                            subscriptionName));
View Full Code Here

Examples of javax.jms.InvalidClientIDException

    @Override
    public void addConnection(ConnectionContext context, ConnectionInfo info) throws Exception {
        String clientId = info.getClientId();
        if (clientId == null) {
            throw new InvalidClientIDException("No clientID specified for connection request");
        }
        synchronized (clientIdSet) {
            ConnectionContext oldContext = clientIdSet.get(clientId);
            if (oldContext != null) {
                throw new InvalidClientIDException("Broker: " + getBrokerName() + " - Client: " + clientId + " already connected from "
                                                   + oldContext.getConnection().getRemoteAddress());
            } else {
                clientIdSet.put(clientId, context);
            }
        }
View Full Code Here

Examples of javax.jms.InvalidClientIDException

    @Override
    public void removeConnection(ConnectionContext context, ConnectionInfo info, Throwable error) throws Exception {
        String clientId = info.getClientId();
        if (clientId == null) {
            throw new InvalidClientIDException("No clientID specified for connection disconnect request");
        }
        synchronized (clientIdSet) {
            ConnectionContext oldValue = clientIdSet.get(clientId);
            // we may be removing the duplicate connection, not the first
            // connection to be created
View Full Code Here

Examples of org.apache.hadoop.hdfs.notifier.InvalidClientIdException

    Set<Long> clientsForEvent;
    ClientData clientData = clientsData.get(clientId);
   
    if (clientData == null) {
      LOG.warn("subscribe client called with invalid id " + clientId);
      throw new InvalidClientIdException();
    }
   
    LOG.info("Subscribing client " + clientId + " to " +
        NotifierUtils.asString(event) + " from txId " + txId);
View Full Code Here

Examples of org.springframework.jms.InvalidClientIDException

    if (ex instanceof javax.jms.IllegalStateException) {
      return new org.springframework.jms.IllegalStateException((javax.jms.IllegalStateException) ex);
    }
    if (ex instanceof javax.jms.InvalidClientIDException) {
      return new InvalidClientIDException((javax.jms.InvalidClientIDException) ex);
    }
    if (ex instanceof javax.jms.InvalidDestinationException) {
      return new InvalidDestinationException((javax.jms.InvalidDestinationException) ex);
    }
    if (ex instanceof javax.jms.InvalidSelectorException) {
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.