Examples of createQueueConnection()


Examples of javax.jms.QueueConnectionFactory.createQueueConnection()

      // Get the ConnectionFactory from JNDI
      final QueueConnectionFactory factory = (QueueConnectionFactory) NAMING_CONTEXT
            .lookup(JNDI_NAME_CONNECTION_FACTORY);

      // Make a Connection
      final QueueConnection connection = factory.createQueueConnection();
      final QueueSession sendSession = connection.createQueueSession(false, QueueSession.AUTO_ACKNOWLEDGE);

      // Make the message
      final TextMessage message = sendSession.createTextMessage(contents);
View Full Code Here

Examples of javax.jms.QueueConnectionFactory.createQueueConnection()

            if (USE_SECURITY_PROPERTIES){
                principal = getPrincipal(context);
                credentials = getCredentials(context);
            }
            if (principal != null && credentials != null) {
                connection = factory.createQueueConnection(principal, credentials);
            } else {
                connection = factory.createQueueConnection();
            }

            session = connection.createQueueSession(false, Session.AUTO_ACKNOWLEDGE);
View Full Code Here

Examples of javax.jms.QueueConnectionFactory.createQueueConnection()

                credentials = getCredentials(context);
            }
            if (principal != null && credentials != null) {
                connection = factory.createQueueConnection(principal, credentials);
            } else {
                connection = factory.createQueueConnection();
            }

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

            if (LOGGER.isDebugEnabled()) {
View Full Code Here

Examples of javax.jms.QueueConnectionFactory.createQueueConnection()

                QueueBrowser qBrowser = null;
                try {
                    qConFactory = (QueueConnectionFactory) kernel.invoke(
                            ObjectName.getInstance(CONNECTION_FACTORY_NAME),
                            "$getResource");
                    qConnection = qConFactory.createQueueConnection();
                    qSession = qConnection.createQueueSession(false,
                            QueueSession.AUTO_ACKNOWLEDGE);
                    qBrowser = qSession.createBrowser(queue);
                    qConnection.start();
                    for (Enumeration e = qBrowser.getEnumeration(); e
View Full Code Here

Examples of javax.jms.QueueConnectionFactory.createQueueConnection()

        QueueSession session = null;
        try {
            QueueConnectionFactory qcf = lookup(server, "RemoteConnectionFactory", QueueConnectionFactory.class);
            Queue queue = lookup(server, queueName, Queue.class);

            conn = qcf.createQueueConnection();
            conn.start();
            session = conn.createQueueSession(false, QueueSession.AUTO_ACKNOWLEDGE);

            // Set the async listener
            QueueReceiver recv = session.createReceiver(queue);
View Full Code Here

Examples of javax.jms.TopicConnectionFactory.createQueueConnection()

                } else {
                    QueueConnectionFactory factory = (QueueConnectionFactory)
                            context.lookup(OPENJMS_QUEUE);
                    context.close();

                    return factory.createQueueConnection();

                }
            } catch (NamingException e) {
                throw new JMSException("Error creating InitialContext ", e.toString());
            }
View Full Code Here

Examples of javax.jms.XAQueueConnectionFactory.createQueueConnection()

      }
      else if (factory instanceof QueueConnectionFactory)
      {
         QueueConnectionFactory qFactory = (QueueConnectionFactory) factory;
         if (username != null)
            connection = qFactory.createQueueConnection(username, password);
         else
            connection = qFactory.createQueueConnection();

         log.debug("created QueueConnection: " + connection);
      }
View Full Code Here

Examples of org.activemq.ActiveMQConnectionFactory.createQueueConnection()

    }

    public void testTryToReproduceNullPointerBug() throws Exception {
        String url = bindAddress;
        ActiveMQConnectionFactory factory = new ActiveMQConnectionFactory(url);
        QueueConnection queueConnection = factory.createQueueConnection();
        this.connection = queueConnection;
        QueueSession session = queueConnection.createQueueSession(false, Session.AUTO_ACKNOWLEDGE);
        QueueSender sender = session.createSender(null); //Unidentified
        Queue receiverQueue = session.createTemporaryQueue();
        QueueReceiver receiver = session.createReceiver(receiverQueue);
View Full Code Here

Examples of org.apache.activemq.ActiveMQConnectionFactory.createQueueConnection()

  }

  protected void createConnections() throws JMSException {
    ActiveMQConnectionFactory fac = (ActiveMQConnectionFactory) context
        .getBean("localFactory");
    localConnection = fac.createQueueConnection();
    localConnection.start();
  }

  protected AbstractApplicationContext createApplicationContext() {
    return new ClassPathXmlApplicationContext("activemq.xml");
View Full Code Here

Examples of org.codehaus.activemq.ActiveMQConnectionFactory.createQueueConnection()

    }

    public void testTryToReproduceNullPointerBug() throws Exception {
        String url = bindAddress;
        ActiveMQConnectionFactory factory = new ActiveMQConnectionFactory(url);
        QueueConnection queueConnection = factory.createQueueConnection();
        this.connection = queueConnection;
        QueueSession session = queueConnection.createQueueSession(false, Session.AUTO_ACKNOWLEDGE);
        QueueSender sender = session.createSender(null); //Unidentified
        Queue receiverQueue = session.createTemporaryQueue();
        QueueReceiver receiver = session.createReceiver(receiverQueue);
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.