Examples of createQueueConnection()


Examples of javax.jms.QueueConnectionFactory.createQueueConnection()

    } else if ("CLIENT_ACKNOWLEDGE".equals(ackModeString)) {
      ackMode = Session.CLIENT_ACKNOWLEDGE;
    }
    QueueConnectionFactory factory = (QueueConnectionFactory) ctx.lookup(connFactoryName);
    try {
      this.connection = factory.createQueueConnection();
      this.session = connection.createQueueSession(transacted, ackMode);
      this.queue = this.session.createQueue(queueName);
      this.responseQueue = this.session.createQueue(responseQueueName);
      this.consumer = this.session.createReceiver(this.queue);
      this.connection.start();
View Full Code Here

Examples of javax.jms.QueueConnectionFactory.createQueueConnection()

       
        if (JMSConstants.JMS_QUEUE.equals(addrDetails.getDestinationStyle().value())) {
            QueueConnectionFactory qcf =
                (QueueConnectionFactory)context.lookup(addrDetails.getJndiConnectionFactoryName());
            if (addrDetails.isSetConnectionUserName()) {
                connection = qcf.createQueueConnection(addrDetails.getConnectionUserName(),
                                                       addrDetails.getConnectionPassword());
            } else {
                connection = qcf.createQueueConnection();
            }
        } else {
View Full Code Here

Examples of javax.jms.QueueConnectionFactory.createQueueConnection()

                (QueueConnectionFactory)context.lookup(addrDetails.getJndiConnectionFactoryName());
            if (addrDetails.isSetConnectionUserName()) {
                connection = qcf.createQueueConnection(addrDetails.getConnectionUserName(),
                                                       addrDetails.getConnectionPassword());
            } else {
                connection = qcf.createQueueConnection();
            }
        } else {
            TopicConnectionFactory tcf =
                (TopicConnectionFactory)context.lookup(addrDetails.getJndiConnectionFactoryName());
            if (addrDetails.isSetConnectionUserName()) {
View Full Code Here

Examples of javax.jms.QueueConnectionFactory.createQueueConnection()

    */
   public void testQueueConnectionFactory() throws Exception
   {
      QueueConnectionFactory qcf =
         (QueueConnectionFactory)initialContext.lookup("/ConnectionFactory");
      QueueConnection qc = qcf.createQueueConnection();
      qc.close();
   }
  
   /**
    * Test that ConnectionFactory can be cast to TopicConnectionFactory and TopicConnection can be
View Full Code Here

Examples of javax.jms.QueueConnectionFactory.createQueueConnection()

    */
   public void testQueueConnection1() throws Exception
   {
      QueueConnectionFactory qcf = (QueueConnectionFactory)cf;

      QueueConnection qc = qcf.createQueueConnection();

      qc.createQueueSession(false, Session.AUTO_ACKNOWLEDGE);

      qc.close();

View Full Code Here

Examples of javax.jms.QueueConnectionFactory.createQueueConnection()

        Queue queue = (Queue) initialContext.lookup(SAMPLE_QUEUE);
        Queue queueContext = (QueueinitialContext.lookup(SAMPLE_QUEUE_CONTEXT);


        // Create connection
        QueueConnection queueConnection = queueConnectionFactory.createQueueConnection();

        // Create session
        QueueSession queueSession = queueConnection.createQueueSession(false, Session.AUTO_ACKNOWLEDGE);

        // Create sender
View Full Code Here

Examples of javax.jms.QueueConnectionFactory.createQueueConnection()

        // Lookup the Queues through their JNDI name
        Queue annotationQueue = (Queue) initialContext.lookup(SAMPLE_QUEUE_MDB_ANNOTATION);
        Queue xmlQueue = (Queue) initialContext.lookup(SAMPLE_QUEUE_MDB_XML);

        // Create connection
        queueConnection = queueConnectionFactory.createQueueConnection();

        // Create session
        queueSession = queueConnection.createQueueSession(false, Session.AUTO_ACKNOWLEDGE);

        // Create senders
View Full Code Here

Examples of javax.jms.QueueConnectionFactory.createQueueConnection()

   public void test_1() throws Exception
   {
      QueueConnectionFactory qcf = (QueueConnectionFactory)ic.lookup("/ConnectionFactory");
      Queue queue = (Queue)ic.lookup("/queue/Queue");

      QueueConnection qc =  qcf.createQueueConnection();
      QueueSession qs = qc.createQueueSession(false, Session.AUTO_ACKNOWLEDGE);

      QueueReceiver qreceiver = qs.createReceiver(queue, "targetMessage = TRUE");

      qc.start();
View Full Code Here

Examples of javax.jms.QueueConnectionFactory.createQueueConnection()

   public void testQueueConnectionConsumerWrongTemporaryDestination() throws Exception
   {
      InitialContext ctx = getInitialContext();
      QueueConnectionFactory factory = (QueueConnectionFactory) ctx.lookup("ConnectionFactory");
      Queue queue = null;
      QueueConnection connection = factory.createQueueConnection();
      try
      {
         QueueSession s = connection.createQueueSession(false, Session.AUTO_ACKNOWLEDGE);
         queue = s.createTemporaryQueue();
         QueueConnection connection2 = factory.createQueueConnection();
View Full Code Here

Examples of javax.jms.QueueConnectionFactory.createQueueConnection()

      QueueConnection connection = factory.createQueueConnection();
      try
      {
         QueueSession s = connection.createQueueSession(false, Session.AUTO_ACKNOWLEDGE);
         queue = s.createTemporaryQueue();
         QueueConnection connection2 = factory.createQueueConnection();
         try
         {
            connection2.createConnectionConsumer(queue, "", MockServerSessionPool.getServerSessionPool(), 1);
            fail("Expected an error listening to a temporary destination from a different connection");
         }
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.