gpt4 book ai didi

javax.jms.XAQueueSession类的使用及代码示例

转载 作者:知者 更新时间:2024-03-19 04:38:40 25 4
gpt4 key购买 nike

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

XAQueueSession介绍

[英]An XAQueueSession provides a regular QueueSession, which can be used to create QueueReceiver, QueueSender, and QueueBrowser objects (optional).

The XAQueueSession interface is optional. JMS providers are not required to support this interface. This interface is for use by JMS providers to support transactional environments. Client programs are strongly encouraged to use the transactional support available in their environment, rather than use these XA interfaces directly.
[中]XAQueueSession提供常规QueueSession,可用于创建QueueReceiver、QueueSender和QueueBrowser对象(可选)。
XAQueueSession接口是可选的。JMS提供程序不需要支持此接口。此接口供JMS提供程序用于支持事务性环境。强烈建议客户端程序使用其环境中可用的事务支持,而不是直接使用这些XA接口。

代码示例

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

@Override public QueueSession getQueueSession() throws JMSException {
 if ((types & TYPE_XA_QUEUE) != TYPE_XA_QUEUE) {
  throw new IllegalStateException(delegate + " is not an XAQueueSession");
 }
 QueueSession xats = ((XAQueueSession) delegate).getQueueSession();
 return TracingSession.create(xats, jmsTracing);
}

代码示例来源:origin: apache/ofbiz-framework

XAResource resource = session.getXAResource();
  QueueSession qSession = session.getQueueSession();
  QueueSender sender = qSession.createSender(queue);
    session.commit();
  session.close();
  con.close();
} catch (GenericTransactionException gte) {

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

xares = xaqs.getXAResource();
try {
  tx.enlistResource(this.getXAResource());
return xaqs.getQueueSession();

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

@Override
public XAResource getXAResource() {
  return xaQueueSession.getXAResource();
}

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

protected void MOMSessionClose() {
try {
  if (xaqs != null) {
  xaqs.close();
  xaqs = null;
  }
  if (qs != null) {
  qs.close();
  qs = null;
  jconn.sessionClose(this);
  }
} catch (JMSException e) {
  TraceJms.logger.log(BasicLevel.ERROR,"exception:"+e);
}
}

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

@Override
public Session getSession() throws JMSException {
  return addSession(xaQueueSession.getSession());
}

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

/**
* Get the XAResource for the connection.
*
* @return   The XAResource for the connection.
*
* @throws ResourceException    XA transaction not supported
*/
public XAResource getXAResource() throws ResourceException
{
 //
 // Spec says a mc must allways return the same XA resource,
 // so we cache it.
 //
 if (!xaTransacted)
   throw new NotSupportedException("Non XA transaction not supported");
 if (xaResource == null)
 {
   if (info.getType() == JmsConnectionFactory.TOPIC)
    xaResource = xaTopicSession.getXAResource();
   else if (info.getType() == JmsConnectionFactory.QUEUE)
    xaResource = xaQueueSession.getXAResource();
   else
    xaResource = xaSession.getXAResource();
 }
 if (log.isTraceEnabled())
   log.trace("XAResource=" + xaResource);
 xaResource = new JmsXAResource(this, xaResource);
 return xaResource;
}

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

queueSession.close();
if (xaTransacted && xaQueueSession != null)
 xaQueueSession.close();

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

@Override
  public QueueSession getQueueSession() throws JMSException {

    return addSession( ((XAQueueSession) session).getQueueSession());
  }
}

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

@Override
  public QueueSession getQueueSession() throws JMSException {

    return addSession(xaQueueSession.getQueueSession());
  }
}

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

queueSession = xaQueueSession.getQueueSession();
xaTransacted = true;

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

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

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com