/** * Allocation a connection * * @param sessionType The session type * @return The session * @throws JMSException Thrown if an error occurs */ protected ActiveMQRASession allocateConnection(final int sessionType) throws JMSException { return allocateConnection(false, Session.AUTO_ACKNOWLEDGE, sessionType); }
/** * Allocation a connection * * @param sessionType The session type * @return The session * @throws JMSException Thrown if an error occurs */ protected ActiveMQRASession allocateConnection(final int sessionType) throws JMSException { return allocateConnection(false, Session.AUTO_ACKNOWLEDGE, sessionType); }
/** * Create a XA session * * @return The XA session * @throws JMSException Thrown if an error occurs */ @Override public XASession createXASession() throws JMSException { if (ActiveMQRALogger.LOGGER.isTraceEnabled()) { ActiveMQRALogger.LOGGER.trace("createXASession()"); } checkClosed(); return allocateConnection(type); }
/** * Create a XA session * * @return The XA session * @throws JMSException Thrown if an error occurs */ @Override public XASession createXASession() throws JMSException { if (ActiveMQRALogger.LOGGER.isTraceEnabled()) { ActiveMQRALogger.LOGGER.trace("createXASession()"); } checkClosed(); return allocateConnection(type); }
/** * Create a session * * @param transacted Use transactions * @param acknowledgeMode The acknowledge mode * @return The session * @throws JMSException Thrown if an error occurs */ @Override public Session createSession(final boolean transacted, final int acknowledgeMode) throws JMSException { if (ActiveMQRALogger.LOGGER.isTraceEnabled()) { ActiveMQRALogger.LOGGER.trace("createSession(" + transacted + ", " + acknowledgeMode + ")"); } checkClosed(); return allocateConnection(transacted, acknowledgeMode, type); }
/** * Create a session * * @param transacted Use transactions * @param acknowledgeMode The acknowledge mode * @return The session * @throws JMSException Thrown if an error occurs */ @Override public Session createSession(final boolean transacted, final int acknowledgeMode) throws JMSException { if (ActiveMQRALogger.LOGGER.isTraceEnabled()) { ActiveMQRALogger.LOGGER.trace("createSession(" + transacted + ", " + acknowledgeMode + ")"); } checkClosed(); return allocateConnection(transacted, acknowledgeMode, type); }
/** * Create a XA queue session * * @return The XA queue session * @throws JMSException Thrown if an error occurs */ @Override public XAQueueSession createXAQueueSession() throws JMSException { if (ActiveMQRALogger.LOGGER.isTraceEnabled()) { 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); }
/** * Create a XA topic session * * @return The XA topic session * @throws JMSException Thrown if an error occurs */ @Override public XATopicSession createXATopicSession() throws JMSException { if (ActiveMQRALogger.LOGGER.isTraceEnabled()) { 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); }
/** * Create a topic session * * @param transacted Use transactions * @param acknowledgeMode The acknowledge mode * @return The topic session * @throws JMSException Thrown if an error occurs */ @Override public TopicSession createTopicSession(final boolean transacted, final int acknowledgeMode) throws JMSException { if (ActiveMQRALogger.LOGGER.isTraceEnabled()) { ActiveMQRALogger.LOGGER.trace("createTopicSession(" + transacted + ", " + acknowledgeMode + ")"); } checkClosed(); if (type == ActiveMQRAConnectionFactory.QUEUE_CONNECTION || type == ActiveMQRAConnectionFactory.XA_QUEUE_CONNECTION) { throw new IllegalStateException("Can not get a topic session from a queue connection"); } return allocateConnection(transacted, acknowledgeMode, type); }
/** * Create a XA queue session * * @return The XA queue session * @throws JMSException Thrown if an error occurs */ @Override public XAQueueSession createXAQueueSession() throws JMSException { if (ActiveMQRALogger.LOGGER.isTraceEnabled()) { 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); }
/** * Create a XA topic session * * @return The XA topic session * @throws JMSException Thrown if an error occurs */ @Override public XATopicSession createXATopicSession() throws JMSException { if (ActiveMQRALogger.LOGGER.isTraceEnabled()) { 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); }
/** * Create a queue session * * @param transacted Use transactions * @param acknowledgeMode The acknowledge mode * @return The queue session * @throws JMSException Thrown if an error occurs */ @Override public QueueSession createQueueSession(final boolean transacted, final int acknowledgeMode) throws JMSException { if (ActiveMQRALogger.LOGGER.isTraceEnabled()) { ActiveMQRALogger.LOGGER.trace("createQueueSession(" + transacted + ", " + acknowledgeMode + ")"); } checkClosed(); if (type == ActiveMQRAConnectionFactory.TOPIC_CONNECTION || type == ActiveMQRAConnectionFactory.XA_TOPIC_CONNECTION) { throw new IllegalStateException("Can not get a queue session from a topic connection"); } return allocateConnection(transacted, acknowledgeMode, type); }
/** * Create a queue session * * @param transacted Use transactions * @param acknowledgeMode The acknowledge mode * @return The queue session * @throws JMSException Thrown if an error occurs */ @Override public QueueSession createQueueSession(final boolean transacted, final int acknowledgeMode) throws JMSException { if (ActiveMQRALogger.LOGGER.isTraceEnabled()) { ActiveMQRALogger.LOGGER.trace("createQueueSession(" + transacted + ", " + acknowledgeMode + ")"); } checkClosed(); if (type == ActiveMQRAConnectionFactory.TOPIC_CONNECTION || type == ActiveMQRAConnectionFactory.XA_TOPIC_CONNECTION) { throw new IllegalStateException("Can not get a queue session from a topic connection"); } return allocateConnection(transacted, acknowledgeMode, type); }
/** * Create a topic session * * @param transacted Use transactions * @param acknowledgeMode The acknowledge mode * @return The topic session * @throws JMSException Thrown if an error occurs */ @Override public TopicSession createTopicSession(final boolean transacted, final int acknowledgeMode) throws JMSException { if (ActiveMQRALogger.LOGGER.isTraceEnabled()) { ActiveMQRALogger.LOGGER.trace("createTopicSession(" + transacted + ", " + acknowledgeMode + ")"); } checkClosed(); if (type == ActiveMQRAConnectionFactory.QUEUE_CONNECTION || type == ActiveMQRAConnectionFactory.XA_QUEUE_CONNECTION) { throw new IllegalStateException("Can not get a topic session from a queue connection"); } return allocateConnection(transacted, acknowledgeMode, type); }