Java 类javax.jms.XATopicSession 实例源码

项目:ats-framework    文件:ManagedSession.java   
public static ManagedSession create( Session session ) {

        if ( (session instanceof XAQueueSession) && (session instanceof XATopicSession))
            return new ManagedXAQueueTopicSession(session);
        if (session instanceof XAQueueSession)
            return new ManagedXAQueueSession((XAQueueSession) session);
        if (session instanceof XATopicSession)
            return new ManagedXATopicSession((XATopicSession) session);
        if ( (session instanceof QueueSession) && (session instanceof TopicSession))
            return new ManagedQueueTopicSession(session);
        if (session instanceof QueueSession)
            return new ManagedQueueSession((QueueSession) session);
        if (session instanceof TopicSession)
            return new ManagedTopicSession((TopicSession) session);

        return new ManagedSession(session);
    }
项目:activemq-artemis    文件:ActiveMQRASessionFactoryImpl.java   
/**
 * Create a XA topic session
 *
 * @return The XA topic session
 * @throws JMSException Thrown if an error occurs
 */
@Override
public XATopicSession createXATopicSession() throws JMSException {
   if (ActiveMQRASessionFactoryImpl.trace) {
      ActiveMQRALogger.LOGGER.trace("createXATopicSession()");
   }

   checkClosed();

   if (type == ActiveMQRAConnectionFactory.CONNECTION || type == ActiveMQRAConnectionFactory.QUEUE_CONNECTION ||
      type == ActiveMQRAConnectionFactory.XA_QUEUE_CONNECTION) {
      throw new IllegalStateException("Can not get a topic session from a queue connection");
   }

   return allocateConnection(type);
}
项目:ats-framework    文件:ManagedXATopicConnection.java   
@Override
public XATopicSession createXATopicSession() throws JMSException {

    return addSession(xaTopicConnection.createXATopicSession());
}
项目:ats-framework    文件:ManagedXAQueueTopicConnection.java   
@Override
public XATopicSession createXATopicSession() throws JMSException {

    return addSession( ((XATopicConnection) connection).createXATopicSession());
}
项目:ats-framework    文件:ManagedXAQueueTopicSession.java   
@Override
public TopicSession getTopicSession() throws JMSException {

    return addSession( ((XATopicSession) session).getTopicSession());
}
项目:ats-framework    文件:ManagedXATopicSession.java   
public ManagedXATopicSession( final XATopicSession session ) {

        super(session);
        xaTopicSession = session;
    }
项目:daq-eclipse    文件:ActiveMQXAConnection.java   
public XATopicSession createXATopicSession() throws JMSException {
    return (XATopicSession) createSession(true, Session.SESSION_TRANSACTED);
}
项目:activemq-artemis    文件:ActiveMQXAConnection.java   
@Override
public XATopicSession createXATopicSession() throws JMSException {
   checkClosed();
   return (XATopicSession) createSessionInternal(isXA(), true, Session.SESSION_TRANSACTED, ActiveMQSession.TYPE_TOPIC_SESSION);
}
项目:andes    文件:XAConnectionImpl.java   
/**
 * Creates an XAQueueSession.
 *
 * @return A newly created XASession.
 * @throws JMSException If the XAQueueConnectionImpl fails to create an XASession due to
 *                      some internal error.
 */
public XATopicSession createXATopicSession() throws JMSException {
    return (XATopicSession) createXASession();
}