javax.jms.XATopicConnection.createXATopicSession()方法的使用及代码示例

x33g5p2x  于2022-02-03 转载在 其他  
字(4.1k)|赞(0)|评价(0)|浏览(126)

本文整理了Java中javax.jms.XATopicConnection.createXATopicSession()方法的一些代码示例,展示了XATopicConnection.createXATopicSession()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。XATopicConnection.createXATopicSession()方法的具体详情如下:
包路径:javax.jms.XATopicConnection
类名称:XATopicConnection
方法名:createXATopicSession

XATopicConnection.createXATopicSession介绍

[英]Creates an XATopicSession object.
[中]创建XtaOpicSession对象。

代码示例

代码示例来源:origin: openzipkin/brave

@Override public XATopicSession createXATopicSession() throws JMSException {
  if ((types & TYPE_XA_TOPIC) != TYPE_XA_TOPIC) {
   throw new IllegalStateException(delegate + " is not an XATopicConnection");
  }
  XATopicSession xats = ((XATopicConnection) delegate).createXATopicSession();
  return TracingXASession.create(xats, jmsTracing);
 }
}

代码示例来源:origin: com.axway.ats.framework/ats-actionlibrary

@Override
  public XATopicSession createXATopicSession() throws JMSException {

    return addSession( ((XATopicConnection) connection).createXATopicSession());
  }
}

代码示例来源:origin: com.axway.ats.framework/ats-actionlibrary

@Override
  public XATopicSession createXATopicSession() throws JMSException {

    return addSession(xaTopicConnection.createXATopicSession());
  }
}

代码示例来源:origin: org.wso2.carbon.transport/org.wso2.carbon.transport.jms

/**
 * Create JMS {@link XASession} instance on top of the provided {@link Connection} instance.
 *
 * @param xAConnection JMS Connection.
 * @return Session instance.
 * @throws JMSConnectorException Error when creating the XASession.
 */
public XASession createXASession(XAConnection xAConnection) throws JMSConnectorException {
  try {
    if (logger.isDebugEnabled()) {
      logger.debug("Creating a new JMS XASession on: " + this.connectionFactoryString);
    }
    if (JMSConstants.JMS_SPEC_VERSION_1_1.equals(jmsSpec) || JMSConstants.JMS_SPEC_VERSION_2_0
        .equals(jmsSpec)) {
      return xAConnection.createXASession();
    } else if (JMSConstants.JMSDestinationType.QUEUE.equals(this.destinationType)) {
      return ((XAQueueConnection) (xAConnection)).createXAQueueSession();
    } else {
      return ((XATopicConnection) (xAConnection)).createXATopicSession();
    }
  } catch (JMSException e) {
    throw new JMSConnectorException(
        "JMS Exception while obtaining session for factory " + connectionFactoryString, e);
  }
}

代码示例来源:origin: org.wso2.transport.jms/transport-jms

/**
 * Create JMS {@link XASession} instance on top of the provided {@link Connection} instance.
 *
 * @param xAConnection JMS Connection.
 * @return Session instance.
 * @throws JMSConnectorException Error when creating the XASession.
 */
public XASession createXASession(XAConnection xAConnection) throws JMSConnectorException {
  try {
    if (logger.isDebugEnabled()) {
      logger.debug("Creating a new JMS XASession on: " + this.connectionFactoryString);
    }
    if (JMSConstants.JMS_SPEC_VERSION_1_1.equals(jmsSpec) || JMSConstants.JMS_SPEC_VERSION_2_0
        .equals(jmsSpec)) {
      return xAConnection.createXASession();
    } else if (JMSConstants.JMSDestinationType.QUEUE.equals(this.destinationType)) {
      return ((XAQueueConnection) (xAConnection)).createXAQueueSession();
    } else {
      return ((XATopicConnection) (xAConnection)).createXATopicSession();
    }
  } catch (JMSException e) {
    throw new JMSConnectorException(
        "JMS Exception while obtaining session for factory " + connectionFactoryString, e);
  }
}

代码示例来源:origin: org.objectweb.jonas/jonas-ejb-container

if (tconn != null) {
  if (mdd.isRequired()) {
    sess = tconn.createXATopicSession();
  } else {
    sess = tconn.createTopicSession(false, mdd.getAcknowledgeMode());

代码示例来源:origin: org.jboss.genericjms/generic-jms-ra-jar

session = ((XAQueueSession)xaSession).getQueueSession();
} else if (mcf.getProperties().getType() == JmsConnectionFactory.TOPIC) {
  xaSession = ((XATopicConnection) con).createXATopicSession();
  session = ((XATopicSession)xaSession).getTopicSession();
} else {

代码示例来源:origin: org.jboss.jbossas/jboss-as-connector

xaTopicSession = ((XATopicConnection)con).createXATopicSession();
topicSession = xaTopicSession.getTopicSession();
xaTransacted = true;

代码示例来源:origin: org.apache.qpid/qpid-jca

_xaSession = ((XATopicConnection)_connection).createXATopicSession();
_session =  ((TopicConnection)_connection).createTopicSession(transacted, acknowledgeMode);

代码示例来源:origin: org.objectweb.jonas/jonas-jms-manager

} else {
  if (xats == null) {
  xats = xatc.createXATopicSession();
  if (currtx != null) {
    TraceJms.logger.log(BasicLevel.ERROR,"mixed transactions");

相关文章