Package javax.jms

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


            actionsApplied = true;

            QueueConnectionFactory qcf = lookup(utils, "RemoteConnectionFactory", QueueConnectionFactory.class);
            Queue queue = lookup(utils, QUEUE_NAME, 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

            utils.addWarDeployment("webapp-example.war", SimpleServlet.class.getPackage());
            utils.deploy();

            QueueConnectionFactory qcf = lookup(utils, "RemoteConnectionFactory", QueueConnectionFactory.class);
            Queue queue = lookup(utils, "queue/test", 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

    * created.
    */
   public void testQueueConnectionFactory() throws Exception
   {
      QueueConnectionFactory qcf = (QueueConnectionFactory)ic.lookup("/ConnectionFactory");
      QueueConnection qc = qcf.createQueueConnection();
      qc.close();
   }

   /**
    * Test that ConnectionFactory can be cast to TopicConnectionFactory and TopicConnection can be
View Full Code Here

                                     final boolean suppress) throws Exception {
        try {
            final QueueConnectionFactory factory = (QueueConnectionFactory) lookup(context, factoryBindingName);
            QueueConnection conn;
            if (userName != null) {
                conn = factory.createQueueConnection(userName, password);
            } else {
                conn = factory.createQueueConnection();
            }
            final QueueSession sess = conn.createQueueSession(false, Session.AUTO_ACKNOWLEDGE);
            final Queue queue = (Queue) lookup(context, queueBindingName);
View Full Code Here

            final QueueConnectionFactory factory = (QueueConnectionFactory) lookup(context, factoryBindingName);
            QueueConnection conn;
            if (userName != null) {
                conn = factory.createQueueConnection(userName, password);
            } else {
                conn = factory.createQueueConnection();
            }
            final QueueSession sess = conn.createQueueSession(false, Session.AUTO_ACKNOWLEDGE);
            final Queue queue = (Queue) lookup(context, queueBindingName);
            final QueueSender sender = sess.createSender(queue);
            conn.start();
View Full Code Here

        try {
            final Context ctx = new InitialContext();
            QueueConnectionFactory queueConnectionFactory;
            queueConnectionFactory = (QueueConnectionFactory) lookup(ctx, qcfBindingName);
            final QueueConnection queueConnection = queueConnectionFactory.createQueueConnection(username, password);
            queueConnection.start();
            final QueueSession queueSession = queueConnection.createQueueSession(false, Session.AUTO_ACKNOWLEDGE);
            final Queue queue = (Queue) ctx.lookup(queueBindingName);
            final QueueReceiver queueReceiver = queueSession.createReceiver(queue);
            queueReceiver.setMessageListener(this);
View Full Code Here

      DataSource ds = (DataSource) ctx.lookup("java:comp/env/jdbc/MyDataSource");
          Connection con = ds.getConnection();
          out.println("<font align=Center face=\"Garamond\"> Check Resource Reference : Got Connection ->"+con+" </font><br>");
         
          QueueConnectionFactory qcf = (QueueConnectionFactory)ctx.lookup("java:comp/env/jms/DefaultActiveMQConnectionFactory");
          QueueConnection qCon = qcf.createQueueConnection();
          out.println("<font align=Center face=\"Garamond\"> Check JMS Resource Reference : Got Queue Connection ->"+qCon+" </font><br>");
         
          Queue q = (Queue) ctx.lookup("java:comp/env/jms/SendReceiveQueue");
          out.println("<font align=Center face=\"Garamond\"> Check JMS Resource Env Reference : Got Queue ->"+q.getQueueName()+" </font><br>");
         
View Full Code Here

    * created.
    */
   public void testQueueConnectionFactory() throws Exception
   {
      QueueConnectionFactory qcf = (QueueConnectionFactory)ic.lookup("/ConnectionFactory");
      QueueConnection qc = qcf.createQueueConnection();
      qc.close();
   }

   /**
    * Test that ConnectionFactory can be cast to TopicConnectionFactory and TopicConnection can be
View Full Code Here

    * created.
    */
   public void testQueueConnectionFactory() throws Exception
   {
      QueueConnectionFactory qcf = (QueueConnectionFactory)JMSTestCase.ic.lookup("/CF_QUEUE_XA_FALSE");
      QueueConnection qc = qcf.createQueueConnection();
      qc.close();
   }

   /**
    * Test that ConnectionFactory can be cast to TopicConnectionFactory and TopicConnection can be
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.