Examples of ClientRequestor


Examples of org.hornetq.api.core.client.ClientRequestor

         else
         {
            // Get the ID of the queues involved so the message can be routed properly.  This is done because we cannot
            // send directly to a queue, we have to send to an address instead but not all the queues related to the
            // address may need the message
            ClientRequestor requestor = new ClientRequestor(managementSession, "jms.queue.hornetq.management");
            ClientMessage managementMessage = managementSession.createMessage(false);
            ManagementHelper.putAttribute(managementMessage, "core.queue." + queue, "ID");
            managementSession.start();
            HornetQServerLogger.LOGGER.debug("Requesting ID for: " + queue);
            ClientMessage reply = requestor.request(managementMessage);
            queueID = (Integer) ManagementHelper.getResult(reply);
            requestor.close();
            HornetQServerLogger.LOGGER.debug("ID for " + queue + " is: " + queueID);
            queueIDs.put(queue, queueID)// store it so we don't have to look it up every time
         }

         logMessage.append(queue).append(", ");
View Full Code Here

Examples of org.hornetq.api.core.client.ClientRequestor

         else
         {
            // Get the ID of the queues involved so the message can be routed properly.  This is done because we cannot
            // send directly to a queue, we have to send to an address instead but not all the queues related to the
            // address may need the message
            ClientRequestor requestor = new ClientRequestor(managementSession, "jms.queue.hornetq.management");
            ClientMessage managementMessage = managementSession.createMessage(false);
            ManagementHelper.putAttribute(managementMessage, "core.queue." + queue, "ID");
            managementSession.start();
            HornetQServerLogger.LOGGER.debug("Requesting ID for: " + queue);
            ClientMessage reply = requestor.request(managementMessage);
            queueID = (Integer) ManagementHelper.getResult(reply);
            requestor.close();
            HornetQServerLogger.LOGGER.debug("ID for " + queue + " is: " + queueID);
            queueIDs.put(queue, queueID)// store it so we don't have to look it up every time
         }

         logMessage.append(queue).append(", ");
View Full Code Here

Examples of org.hornetq.api.core.client.ClientRequestor

            break;
         }
         reader.next();
      }

      ClientRequestor requestor = new ClientRequestor(managementSession, "jms.queue.hornetq.management");
      ClientMessage managementMessage = managementSession.createMessage(false);
      ManagementHelper.putOperationInvocation(managementMessage,
            ResourceNames.JMS_SERVER,
            "createConnectionFactory",
            name,
            Boolean.parseBoolean(ha),
            discoveryGroupName.length() > 0,
            Integer.parseInt(type),
            connectors,
            entries,
            clientId,
            Long.parseLong(clientFailureCheckPeriod),
            Long.parseLong(connectionTtl),
            Long.parseLong(callTimeout),
            Long.parseLong(callFailoverTimeout),
            Integer.parseInt(minLargeMessageSize),
            Boolean.parseBoolean(compressLargeMessages),
            Integer.parseInt(consumerWindowSize),
            Integer.parseInt(consumerMaxRate),
            Integer.parseInt(confirmationWindowSize),
            Integer.parseInt(producerWindowSize),
            Integer.parseInt(producerMaxRate),
            Boolean.parseBoolean(blockOnAcknowledge),
            Boolean.parseBoolean(blockOnDurableSend),
            Boolean.parseBoolean(blockOnNonDurableSend),
            Boolean.parseBoolean(autoGroup),
            Boolean.parseBoolean(preacknowledge),
            loadBalancingPolicyClassName,
            Integer.parseInt(transactionBatchSize),
            Integer.parseInt(dupsOkBatchSize),
            Boolean.parseBoolean(useGlobalPools),
            Integer.parseInt(scheduledThreadMaxPoolSize),
            Integer.parseInt(threadMaxPoolSize),
            Long.parseLong(retryInterval),
            Double.parseDouble(retryIntervalMultiplier),
            Long.parseLong(maxRetryInterval),
            Integer.parseInt(reconnectAttempts),
            Boolean.parseBoolean(failoverOnInitialConnection),
            groupId);
      //Boolean.parseBoolean(cacheLargeMessagesClient));
      managementSession.start();
      ClientMessage reply = requestor.request(managementMessage);
      if (ManagementHelper.hasOperationSucceeded(reply))
      {
         HornetQServerLogger.LOGGER.debug("Created connection factory " + name);
      }
      else
      {
         HornetQServerLogger.LOGGER.error("Problem creating " + name);
      }

      requestor.close();
   }
View Full Code Here

Examples of org.hornetq.api.core.client.ClientRequestor

            break;
         }
         reader.next();
      }

      ClientRequestor requestor = new ClientRequestor(managementSession, "jms.queue.hornetq.management");
      ClientMessage managementMessage = managementSession.createMessage(false);
      if ("Queue".equals(type))
      {
         ManagementHelper.putOperationInvocation(managementMessage, ResourceNames.JMS_SERVER, "createQueue", name, entries, selector);
      }
      else if ("Topic".equals(type))
      {
         ManagementHelper.putOperationInvocation(managementMessage, ResourceNames.JMS_SERVER, "createTopic", name, entries);
      }
      managementSession.start();
      ClientMessage reply = requestor.request(managementMessage);
      if (ManagementHelper.hasOperationSucceeded(reply))
      {
         HornetQServerLogger.LOGGER.debug("Created " + type.toLowerCase() + " " + name);
      }
      else
      {
         HornetQServerLogger.LOGGER.error("Problem creating " + name);
      }

      requestor.close();
   }
View Full Code Here

Examples of org.hornetq.api.core.client.ClientRequestor

         else
         {
            // Get the ID of the queues involved so the message can be routed properly.  This is done because we cannot
            // send directly to a queue, we have to send to an address instead but not all the queues related to the
            // address may need the message
            ClientRequestor requestor = new ClientRequestor(managementSession, "jms.queue.hornetq.management");
            ClientMessage managementMessage = managementSession.createMessage(false);
            ManagementHelper.putAttribute(managementMessage, "core.queue." + queue, "ID");
            managementSession.start();
            HornetQServerLogger.LOGGER.debug("Requesting ID for: " + queue);
            ClientMessage reply = requestor.request(managementMessage);
            queueID = (Integer) ManagementHelper.getResult(reply);
            requestor.close();
            HornetQServerLogger.LOGGER.debug("ID for " + queue + " is: " + queueID);
            queueIDs.put(queue, queueID)// store it so we don't have to look it up every time
         }

         logMessage.append(queue).append(", ");
View Full Code Here

Examples of org.hornetq.api.core.client.ClientRequestor

            break;
         }
         reader.next();
      }

      ClientRequestor requestor = new ClientRequestor(managementSession, "jms.queue.hornetq.management");
      ClientMessage managementMessage = managementSession.createMessage(false);
      ManagementHelper.putOperationInvocation(managementMessage,
                                              ResourceNames.JMS_SERVER,
                                              "createConnectionFactory",
                                              name,
                                              Boolean.parseBoolean(ha),
                                              discoveryGroupName.length() > 0,
                                              Integer.parseInt(type),
                                              connectors,
                                              entries,
                                              clientId,
                                              Long.parseLong(clientFailureCheckPeriod),
                                              Long.parseLong(connectionTtl),
                                              Long.parseLong(callTimeout),
                                              Long.parseLong(callFailoverTimeout),
                                              Integer.parseInt(minLargeMessageSize),
                                              Boolean.parseBoolean(compressLargeMessages),
                                              Integer.parseInt(consumerWindowSize),
                                              Integer.parseInt(consumerMaxRate),
                                              Integer.parseInt(confirmationWindowSize),
                                              Integer.parseInt(producerWindowSize),
                                              Integer.parseInt(producerMaxRate),
                                              Boolean.parseBoolean(blockOnAcknowledge),
                                              Boolean.parseBoolean(blockOnDurableSend),
                                              Boolean.parseBoolean(blockOnNonDurableSend),
                                              Boolean.parseBoolean(autoGroup),
                                              Boolean.parseBoolean(preacknowledge),
                                              loadBalancingPolicyClassName,
                                              Integer.parseInt(transactionBatchSize),
                                              Integer.parseInt(dupsOkBatchSize),
                                              Boolean.parseBoolean(useGlobalPools),
                                              Integer.parseInt(scheduledThreadMaxPoolSize),
                                              Integer.parseInt(threadMaxPoolSize),
                                              Long.parseLong(retryInterval),
                                              Double.parseDouble(retryIntervalMultiplier),
                                              Long.parseLong(maxRetryInterval),
                                              Integer.parseInt(reconnectAttempts),
                                              Boolean.parseBoolean(failoverOnInitialConnection),
                                              groupId);
      //Boolean.parseBoolean(cacheLargeMessagesClient));
      managementSession.start();
      ClientMessage reply = requestor.request(managementMessage);
      if (ManagementHelper.hasOperationSucceeded(reply))
      {
         HornetQServerLogger.LOGGER.debug("Created connection factory " + name);
      }
      else
      {
         HornetQServerLogger.LOGGER.error("Problem creating " + name);
      }

      requestor.close();
   }
View Full Code Here

Examples of org.hornetq.api.core.client.ClientRequestor

            break;
         }
         reader.next();
      }

      ClientRequestor requestor = new ClientRequestor(managementSession, "jms.queue.hornetq.management");
      ClientMessage managementMessage = managementSession.createMessage(false);
      if ("Queue".equals(type))
      {
         ManagementHelper.putOperationInvocation(managementMessage, ResourceNames.JMS_SERVER, "createQueue", name, entries, selector);
      }
      else if ("Topic".equals(type))
      {
         ManagementHelper.putOperationInvocation(managementMessage, ResourceNames.JMS_SERVER, "createTopic", name, entries);
      }
      managementSession.start();
      ClientMessage reply = requestor.request(managementMessage);
      if (ManagementHelper.hasOperationSucceeded(reply))
      {
         HornetQServerLogger.LOGGER.debug("Created " + type.toLowerCase() + " " + name);
      }
      else
      {
         HornetQServerLogger.LOGGER.error("Problem creating " + name);
      }

      requestor.close();
   }
View Full Code Here

Examples of org.hornetq.api.core.client.ClientRequestor

                                       false,
                                       true,
                                       true,
                                       false,
                                       1);
      requestor = new ClientRequestor(clientSession, ConfigurationImpl.DEFAULT_MANAGEMENT_ADDRESS);
      clientSession.start();
   }
View Full Code Here

Examples of org.hornetq.api.core.client.ClientRequestor

         else
         {
            // Get the ID of the queues involved so the message can be routed properly.  This is done because we cannot
            // send directly to a queue, we have to send to an address instead but not all the queues related to the
            // address may need the message
            ClientRequestor requestor = new ClientRequestor(managementSession, "jms.queue.hornetq.management");
            ClientMessage managementMessage = managementSession.createMessage(false);
            ManagementHelper.putAttribute(managementMessage, "core.queue." + queue, "ID");
            managementSession.start();
            HornetQServerLogger.LOGGER.debug("Requesting ID for: " + queue);
            ClientMessage reply = requestor.request(managementMessage);
            queueID = (Integer) ManagementHelper.getResult(reply);
            requestor.close();
            HornetQServerLogger.LOGGER.debug("ID for " + queue + " is: " + queueID);
            queueIDs.put(queue, queueID)// store it so we don't have to look it up every time
         }

         logMessage.append(queue).append(", ");
View Full Code Here

Examples of org.hornetq.api.core.client.ClientRequestor

            break;
         }
         reader.next();
      }

      ClientRequestor requestor = new ClientRequestor(managementSession, "jms.queue.hornetq.management");
      ClientMessage managementMessage = managementSession.createMessage(false);
      ManagementHelper.putOperationInvocation(managementMessage,
                                              ResourceNames.JMS_SERVER,
                                              "createConnectionFactory",
                                              name,
                                              Boolean.parseBoolean(ha),
                                              discoveryGroupName.length() > 0,
                                              Integer.parseInt(type),
                                              connectors,
                                              entries,
                                              clientId,
                                              Long.parseLong(clientFailureCheckPeriod),
                                              Long.parseLong(connectionTtl),
                                              Long.parseLong(callTimeout),
                                              Long.parseLong(callFailoverTimeout),
                                              Integer.parseInt(minLargeMessageSize),
                                              Boolean.parseBoolean(compressLargeMessages),
                                              Integer.parseInt(consumerWindowSize),
                                              Integer.parseInt(consumerMaxRate),
                                              Integer.parseInt(confirmationWindowSize),
                                              Integer.parseInt(producerWindowSize),
                                              Integer.parseInt(producerMaxRate),
                                              Boolean.parseBoolean(blockOnAcknowledge),
                                              Boolean.parseBoolean(blockOnDurableSend),
                                              Boolean.parseBoolean(blockOnNonDurableSend),
                                              Boolean.parseBoolean(autoGroup),
                                              Boolean.parseBoolean(preacknowledge),
                                              loadBalancingPolicyClassName,
                                              Integer.parseInt(transactionBatchSize),
                                              Integer.parseInt(dupsOkBatchSize),
                                              Boolean.parseBoolean(useGlobalPools),
                                              Integer.parseInt(scheduledThreadMaxPoolSize),
                                              Integer.parseInt(threadMaxPoolSize),
                                              Long.parseLong(retryInterval),
                                              Double.parseDouble(retryIntervalMultiplier),
                                              Long.parseLong(maxRetryInterval),
                                              Integer.parseInt(reconnectAttempts),
                                              Boolean.parseBoolean(failoverOnInitialConnection),
                                              groupId);
      //Boolean.parseBoolean(cacheLargeMessagesClient));
      managementSession.start();
      ClientMessage reply = requestor.request(managementMessage);
      if (ManagementHelper.hasOperationSucceeded(reply))
      {
         HornetQServerLogger.LOGGER.debug("Created connection factory " + name);
      }
      else
      {
         HornetQServerLogger.LOGGER.error("Problem creating " + name);
      }

      requestor.close();
   }
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.