Package org.springframework.jms.listener

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


        messageListenerContainer.start();

        countDownLatch.await();
        messageListenerContainer.stop();
        messageListenerContainer.destroy();

        assertFalse("no message has redelivery > 1", messageRedelivered.get());
    }

    private class ValueHolder<T> {
View Full Code Here


        } catch (Exception e) {
            e.printStackTrace();
        } finally {

            container1.stop();
            container1.destroy();
            container1 = null;

            brokerService1.stop();
            brokerService1 = null;
            brokerService2.stop();
View Full Code Here

            // give it 20 seconds
            while(!latch.await(1, TimeUnit.SECONDS) && count++ < 20) {
                System.out.println("count " + latch.getCount());
            }

            container.destroy();

        } finally {
            try { if(brokerService1 != null) {
                brokerService1.stop();
            }} catch(Throwable t) { t.printStackTrace(); }
View Full Code Here

            executor.shutdown();
            // Thread.sleep(30000);
            assertEquals(TOTAL_MESSAGES, messageCount.get());
        } finally {
            container1.stop();
            container1.destroy();
            container1 = null;
            brokerService1.stop();
            brokerService1 = null;
        }
    }
View Full Code Here

                            System.out.println("concurrent consumer count: "
                                    + container2.getConcurrentConsumers());
                            Thread.sleep(1000);
                        }
                        cachingConnectionFactory.destroy();
                        container2.destroy();
                    } catch (final Throwable t) {
                        t.printStackTrace();
                    }
                    return null;
                }
View Full Code Here

        listener.start();
    }

    public void destroyObject(Object obj) throws Exception {
        DefaultMessageListenerContainer listener = (DefaultMessageListenerContainer)obj;
        listener.destroy();
    }

    public Object makeObject() throws Exception {
        Object obj = JMSFactory.createJmsListener(jmsConfig,
                                                  handler,
View Full Code Here

            executor.shutdown();
            // Thread.sleep(30000);
            Assert.assertEquals(TOTAL_MESSAGES, messageCount.get());
        } finally {
            container1.stop();
            container1.destroy();
            container1 = null;
            brokerService1.stop();
            brokerService1 = null;
        }
    }
View Full Code Here

        } catch (Exception e) {
            e.printStackTrace();
        } finally {

            container1.stop();
            container1.destroy();
            container1 = null;

            brokerService1.stop();
            brokerService1 = null;
            brokerService2.stop();
View Full Code Here

            Assert.assertEquals(NUM_MESSAGE_TO_SEND, messageCount.get());

        } finally {

            container1.stop();
            container1.destroy();
            container1 = null;
            brokerService1.stop();
            brokerService1 = null;

        }
View Full Code Here

            Assert.assertEquals(MAX_PRODUCERS * NUM_MESSAGE_TO_SEND, messageCount.get());
        } finally {

            container1.stop();
            container1.destroy();
            container1 = null;

            brokerService1.stop();
            brokerService1 = null;
            brokerService2.stop();
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.