Package org.springframework.jms.listener

Examples of org.springframework.jms.listener.DefaultMessageListenerContainer.afterPropertiesSet()


                    countDownLatch.countDown();
                }
            }

        });
        messageListenerContainer.afterPropertiesSet();

        messageListenerContainer.start();

        countDownLatch.await();
        messageListenerContainer.stop();
View Full Code Here


                public void onMessage(final Message message) {
                    broker1Count.incrementAndGet();
                }
            });
            container1.afterPropertiesSet();
            container1.start();
            pool.submit(new Callable<Object>() {

                public Object call() throws Exception {
                    try {
View Full Code Here

                            public void onMessage(final Message message) {
                                broker2Count.incrementAndGet();
                            }
                        });
                        container2.afterPropertiesSet();
                        container2.start();
                        final CachingConnectionFactory cachingConnectionFactory = new CachingConnectionFactory(
                                singleConnectionFactory2);
                        final JmsTemplate template = new JmsTemplate(
                                cachingConnectionFactory);
View Full Code Here

            public void onMessage(final Message message) {
                broker1Count.incrementAndGet();
            }
        });
        container1.afterPropertiesSet();
        container1.start();
        pool.submit(new Callable<Object>() {

            public Object call() throws Exception {
                System.setProperty("lbt.brokerName", "two");
View Full Code Here

                    public void onMessage(final Message message) {
                        broker2Count.incrementAndGet();
                    }
                });
                container2.afterPropertiesSet();
                container2.start();
               
               
                assertTrue("wait for start signal", startProducer.await(20, TimeUnit.SECONDS));
               
View Full Code Here

      pcf = new PooledConnectionFactory(acf);

      // Only listen on the first queue.. let the 2nd queue fill up.
      doneLatch = new CountDownLatch(NUM_MESSAGE_TO_SEND);
      container1 = createDefaultMessageListenerContainer(acf,  new TestMessageListener1(500), QUEUE1_NAME);
      container1.afterPropertiesSet();

      Thread.sleep(2000);

      final ExecutorService executor = Executors.newCachedThreadPool();
      for (int i = 0; i < MAX_PRODUCERS; i++) {
View Full Code Here

      Thread.sleep(1000);

      doneLatch = new CountDownLatch(MAX_PRODUCERS * NUM_MESSAGE_TO_SEND);
      container1 = createDefaultMessageListenerContainer(acf2, new TestMessageListener1(500), QUEUE1_NAME);
      container1.afterPropertiesSet();

      final ExecutorService executor = Executors.newCachedThreadPool();
      for (int i = 0; i < MAX_PRODUCERS; i++) {
        executor.submit(new PooledProducerTask(pcf, QUEUE2_NAME));
        Thread.sleep(1000);
View Full Code Here

      doneLatch = new CountDownLatch(NUM_MESSAGE_TO_SEND*MAX_PRODUCERS);

      container1 = createDefaultMessageListenerContainer(acf2, new TestMessageListener1(500), QUEUE1_NAME);
      container1.afterPropertiesSet();
      container2 = createDefaultMessageListenerContainer(acf2, new TestMessageListener1(30000), QUEUE2_NAME);
      container2.afterPropertiesSet();

      final ExecutorService executor = Executors.newCachedThreadPool();
      for (int i = 0; i < MAX_PRODUCERS; i++) {
        executor.submit(new NonPooledProducerTask(acf1, QUEUE2_NAME));
        Thread.sleep(1000);
View Full Code Here

            pcf = new PooledConnectionFactory(acf);

            // Only listen on the first queue.. let the 2nd queue fill up.
            doneLatch = new CountDownLatch(NUM_MESSAGE_TO_SEND);
            container1 = createDefaultMessageListenerContainer(acf, new TestMessageListener1(500), QUEUE1_NAME);
            container1.afterPropertiesSet();

            Thread.sleep(2000);

            final ExecutorService executor = Executors.newCachedThreadPool();
            for (int i = 0; i < MAX_PRODUCERS; i++) {
View Full Code Here

            Thread.sleep(1000);

            doneLatch = new CountDownLatch(MAX_PRODUCERS * NUM_MESSAGE_TO_SEND);
            container1 = createDefaultMessageListenerContainer(acf2, new TestMessageListener1(500), QUEUE1_NAME);
            container1.afterPropertiesSet();

            final ExecutorService executor = Executors.newCachedThreadPool();
            for (int i = 0; i < MAX_PRODUCERS; i++) {
                executor.submit(new PooledProducerTask(pcf, QUEUE2_NAME));
                Thread.sleep(1000);
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.