Package org.fcrepo.server.messaging

Examples of org.fcrepo.server.messaging.JMSManager.listen()


    @Test
    public void testVMMessage() throws Exception {
        String topic = "jmsmanager.test";
        properties.setProperty("topic." + topic, topic);
        JMSManager jmsMgr = new JMSManager(properties);
        jmsMgr.listen(topic, this);
        jmsMgr.send(topic, messageText);
        checkMessage(topic, DestinationType.Topic, messageText);
        jmsMgr.close();
    }
View Full Code Here


    @Test
    public void testCreateTopic() throws Exception {
        String topic = "jmsmanager.test";
        JMSManager jmsMgr = new JMSManager(properties);
        jmsMgr.createDestination(topic, DestinationType.Topic);
        jmsMgr.listen(topic, this);
        jmsMgr.send(topic, messageText);
        checkMessage(topic, DestinationType.Topic, messageText);
        jmsMgr.close();
    }
View Full Code Here

    @Test
    public void testCreateQueue() throws Exception {
        String queue = "jmsmanager";
        JMSManager jmsMgr = new JMSManager(properties);
        jmsMgr.createDestination(queue, DestinationType.Queue);
        jmsMgr.listen(queue, this);
        jmsMgr.send(queue, messageText);
        checkMessage(queue, DestinationType.Queue, messageText);
        jmsMgr.close();
    }
View Full Code Here

        String topic = "jmsmanager.test";
        JMSManager jmsMgr = new JMSManager(properties);
        Destination destination =
            jmsMgr.createDestination(topic, DestinationType.Topic);
        TextMessage textMessage = jmsMgr.createTextMessage(topic, messageText);
        jmsMgr.listen(destination, this);
        jmsMgr.send(destination, textMessage);
        checkMessage(topic, DestinationType.Topic, messageText);
        jmsMgr.close();
    }
View Full Code Here

        String topic = "jmsmanager.test";
        JMSManager jmsMgr = new JMSManager(properties);
        jmsMgr.createDestination(topic, DestinationType.Topic);

        String messageSelector = "jmsProperty IN ('selectMe')";
        jmsMgr.listen(topic, messageSelector, this);

        TextMessage textMessage = jmsMgr.createTextMessage(topic, messageText);
        textMessage.setStringProperty("jmsProperty", "selectMe");
        jmsMgr.send(topic, textMessage);
        checkMessage(topic, DestinationType.Topic, messageText);
View Full Code Here

    @Test
    public void testSendMessages() throws Exception {
        String topic = "jmsmanager.test";
        JMSManager jmsMgr = new JMSManager(properties);
        jmsMgr.createDestination(topic, DestinationType.Topic);
        jmsMgr.listen(topic, this);

        TextMessage textMessage = jmsMgr.createTextMessage(topic, messageText);
        jmsMgr.send(topic, textMessage);
        checkMessage(topic, DestinationType.Topic, messageText);
View Full Code Here

    @Test
    public void testMessageVolume() throws Exception {
        String topic = "jmsmanager.test";
        JMSManager jmsMgr = new JMSManager(properties);
        jmsMgr.createDestination(topic, DestinationType.Topic);
        jmsMgr.listen(topic, this);

        int sentMessages = 0;
        for(int i=0; i<timeout; i++) {
            jmsMgr.send(topic, messageText);
            ++sentMessages;
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.