Examples of LocalTopic


Examples of net.timewalker.ffmq3.local.destination.LocalTopic

                  break;
              Thread.sleep(100);
          }
         
          // When in non-transacted mode, the ack is sent _after_ message processing so we need to wait a bit
          LocalTopic localTopic = engine.getLocalTopic(params.destinationName);
          if (!params.receiverTransacted)
          {
              while (localTopic.getSize() > 0)
                  Thread.sleep(10);
          }

          long endTime = System.currentTimeMillis();
          double rate = (double)totalExpected*1000/(endTime-startTime);
          System.out.println((endTime-startTime)+" ms ("+rateFormat.format(rate)+" msg/s)");

          int totalReceived = 0;
          for (int n = 0 ; n < receivers.length ; n++)
              totalReceived += receivers[n].getReceivedCount();
         
          int topicSize = localTopic.getSize();
          if (topicSize > 0)
          {
              System.out.println("Expected : "+totalExpected);
              System.out.println("Received : "+totalReceived);
              System.out.println(localTopic);
              System.out.println(localTopic.getConsumersSummary());              
              TestUtils.dumpThreads();
              TestUtils.hang();
          }
         
          // Close receivers
View Full Code Here

Examples of net.timewalker.ffmq3.local.destination.LocalTopic

                break;
            Thread.sleep(100);
        }

        // When in non-transacted mode, the ack is sent _after_ message processing so we need to wait a bit
        LocalTopic localTopic = engine.getLocalTopic(params.destinationName);
        if (!params.receiverTransacted)
        {
          while (localTopic.getSize() > 0)
            Thread.sleep(10);
        }
       
        long endTime = System.currentTimeMillis();
        double rate = (double)totalExpected*1000/(endTime-startTime);
        System.out.println((endTime-startTime)+" ms ("+rateFormat.format(rate)+" msg/s)");

        int totalReceived = 0;
        for (int n = 0 ; n < receivers.length ; n++)
            totalReceived += receivers[n].getReceivedCount();

        int topicSize = localTopic.getSize();
        if (topicSize > 0)
        {
            System.out.println("Expected : "+totalExpected);
            System.out.println("Received : "+totalReceived);
            System.out.println(localTopic);
            System.out.println(localTopic.getConsumersSummary());              
            TestUtils.dumpThreads();
            TestUtils.hang();
        }
       
        // Close receivers
View Full Code Here

Examples of net.timewalker.ffmq3.local.destination.LocalTopic

                break;
            Thread.sleep(100);
        }

        // When in non-transacted mode, the ack is sent _after_ message processing so we need to wait a bit
        LocalTopic localTopic = engine.getLocalTopic(params.destinationName);
        if (!params.receiverTransacted)
        {
            while (localTopic.getSize() > 0)
                Thread.sleep(10);
        }
       
        long endTime = System.currentTimeMillis();
        double rate = (double)totalExpected*1000/(endTime-startTime);
        System.out.println((endTime-startTime)+" ms ("+rateFormat.format(rate)+" msg/s)");

        int totalReceived = 0;
        for (int n = 0 ; n < receivers.length ; n++)
            totalReceived += receivers[n].getReceivedCount();

        int topicSize = localTopic.getSize();
        if (topicSize > 0)
        {
            System.out.println("Expected : "+totalExpected);
            System.out.println("Received : "+totalReceived);
            System.out.println(localTopic);
            System.out.println(localTopic.getConsumersSummary());              
            TestUtils.dumpThreads();
            TestUtils.hang();
        }

        // Close receivers
View Full Code Here

Examples of net.timewalker.ffmq3.local.destination.LocalTopic

                break;
            Thread.sleep(100);
        }

        // When in non-transacted mode, the ack is sent _after_ message processing so we need to wait a bit
        LocalTopic localTopic = engine.getLocalTopic(params.destinationName);
        if (!params.receiverTransacted)
        {
          while (localTopic.getSize() > 0)
            Thread.sleep(10);
        }
       
        long endTime = System.currentTimeMillis();
        double rate = (double)totalExpected*1000/(endTime-startTime);
        System.out.println((endTime-startTime)+" ms ("+rateFormat.format(rate)+" msg/s)");

        int totalReceived = 0;
        for (int n = 0 ; n < receivers.length ; n++)
            totalReceived += receivers[n].getReceivedCount();

        int topicSize = localTopic.getSize();
        if (topicSize > 0)
        {
            System.out.println("Expected : "+totalExpected);
            System.out.println("Received : "+totalReceived);
            System.out.println(localTopic);
            System.out.println(localTopic.getConsumersSummary());              
            TestUtils.dumpThreads();
            TestUtils.hang();
        }

        // Close receivers
View Full Code Here

Examples of net.timewalker.ffmq3.local.destination.LocalTopic

             throw new IllegalStateException("Temporary queue does not belong to session's connection.");
      }
      else
      if (destination instanceof LocalTopic)
      { 
        LocalTopic localTopic = (LocalTopic)destination;
          if (localTopic.isTemporary() && !connection.isRegisteredTemporaryTopic(localTopic.getTopicName()))
             throw new IllegalStateException("Temporary topic does not belong to session's connection.");
      }
      else
        throw new FFMQException("Unexpected destination type : "+destination,"INTERNAL_ERROR");
    }
View Full Code Here

Examples of net.timewalker.ffmq3.local.destination.LocalTopic

            {
              List topics = new ArrayList();
              topics.addAll(topicMap.values());
              for (int i = 0; i < topics.size(); i++)
                {
                    LocalTopic localTopic = (LocalTopic)topics.get(i);
                    try
                    {
                      undeployTopic(localTopic);
                    }
                    catch (JMSException e)
View Full Code Here

Examples of net.timewalker.ffmq3.local.destination.LocalTopic

     */
    public void deleteTopic( String topicName ) throws JMSException
    {
        synchronized (topicMap)
        {
            LocalTopic topic = (LocalTopic)topicMap.remove(topicName);
            if (topic != null)
            {
                undeployTopic(topic);
                log.debug("Undeployed local topic : "+topicName);
            }
View Full Code Here

Examples of net.timewalker.ffmq3.local.destination.LocalTopic

     */
    public LocalTopic getLocalTopic( String topicName ) throws JMSException
    {
        synchronized (topicMap)
        {
            LocalTopic topic = (LocalTopic)topicMap.get(topicName);
            if (topic == null)
                return loadOrAutoCreateTopic(topicName);
           
            return topic;
        }
View Full Code Here

Examples of net.timewalker.ffmq3.local.destination.LocalTopic

     */
    public boolean localTopicExists( String topicName ) throws JMSException
    {
        synchronized (topicMap)
        {
            LocalTopic topic = (LocalTopic)topicMap.get(topicName);
            if (topic != null)
                return true;
           
            // Check if a definition exists
            if (destinationDefinitionProvider.getTopicDefinition(topicName) != null)
View Full Code Here

Examples of net.timewalker.ffmq3.local.destination.LocalTopic

    private LocalTopic loadOrAutoCreateTopic( String topicName ) throws JMSException
    {
        TopicDefinition topicDef = destinationDefinitionProvider.getTopicDefinition(topicName);
        if (topicDef != null)
        {
            LocalTopic topic = new LocalTopic(topicDef);
            deployTopic(topic);
            return topic;
        }
       
        // Topic auto-creation
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.