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); }
/** * 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); }
@Override public XATopicSession createXATopicSession() throws JMSException { return addSession(xaTopicConnection.createXATopicSession()); }
@Override public XATopicSession createXATopicSession() throws JMSException { return addSession( ((XATopicConnection) connection).createXATopicSession()); }
@Override public TopicSession getTopicSession() throws JMSException { return addSession( ((XATopicSession) session).getTopicSession()); }
public ManagedXATopicSession( final XATopicSession session ) { super(session); xaTopicSession = session; }
public XATopicSession createXATopicSession() throws JMSException { return (XATopicSession) createSession(true, Session.SESSION_TRANSACTED); }
@Override public XATopicSession createXATopicSession() throws JMSException { checkClosed(); return (XATopicSession) createSessionInternal(isXA(), true, Session.SESSION_TRANSACTED, ActiveMQSession.TYPE_TOPIC_SESSION); }
/** * 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(); }