Examples of createTopicConnection()


Examples of javax.jms.ConnectionFactory.createTopicConnection()

                if (isTopic) {
                    TopicConnectionFactory factory = (TopicConnectionFactory)
                            context.lookup(OPENJMS_TOPIC);
                    context.close();

                    return factory.createTopicConnection();

                } else {
                    QueueConnectionFactory factory = (QueueConnectionFactory)
                            context.lookup(OPENJMS_QUEUE);
                    context.close();
View Full Code Here

Examples of javax.jms.QueueConnectionFactory.createTopicConnection()

        return factory.createQueueConnection(userName, password);
      } else if (cxRequest instanceof TopicConnectionRequest) {
        TopicConnectionFactory factory = TopicTcpConnectionFactory.create(hostName, serverPort);
        setFactoryParameters((AbstractConnectionFactory) factory, (ManagedConnectionFactoryImpl) mcf);
        ((AbstractConnectionFactory) factory).setIdentityClassName(identityClass);
        return factory.createTopicConnection(userName, password);
      } else {
        ConnectionFactory factory = TcpConnectionFactory.create(hostName, serverPort);
        setFactoryParameters((AbstractConnectionFactory) factory, (ManagedConnectionFactoryImpl) mcf);
        ((AbstractConnectionFactory) factory).setIdentityClassName(identityClass);
        return factory.createConnection(userName, password);
View Full Code Here

Examples of javax.jms.TopicConnectionFactory.createTopicConnection()

      // Get the connection factory
      TopicConnectionFactory topicFactory =
   (TopicConnectionFactory)jndicontext.lookup( "ConnectionFactory");

      // Create the connection
      topicConnection = topicFactory.createTopicConnection();

      // Create the session with: No transaction and auto ack
      topicSession = topicConnection.createTopicSession(false, Session.AUTO_ACKNOWLEDGE);

      // Look up the destination
View Full Code Here

Examples of javax.jms.TopicConnectionFactory.createTopicConnection()

        return factory.createQueueConnection(userName, password);
      } else if (cxRequest instanceof TopicConnectionRequest) {
        TopicConnectionFactory factory = TopicTcpConnectionFactory.create(hostName, serverPort);
        setFactoryParameters((AbstractConnectionFactory) factory, (ManagedConnectionFactoryImpl) mcf);
        ((AbstractConnectionFactory) factory).setIdentityClassName(identityClass);
        return factory.createTopicConnection(userName, password);
      } else {
        ConnectionFactory factory = TcpConnectionFactory.create(hostName, serverPort);
        setFactoryParameters((AbstractConnectionFactory) factory, (ManagedConnectionFactoryImpl) mcf);
        ((AbstractConnectionFactory) factory).setIdentityClassName(identityClass);
        return factory.createConnection(userName, password);
View Full Code Here

Examples of javax.jms.TopicConnectionFactory.createTopicConnection()

      // Get the connection factory
      TopicConnectionFactory topicFactory =
    (TopicConnectionFactory)jndicontext.lookup("ConnectionFactory");

      // Create the connection
      topicConnection = topicFactory.createTopicConnection();

      // Create the session with: No Transaction  and Auto ack
      topicSession = topicConnection.createTopicSession(false, Session.AUTO_ACKNOWLEDGE);

      // Look up the destination
View Full Code Here

Examples of javax.jms.TopicConnectionFactory.createTopicConnection()

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

Examples of javax.jms.TopicConnectionFactory.createTopicConnection()

                (TopicConnectionFactory)context.lookup(addrDetails.getJndiConnectionFactoryName());
            if (addrDetails.isSetConnectionUserName()) {
                connection = tcf.createTopicConnection(addrDetails.getConnectionUserName(),
                                                       addrDetails.getConnectionPassword());
            } else {
                connection = tcf.createTopicConnection();
            }
        }

        connection.start();
View Full Code Here

Examples of javax.jms.TopicConnectionFactory.createTopicConnection()

         // create a factory (normally retreived by naming service)
         TopicConnectionFactory factory = new XBConnectionFactory(null, this.cmdLine, false);
         // should be retreived via jndi
         Topic topic = new XBDestination("jms-test", null, false);
     
         TopicConnection connection = factory.createTopicConnection();
         connection.start();
         TopicSession session = connection.createTopicSession(false, Session.AUTO_ACKNOWLEDGE);
         TopicSubscriber subscriber = session.createSubscriber(topic);
         subscriber.setMessageListener(this);
     
View Full Code Here

Examples of javax.jms.TopicConnectionFactory.createTopicConnection()

    */
   public void testTopicConnectionFactory() throws Exception
   {
      TopicConnectionFactory qcf =
         (TopicConnectionFactory)initialContext.lookup("/ConnectionFactory");
      TopicConnection tc = qcf.createTopicConnection();
      tc.close();
   }

   public void testAdministrativelyConfiguredClientID() throws Exception
   {
View Full Code Here

Examples of javax.jms.TopicConnectionFactory.createTopicConnection()

    */
   public void testQueueConnection2() throws Exception
   {
      TopicConnectionFactory tcf = (TopicConnectionFactory)cf;

      TopicConnection tc = tcf.createTopicConnection();

      tc.createTopicSession(false, Session.AUTO_ACKNOWLEDGE);

      tc.close();

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.