Package net.timewalker.ffmq3.test.local.session

Examples of net.timewalker.ffmq3.test.local.session.LocalSessionTest


        return null;
    }
   
    private String processCreateTopic( Message msg ) throws JMSException
    {
        Settings topicSettings = createSettings(msg);
        TopicDefinition topicDef = new TopicDefinition(topicSettings);

        log.debug("Creating topic : "+topicDef);
        engine.createTopic(topicDef);
       
View Full Code Here


      QueueConnection connection = null;
      try
      {
          Queue queue = new QueueRef(params.destinationName);
         
          SynchronizationPoint startSynchro = new SynchronizationPoint();
          connection = createQueueConnection();
         
          // Start receivers
          QueueReceiverThread[] receivers = new QueueReceiverThread[params.receiverCount];
          for (int n = 0 ; n < receivers.length ; n++)
              receivers[n] = new QueueReceiverThread("Receiver"+(n+1),
                                                     startSynchro,
                                                     connection,
                                                     params.receiverTransacted,
                                                     params.acknowledgeMode,
                                                     queue,
                                                     null);
          for (int n = 0 ; n < receivers.length ; n++)
          {
              receivers[n].start();
              receivers[n].waitForStartup();
          }
         
          // Start senders
          QueueSenderThread[] senders = new QueueSenderThread[params.senderCount];
          int totalExpected = 0;
          for (int n = 0 ; n < senders.length ; n++)
          {
              senders[n] = new QueueSenderThread("Sender"+(n+1),
                                                 msgFactory,
                                                 startSynchro,
                                                 connection,
                                                 params.senderTransacted,
                                                 params.messageCount/params.senderCount,
                                                 params.messageSize,
                                                 params.minDelay,
                                                 params.maxDelay,
                                                 queue,
                                                 params.deliveryMode,
                                                 params.priority,
                                                 params.timeToLive);
              totalExpected += params.messageCount/params.senderCount;
          }
          for (int n = 0 ; n < senders.length ; n++)
          {
              senders[n].start();
              senders[n].waitForStartup();
          }
         
          connection.start();
         
          long startTime = System.currentTimeMillis();
          startSynchro.reach();
         
          // Wait for senders to complete
          for (int n = 0 ; n < senders.length ; n++)
          {
              senders[n].join(TestUtils.TEST_TIMEOUT*1000);
 
View Full Code Here

      QueueConnection producerConnection = null;
      try
      {
          Queue queue = new QueueRef(params.destinationName);
         
          SynchronizationPoint startSynchro = new SynchronizationPoint();
          listenerConnection = createQueueConnection();
          producerConnection = createQueueConnection();
         
          // Start receivers
          QueueListenerThread[] receivers = new QueueListenerThread[params.receiverCount];
          for (int n = 0 ; n < receivers.length ; n++)
              receivers[n] = new QueueListenerThread("Receiver"+(n+1),
                                                     startSynchro,
                                                     listenerConnection,
                                                     params.receiverTransacted,
                                                     params.acknowledgeMode,
                                                     queue,
                                                     null);
          for (int n = 0 ; n < receivers.length ; n++)
          {
              receivers[n].start();
              receivers[n].waitForStartup();
          }
         
          // Start senders
          QueueSenderThread[] senders = new QueueSenderThread[params.senderCount];
          int totalExpected = 0;
          for (int n = 0 ; n < senders.length ; n++)
          {
              senders[n] = new QueueSenderThread("Sender"+(n+1),
                                                 msgFactory,
                                                 startSynchro,
                                                 producerConnection,
                                                 params.senderTransacted,
                                                 params.messageCount/params.senderCount,
                                                 params.messageSize,
                                                 params.minDelay,
                                                 params.maxDelay,
                                                 queue,
                                                 params.deliveryMode,
                                                 params.priority,
                                                 params.timeToLive);
              totalExpected += params.messageCount/params.senderCount;
          }
          for (int n = 0 ; n < senders.length ; n++)
          {
              senders[n].start();
              senders[n].waitForStartup();
          }
         
          listenerConnection.start();
         
          long startTime = System.currentTimeMillis();
          startSynchro.reach();
         
          // Wait for senders to complete
          for (int n = 0 ; n < senders.length ; n++)
              senders[n].join(TestUtils.TEST_TIMEOUT*1000);
          for (int n = 0 ; n < senders.length ; n++)
View Full Code Here

      QueueConnection[] sendersConnections = null;
      try
      {
          Queue queue = new QueueRef(params.destinationName);
         
          SynchronizationPoint startSynchro = new SynchronizationPoint();
          receiverConnections = new QueueConnection[params.receiverCount];
          for (int n = 0 ; n < receiverConnections.length ; n++)
              receiverConnections[n] = createQueueConnection();
         
          // Start receivers
          QueueReceiverThread[] receivers = new QueueReceiverThread[params.receiverCount];
          for (int n = 0 ; n < receivers.length ; n++)
              receivers[n] = new QueueReceiverThread("Receiver"+(n+1),
                                                     startSynchro,
                                                     receiverConnections[n],
                                                     params.receiverTransacted,
                                                     params.acknowledgeMode,
                                                     queue,
                                                     null);
          for (int n = 0 ; n < receivers.length ; n++)
          {
              receivers[n].start();
              receivers[n].waitForStartup();
          }
         
          sendersConnections = new QueueConnection[params.senderCount];
          for (int n = 0 ; n < sendersConnections.length ; n++)
              sendersConnections[n] = createQueueConnection();
         
          // Start senders
          QueueSenderThread[] senders = new QueueSenderThread[params.senderCount];
          int totalExpected = 0;
          for (int n = 0 ; n < senders.length ; n++)
          {
              senders[n] = new QueueSenderThread("Sender"+(n+1),
                                                 msgFactory,
                                                 startSynchro,
                                                 sendersConnections[n],
                                                 params.senderTransacted,
                                                 params.messageCount/params.senderCount,
                                                 params.messageSize,
                                                 params.minDelay,
                                                 params.maxDelay,
                                                 queue,
                                                 params.deliveryMode,
                                                 params.priority,
                                                 params.timeToLive);
              totalExpected += params.messageCount/params.senderCount;
          }
          for (int n = 0 ; n < senders.length ; n++)
          {
              senders[n].start();
              senders[n].waitForStartup();
          }
         
          for (int n = 0 ; n < receiverConnections.length ; n++)
              receiverConnections[n].start();
         
          long startTime = System.currentTimeMillis();
          startSynchro.reach();
         
          // Wait for senders to complete
          for (int n = 0 ; n < senders.length ; n++)
          {
              senders[n].join(TestUtils.TEST_TIMEOUT*1000);
 
View Full Code Here

      QueueConnection[] sendersConnections = null;
      try
      {
          Queue queue = new QueueRef(params.destinationName);
         
          SynchronizationPoint startSynchro = new SynchronizationPoint();
          receiverConnections = new QueueConnection[params.receiverCount];
          for (int n = 0 ; n < receiverConnections.length ; n++)
              receiverConnections[n] = createQueueConnection();
 
          // Start receivers
          QueueListenerThread[] receivers = new QueueListenerThread[params.receiverCount];
          for (int n = 0 ; n < receivers.length ; n++)
              receivers[n] = new QueueListenerThread("Receiver"+(n+1),
                                                     startSynchro,
                                                     receiverConnections[n],
                                                     params.receiverTransacted,
                                                     params.acknowledgeMode,
                                                     queue,
                                                     null);
          for (int n = 0 ; n < receivers.length ; n++)
          {
              receivers[n].start();
              receivers[n].waitForStartup();
          }
         
          sendersConnections = new QueueConnection[params.senderCount];
          for (int n = 0 ; n < sendersConnections.length ; n++)
              sendersConnections[n] = createQueueConnection();
         
          // Start senders
          QueueSenderThread[] senders = new QueueSenderThread[params.senderCount];
          int totalExpected = 0;
          for (int n = 0 ; n < senders.length ; n++)
          {
              senders[n] = new QueueSenderThread("Sender"+(n+1),
                                                 msgFactory,
                                                 startSynchro,
                                                 sendersConnections[n],
                                                 params.senderTransacted,
                                                 params.messageCount/params.senderCount,
                                                 params.messageSize,
                                                 params.minDelay,
                                                 params.maxDelay,
                                                 queue,
                                                 params.deliveryMode,
                                                 params.priority,
                                                 params.timeToLive);
              totalExpected += params.messageCount/params.senderCount;
          }
          for (int n = 0 ; n < senders.length ; n++)
          {
              senders[n].start();
              senders[n].waitForStartup();
          }
         
          for (int n = 0 ; n < receiverConnections.length ; n++)
              receiverConnections[n].start();
         
          long startTime = System.currentTimeMillis();
          startSynchro.reach();
         
          // Wait for senders to complete
          for (int n = 0 ; n < senders.length ; n++)
              senders[n].join(TestUtils.TEST_TIMEOUT*1000);
          for (int n = 0 ; n < senders.length ; n++)
View Full Code Here

      TopicConnection connection = null;
      try
      {
          Topic topic = new TopicRef(params.destinationName);
         
          SynchronizationPoint startSynchro = new SynchronizationPoint();
          connection = createTopicConnection();
         
          // Start receivers
          TopicSubscriberThread[] receivers = new TopicSubscriberThread[params.receiverCount];
          for (int n = 0 ; n < receivers.length ; n++)
              receivers[n] = new TopicSubscriberThread("Receiver"+(n+1),
                                                   startSynchro,
                                                       connection,
                                                       params.receiverTransacted,
                                                       params.acknowledgeMode,
                                                       topic,
                                                       null,
                                                       false);
          for (int n = 0 ; n < receivers.length ; n++)
          {
              receivers[n].start();
              receivers[n].waitForStartup();
          }

          // Start senders
          TopicPublisherThread[] senders = new TopicPublisherThread[params.senderCount];
          int totalExpected = params.messageCount*params.receiverCount;
          for (int n = 0 ; n < senders.length ; n++)
          {
              senders[n] = new TopicPublisherThread("Sender"+(n+1),
                                                    msgFactory,
                                                    startSynchro,
                                                    connection,
                                                    params.senderTransacted,
                                                    params.messageCount/params.senderCount,
                                                    params.messageSize,
                                                    params.minDelay,
                                                    params.maxDelay,
                                                    topic,
                                                    params.deliveryMode,
                                                    params.priority,
                                                    params.timeToLive);
          }
          for (int n = 0 ; n < senders.length ; n++)
          {
              senders[n].start();
              senders[n].waitForStartup();
          }
          connection.start();
         
          long startTime = System.currentTimeMillis();
          startSynchro.reach();
         
          // Wait for senders to complete
          for (int n = 0 ; n < senders.length ; n++)
          {
              senders[n].join(TestUtils.TEST_TIMEOUT*1000);
 
View Full Code Here

   
    protected void singleTopicConnectionListenerTest( String testName , CommTestParameters params , DummyMessageFactory msgFactory ) throws Exception
    {
        Topic topic = new TopicRef(params.destinationName);
       
        SynchronizationPoint startSynchro = new SynchronizationPoint();
        TopicConnection connection = createTopicConnection();

        // Start receivers
        TopicListenerThread[] receivers = new TopicListenerThread[params.receiverCount];
        for (int n = 0 ; n < receivers.length ; n++)
            receivers[n] = new TopicListenerThread("Receiver"+(n+1),
                                               startSynchro,
                                                   connection,
                                                   params.receiverTransacted,
                                                   params.acknowledgeMode,
                                                   topic,
                                                   null,
                                                   false);
        for (int n = 0 ; n < receivers.length ; n++)
        {
            receivers[n].start();
            receivers[n].waitForStartup();
        }
       
        // Start senders
        TopicPublisherThread[] senders = new TopicPublisherThread[params.senderCount];
        int totalExpected = params.messageCount*params.receiverCount;
        for (int n = 0 ; n < senders.length ; n++)
        {
            senders[n] = new TopicPublisherThread("Sender"+(n+1),
                                                  msgFactory,
                                                  startSynchro,
                                                  connection,
                                                  params.senderTransacted,
                                                  params.messageCount/params.senderCount,
                                                  params.messageSize,
                                                  params.minDelay,
                                                  params.maxDelay,
                                                  topic,
                                                  params.deliveryMode,
                                                  params.priority,
                                                  params.timeToLive);
        }
        for (int n = 0 ; n < senders.length ; n++)
        {
            senders[n].start();
            senders[n].waitForStartup();
        }
       
        connection.start();

        long startTime = System.currentTimeMillis();
        startSynchro.reach();
       
        // Wait for senders to complete
        for (int n = 0 ; n < senders.length ; n++)
            senders[n].join(TestUtils.TEST_TIMEOUT*1000);
        for (int n = 0 ; n < senders.length ; n++)
View Full Code Here

   
    protected void multiTopicConnectionReceiverTest( String testName , CommTestParameters params , DummyMessageFactory msgFactory ) throws Exception
    {
        Topic topic = new TopicRef(params.destinationName);
       
        SynchronizationPoint startSynchro = new SynchronizationPoint();
        TopicConnection[] receiverConnections = new TopicConnection[params.receiverCount];
        for (int n = 0 ; n < receiverConnections.length ; n++)
            receiverConnections[n] = createTopicConnection();
       
        // Start receivers
        TopicSubscriberThread[] receivers = new TopicSubscriberThread[params.receiverCount];
        for (int n = 0 ; n < receivers.length ; n++)
            receivers[n] = new TopicSubscriberThread("Receiver"+(n+1),
                                               startSynchro,
                                                   receiverConnections[n],
                                                   params.receiverTransacted,
                                                   params.acknowledgeMode,
                                                   topic,
                                                   null,
                                                   true);
        for (int n = 0 ; n < receivers.length ; n++)
        {
            receivers[n].start();
            receivers[n].waitForStartup();
        }
       
        TopicConnection[] sendersConnections = new TopicConnection[params.senderCount];
        for (int n = 0 ; n < sendersConnections.length ; n++)
            sendersConnections[n] = createTopicConnection();
       
        // Start senders
        TopicPublisherThread[] senders = new TopicPublisherThread[params.senderCount];
        int totalExpected = params.messageCount*params.receiverCount;
        for (int n = 0 ; n < senders.length ; n++)
        {
            senders[n] = new TopicPublisherThread("Sender"+(n+1),
                                                  msgFactory,
                                                  startSynchro,
                                                  sendersConnections[n],
                                                  params.senderTransacted,
                                                  params.messageCount/params.senderCount,
                                                  params.messageSize,
                                                  params.minDelay,
                                                  params.maxDelay,
                                                  topic,
                                                  params.deliveryMode,
                                                  params.priority,
                                                  params.timeToLive);
        }
        for (int n = 0 ; n < senders.length ; n++)
        {
            senders[n].start();
            senders[n].waitForStartup();
        }
       
        for (int n = 0 ; n < receiverConnections.length ; n++)
            receiverConnections[n].start();
       
        long startTime = System.currentTimeMillis();
        startSynchro.reach();
       
        // Wait for senders to complete
        for (int n = 0 ; n < senders.length ; n++)
        {
            senders[n].join(TestUtils.TEST_TIMEOUT*1000);
 
View Full Code Here

   
    protected void multiTopicConnectionListenerTest( String testName , CommTestParameters params , DummyMessageFactory msgFactory ) throws Exception
    {
        Topic topic = new TopicRef(params.destinationName);
       
        SynchronizationPoint startSynchro = new SynchronizationPoint();
        TopicConnection[] receiverConnections = new TopicConnection[params.receiverCount];
        for (int n = 0 ; n < receiverConnections.length ; n++)
            receiverConnections[n] = createTopicConnection();

        // Start receivers
        TopicListenerThread[] receivers = new TopicListenerThread[params.receiverCount];
        for (int n = 0 ; n < receivers.length ; n++)
            receivers[n] = new TopicListenerThread("Receiver"+(n+1),
                                               startSynchro,
                                                   receiverConnections[n],
                                                   params.receiverTransacted,
                                                   params.acknowledgeMode,
                                                   topic,
                                                   null,
                                                   false);
        for (int n = 0 ; n < receivers.length ; n++)
        {
            receivers[n].start();
            receivers[n].waitForStartup();
        }
       
        TopicConnection[] sendersConnections = new TopicConnection[params.senderCount];
        for (int n = 0 ; n < sendersConnections.length ; n++)
            sendersConnections[n] = createTopicConnection();
       
        // Start senders
        TopicPublisherThread[] senders = new TopicPublisherThread[params.senderCount];
        int totalExpected = params.messageCount*params.receiverCount;
        for (int n = 0 ; n < senders.length ; n++)
        {
            senders[n] = new TopicPublisherThread("Sender"+(n+1),
                                                  msgFactory,
                                                  startSynchro,
                                                  sendersConnections[n],
                                                  params.senderTransacted,
                                                  params.messageCount/params.senderCount,
                                                  params.messageSize,
                                                  params.minDelay,
                                                  params.maxDelay,
                                                  topic,
                                                  params.deliveryMode,
                                                  params.priority,
                                                  params.timeToLive);
        }
        for (int n = 0 ; n < senders.length ; n++)
        {
            senders[n].start();
            senders[n].waitForStartup();
        }
       
        for (int n = 0 ; n < receiverConnections.length ; n++)
            receiverConnections[n].start();
       
        long startTime = System.currentTimeMillis();
        startSynchro.reach();
       
        // Wait for senders to complete
        for (int n = 0 ; n < senders.length ; n++)
            senders[n].join(TestUtils.TEST_TIMEOUT*1000);
        for (int n = 0 ; n < senders.length ; n++)
View Full Code Here

        String securityDescriptorFilePath = settings.getStringProperty(FFMQServerSettings.SECURITY_CONNECTOR_XML_SECURITY, DEFAULT_SECURITY_FILE);
        File securityDescriptorFile = new File(securityDescriptorFilePath);
        if (!securityDescriptorFile.canRead())
            throw new FFMQException("Cannot access security descriptor file : "+securityDescriptorFile.getAbsolutePath(),"FS_ERROR");
       
        this.descriptor = (XMLSecurityDescriptor)new XMLDescriptorReader().read(securityDescriptorFile, XMLSecurityDescriptorHandler.class);
        this.descriptor.check();
    }
View Full Code Here

TOP

Related Classes of net.timewalker.ffmq3.test.local.session.LocalSessionTest

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.