Package javax.jms

Examples of javax.jms.Session.createTopic()


                    destination = (Destination) ctx.lookup(endpoint.getJndiDestinationName());
                } else if (endpoint.getJmsProviderDestinationName() != null) {
                    if (STYLE_QUEUE.equals(endpoint.getDestinationStyle())) {
                        destination = session.createQueue(endpoint.getJmsProviderDestinationName());
                    } else {
                        destination = session.createTopic(endpoint.getJmsProviderDestinationName());
                    }
                } else {
                    throw new IllegalStateException("No destination provided");
                }
View Full Code Here


                    permanentReplyToDestination = (Destination) ctx.lookup(endpoint.getJndiReplyToName());
                } else if (endpoint.getJmsProviderReplyToName() != null) {
                    if (destination instanceof Queue) {
                        permanentReplyToDestination = session.createQueue(endpoint.getJmsProviderReplyToName());
                    } else {
                        permanentReplyToDestination = session.createTopic(endpoint.getJmsProviderReplyToName());
                    }
                }
            }
        } finally {
            if (session != null) {
View Full Code Here

        connection.setExceptionListener(this);

        Session session = connection.createSession(ackMode == Session.SESSION_TRANSACTED, ackMode);

        _destination = session.createTopic(getName());

        MessageConsumer consumer;

        if (durable)
        {
View Full Code Here

            {
                Destination destination;
                MessageConsumer jmsConsumer;
                if(command.isTopic())
                {
                    Topic topic = session.createTopic(command.getDestinationName());
                    if(command.isDurableSubscription())
                    {
                        String subscription = "subscription-" + command.getParticipantName() + System.currentTimeMillis();
                        jmsConsumer = session.createDurableSubscriber(topic, subscription);
View Full Code Here

        connection = connectionFactory.createConnection();
        connection.start();

        // lets create the consumers
        Session objectSession = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
        Destination destination = objectSession.createTopic(getClass().getName());
        MessageConsumer objectConsumer = objectSession.createConsumer(destination);

        Session textSession = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
        MessageConsumer textConsumer = textSession.createConsumer(destination);
        // lets clear the transformer on this consumer so we see the message as
View Full Code Here

        connection = connectionFactory.createConnection();
        connection.start();

        // lets create the consumers
        Session textSession = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
        Destination destination = textSession.createTopic(getClass().getName());
        MessageConsumer textConsumer = textSession.createConsumer(destination);

        Session objectSession = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
        MessageConsumer objectConsumer = objectSession.createConsumer(destination);
        // lets clear the transformer on this consumer so we see the message as
View Full Code Here

        connection = connectionFactory.createConnection();
        connection.start();

        // lets create the consumers
        Session adaptiveSession = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
        Destination destination = adaptiveSession.createTopic(getClass().getName());
        MessageConsumer adaptiveConsumer = adaptiveSession.createConsumer(destination);

        Session origSession = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
        MessageConsumer origConsumer = origSession.createConsumer(destination);
        // lets clear the transformer on this consumer so we see the message as
View Full Code Here

        connection = connectionFactory.createConnection();
        connection.start();

        // lets create the consumers
        Session adaptiveSession = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
        Destination destination = adaptiveSession.createTopic(getClass().getName());
        MessageConsumer adaptiveConsumer = adaptiveSession.createConsumer(destination);

        Session origSession = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
        MessageConsumer origConsumer = origSession.createConsumer(destination);
        // lets clear the transformer on this consumer so we see the message as
View Full Code Here

        scheduleMessage(connection, TimeUnit.SECONDS.toMillis(6), COUNT);

        Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);

        // Create the Browse Destination and the Reply To location
        Destination management = session.createTopic(ScheduledMessage.AMQ_SCHEDULER_MANAGEMENT_DESTINATION);

        // Create the eventual Consumer to receive the scheduled message
        MessageConsumer consumer = session.createConsumer(destination);

        final CountDownLatch latch = new CountDownLatch(COUNT);
View Full Code Here

        scheduleMessage(connection, TimeUnit.SECONDS.toMillis(20));

        Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);

        // Create the Browse Destination and the Reply To location
        Destination management = session.createTopic(ScheduledMessage.AMQ_SCHEDULER_MANAGEMENT_DESTINATION);
        Destination browseDest = session.createTemporaryQueue();

        // Create the eventual Consumer to receive the scheduled message
        MessageConsumer consumer = session.createConsumer(destination);
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.