Package org.springframework.jms.listener

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


                            public void onMessage(final Message message) {
                                broker2Count.incrementAndGet();
                            }
                        });
                        container2.afterPropertiesSet();
                        container2.start();
                        final CachingConnectionFactory cachingConnectionFactory = new CachingConnectionFactory(
                                singleConnectionFactory2);
                        final JmsTemplate template = new JmsTemplate(
                                cachingConnectionFactory);
                        final ActiveMQQueue queue = new ActiveMQQueue(
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");
                final ActiveMQConnectionFactory connectionFactory2 = new ActiveMQConnectionFactory(
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));
               
                final CachingConnectionFactory cachingConnectionFactory = new 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 {
                    try {
                        final ActiveMQConnectionFactory connectionFactory2 = new ActiveMQConnectionFactory(
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));

                        final CachingConnectionFactory cachingConnectionFactory = new CachingConnectionFactory(
                                singleConnectionFactory2);
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");
                final ActiveMQConnectionFactory connectionFactory2 = new ActiveMQConnectionFactory(
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));
               
                final CachingConnectionFactory cachingConnectionFactory = new CachingConnectionFactory(
View Full Code Here

            }

        });
        messageListenerContainer.afterPropertiesSet();

        messageListenerContainer.start();

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

                latch.countDown();
            }
        });
        container.setMaxMessagesPerTask(1);
        container.afterPropertiesSet();
        container.start();

        pool.submit(new Callable<Object>() {
            public Object call() throws Exception {
                try {
                    final int batch = 10;
View Full Code Here

            // defaultMessageListenerContainer.start();
        }

        for (DefaultMessageListenerContainer defaultMessageListenerContainer : defaultMessageListenerContainers) {
            defaultMessageListenerContainer.afterPropertiesSet();
            defaultMessageListenerContainer.start();
        }
    }

    @PreDestroy
    public void destroy() {
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.