Package javax.jms

Examples of javax.jms.QueueConnectionFactory.createQueueConnection()


    */
   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


    */
   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

       
        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

                (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

    */
   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

                    return connections.get(JMSType.QUEUE);
                }
                else
                {
                    QueueConnectionFactory ccf = (QueueConnectionFactory) createOrReturnConnectionFactory();
                    QueueConnection qc = ccf.createQueueConnection();
                    connections.put(JMSType.QUEUE, qc);

                    return qc;
                }
            }
View Full Code Here

    {
    InitialContext iniCtx = new InitialContext();

      QueueConnectionFactory queueConnectionFactory = (QueueConnectionFactory) iniCtx.lookup("ConnectionFactory");
     
      connection = queueConnectionFactory.createQueueConnection();
     
      queue = (Queue) iniCtx.lookup("queue/quickstart_jms_transacted_Request_gw");
      session = connection.createQueueSession(false, QueueSession.AUTO_ACKNOWLEDGE);
      connection.start();
      System.out.println("Connection Started");
View Full Code Here

    properties1.put(Context.PROVIDER_URL, "jnp://127.0.0.1:1099");
    InitialContext iniCtx = new InitialContext(properties1);

      Object tmp = iniCtx.lookup("ConnectionFactory");
      QueueConnectionFactory qcf = (QueueConnectionFactory) tmp;
      conn = qcf.createQueueConnection();
      que = (Queue) iniCtx.lookup("queue/quickstart_webservice_consumer_wise2_Request_gw");
      session = conn.createQueueSession(false, QueueSession.AUTO_ACKNOWLEDGE);
      conn.start();
      System.out.println("Connection Started");
    }
View Full Code Here

    properties1.put(Context.PROVIDER_URL, "jnp://127.0.0.1:1099");
    InitialContext iniCtx = new InitialContext(properties1);

      Object tmp = iniCtx.lookup("ConnectionFactory");
      QueueConnectionFactory qcf = (QueueConnectionFactory) tmp;
      conn = qcf.createQueueConnection();
      que = (Queue) iniCtx.lookup("queue/quickstart_helloworld_Request_gw");
      session = conn.createQueueSession(false, QueueSession.AUTO_ACKNOWLEDGE);
      conn.start();
      System.out.println("Connection Started");
    }
View Full Code Here

        Session session = null;
        System.out.println("Building our own db connection");
        try {
            DataSource ds = AQUtil.getSQLDataSource(server, instance, port, driver, user, password);
            QueueConnectionFactory queueFactory = AQjmsFactory.getQueueConnectionFactory(ds);
            queueConnection = queueFactory.createQueueConnection();
            assertNotNull(queueConnection);
            session = (AQjmsSession) queueConnection.createQueueSession(false,
                    Session.AUTO_ACKNOWLEDGE);
            assertNotNull(session);
        } catch (Throwable e) {
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.