Package org.apache.oozie.jms

Examples of org.apache.oozie.jms.ConnectionContext.createSession()


        Date nominalTime = DateUtils.parseDateUTC("2011-07-11T00:00Z");
        CoordinatorActionEvent cae = new CoordinatorActionEvent("caId1", "caJobId1", CoordinatorAction.Status.FAILED,
                "user1", "wf-app-name1", nominalTime, startDate, null);
        ConnectionContext jmsContext = getConnectionContext();
        try {
            Session session = jmsContext.createSession(Session.AUTO_ACKNOWLEDGE);
            // Pass a selector which wont match and assert for null message
            String selector = JMSHeaderConstants.USER + "='Non_matching_user'";
            MessageConsumer consumer = jmsContext.createConsumer(session, coordEventListener.getTopic(cae), selector);
            coordEventListener.onCoordinatorActionEvent(cae);
            TextMessage message = (TextMessage) consumer.receive(5000);
View Full Code Here


        assertFalse(jmsService.isConnectionInRetryList(connInfo));
        assertFalse(jmsService.isTopicInRetryList(connInfo, topic));
        ConnectionContext connCtxt = jmsService.createConnectionContext(connInfo);
        broker.stop();
        try {
            connCtxt.createSession(Session.AUTO_ACKNOWLEDGE);
            fail("Exception expected");
        }
        catch (Exception e) {
            Thread.sleep(100);
            assertFalse(jmsService.isListeningToTopic(connInfo, topic));
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.