Examples of XATopicConnection


Examples of javax.jms.XATopicConnection

        return proxy;
    }

    public TopicConnection createTopicConnection(String username, String password) throws JMSException
    {
        XATopicConnection xatc = ((XATopicConnectionFactory) factory).createXATopicConnection(username,
                                                                                              password);
        TopicConnection proxy = (TopicConnection) Proxy.newProxyInstance(Connection.class.getClassLoader(),
                                                                         new Class[]{TopicConnection.class, XaResourceFactoryHolder.class},
                                                                         new ConnectionInvocationHandler(xatc, sameRMOverrideValue));
        return proxy;
View Full Code Here

Examples of javax.jms.XATopicConnection

     * Creates a default topic connection.
     *
     */
  public TopicConnection createTopicConnection() throws JMSException
  {
    XATopicConnection tc = factory_.createXATopicConnection();
    return new JtaTopicConnection ( tc , res_ );
  }
View Full Code Here

Examples of javax.jms.XATopicConnection

   * Creates a topic connection for the given user and password.
   */
  public TopicConnection createTopicConnection ( String userName , String password )
      throws JMSException
  {
    XATopicConnection tc = factory_.createXATopicConnection ( userName , password );
    return new JtaTopicConnection ( tc , res_ );
  }
View Full Code Here

Examples of javax.jms.XATopicConnection

      Connection genericConnection = null;
      XAConnection xaConnection = null;
      QueueConnection queueConnection = null;
      TopicConnection topicConnection = null;
      XAQueueConnection xaQueueConnection = null;
      XATopicConnection xaTopicConnection = null;

      ConnectionFactory genericFactory = (ConnectionFactory)JMSTestCase.ic.lookup("/ConnectionFactory");
      genericConnection = genericFactory.createConnection();
      assertConnectionType(genericConnection, "generic");

      XAConnectionFactory xaFactory = (XAConnectionFactory)JMSTestCase.ic.lookup("/CF_XA_TRUE");
      xaConnection = xaFactory.createXAConnection();
      assertConnectionType(xaConnection, "xa");

      QueueConnectionFactory queueCF = (QueueConnectionFactory)JMSTestCase.ic.lookup("/CF_QUEUE");
      queueConnection = queueCF.createQueueConnection();
      assertConnectionType(queueConnection, "queue");

      TopicConnectionFactory topicCF = (TopicConnectionFactory)JMSTestCase.ic.lookup("/CF_TOPIC");
      topicConnection = topicCF.createTopicConnection();
      assertConnectionType(topicConnection, "topic");

      XAQueueConnectionFactory xaQueueCF = (XAQueueConnectionFactory)JMSTestCase.ic.lookup("/CF_QUEUE_XA_TRUE");
      xaQueueConnection = xaQueueCF.createXAQueueConnection();
      assertConnectionType(xaQueueConnection, "xa-queue");

      XATopicConnectionFactory xaTopicCF = (XATopicConnectionFactory)JMSTestCase.ic.lookup("/CF_TOPIC_XA_TRUE");
      xaTopicConnection = xaTopicCF.createXATopicConnection();
      assertConnectionType(xaTopicConnection, "xa-topic");

      genericConnection.close();
      xaConnection.close();
      queueConnection.close();
      topicConnection.close();
      xaQueueConnection.close();
      xaTopicConnection.close();
   }
View Full Code Here

Examples of javax.jms.XATopicConnection

     * Creates a default topic connection.
     *
     */
  public TopicConnection createTopicConnection() throws JMSException
  {
    XATopicConnection tc = factory_.createXATopicConnection();
    return new JtaTopicConnection ( tc , res_ );
  }
View Full Code Here

Examples of javax.jms.XATopicConnection

   * Creates a topic connection for the given user and password.
   */
  public TopicConnection createTopicConnection ( String userName , String password )
      throws JMSException
  {
    XATopicConnection tc = factory_.createXATopicConnection ( userName , password );
    return new JtaTopicConnection ( tc , res_ );
  }
View Full Code Here

Examples of javax.jms.XATopicConnection

      }
    }
  }

  protected void sendToTopicXA(Topic topic, XATopicConnectionFactory xaTopicConnectionFactory) throws Exception {
    XATopicConnection xaTopicConnection = null;
    XATopicSession xaTopicSession = null;
    MessageProducer messageProducer = null;
   
    try {
      xaTopicConnection = xaTopicConnectionFactory.createXATopicConnection();
      xaTopicSession = xaTopicConnection.createXATopicSession();
      messageProducer = xaTopicSession.createProducer(topic);
      Message message = createMessage(xaTopicSession);
      messageProducer.send(message);

    } finally {
      try {
        messageProducer.close();
      } catch (Exception e) {
        e.printStackTrace();
      }
      try {
        xaTopicSession.close();
      } catch (Exception e) {
        e.printStackTrace();
      }
      try {
        xaTopicConnection.close();
      } catch (Exception e) {
        e.printStackTrace();
      }
    }
  }
View Full Code Here

Examples of org.objectweb.joram.client.jms.XATopicConnection

   * @exception IllegalStateException  If the server is not listening.
   */

  public javax.jms.XATopicConnection createXATopicConnection(String name, String password) throws javax.jms.JMSException {
    initIdentity(name, password);
    return new XATopicConnection(params, createRequestChannel(params, identity, reliableClass));
  }
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.