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 queue session * * @return The XA queue session * @throws JMSException Thrown if an error occurs */ @Override public XAQueueSession createXAQueueSession() throws JMSException { if (ActiveMQRASessionFactoryImpl.trace) { ActiveMQRALogger.LOGGER.trace("createXAQueueSession()"); } checkClosed(); if (type == ActiveMQRAConnectionFactory.CONNECTION || type == ActiveMQRAConnectionFactory.TOPIC_CONNECTION || type == ActiveMQRAConnectionFactory.XA_TOPIC_CONNECTION) { throw new IllegalStateException("Can not get a topic session from a queue connection"); } return allocateConnection(type); }
@Override public XAQueueSession createXAQueueSession() throws JMSException { return addSession(xaConnection.createXAQueueSession()); }
@Override public XAQueueSession createXAQueueSession() throws JMSException { return addSession( ((XAQueueConnection) connection).createXAQueueSession()); }
public ManagedXAQueueSession( final XAQueueSession session ) { super(session); xaQueueSession = session; }
@Override public QueueSession getQueueSession() throws JMSException { return addSession( ((XAQueueSession) session).getQueueSession()); }
public XAQueueSession createXAQueueSession() throws JMSException { return (XAQueueSession) createSession(true, Session.SESSION_TRANSACTED); }
@Override public XAQueueSession createXAQueueSession() throws JMSException { checkClosed(); return (XAQueueSession) createSessionInternal(isXA(), true, Session.SESSION_TRANSACTED, ActiveMQSession.TYPE_QUEUE_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 XAQueueSession createXAQueueSession() throws JMSException { return (XAQueueSession) createXASession(); }