protected void checkClosed() throws IllegalStateException { if (closed.get()) { IllegalStateException jmsEx = null; if (failureCause.get() == null) { jmsEx = new IllegalStateException("The Session is closed"); } else { jmsEx = new IllegalStateException("The Session was closed due to an unrecoverable error."); jmsEx.initCause(failureCause.get()); } throw jmsEx; } }
protected void checkClosed() throws IllegalStateException { if (closed.get()) { IllegalStateException jmsEx = null; if (failureCause.get() == null) { jmsEx = new IllegalStateException("The Session is closed"); } else { jmsEx = new IllegalStateException("The Session was closed due to an unrecoverable error."); jmsEx.initCause(failureCause.get()); } throw jmsEx; } }
protected void checkClosed() throws IllegalStateException { if (closed.get()) { IllegalStateException jmsEx = null; if (getFailureCause() == null) { jmsEx = new IllegalStateException("The MessageProducer is closed"); } else { jmsEx = new IllegalStateException("The MessageProducer was closed due to an unrecoverable error."); jmsEx.initCause(getFailureCause()); } throw jmsEx; } }
protected void checkClosed() throws IllegalStateException { if (closed.get()) { IllegalStateException jmsEx = null; if (getFailureCause() == null) { jmsEx = new IllegalStateException("The MessageConsumer is closed"); } else { jmsEx = new IllegalStateException("The MessageConsumer was closed due to an unrecoverable error."); jmsEx.initCause(getFailureCause()); } throw jmsEx; } }
protected void checkClosed() throws IllegalStateException { if (closed.get()) { IllegalStateException jmsEx = null; if (getFailureCause() == null) { jmsEx = new IllegalStateException("The ConnectionConsumer is closed"); } else { jmsEx = new IllegalStateException("The ConnectionConsumer was closed due to an unrecoverable error."); jmsEx.initCause(getFailureCause()); } throw jmsEx; } }
protected void checkClosed() throws IllegalStateException { if (closed.get()) { IllegalStateException jmsEx = null; if (getFailureCause() == null) { jmsEx = new IllegalStateException("The MessageProducer is closed"); } else { jmsEx = new IllegalStateException("The MessageProducer was closed due to an unrecoverable error."); jmsEx.initCause(getFailureCause()); } throw jmsEx; } }
protected void checkClosed() throws IllegalStateException { if (closed.get()) { IllegalStateException jmsEx = null; if (getFailureCause() == null) { jmsEx = new IllegalStateException("The MessageConsumer is closed"); } else { jmsEx = new IllegalStateException("The MessageConsumer was closed due to an unrecoverable error."); jmsEx.initCause(getFailureCause()); } throw jmsEx; } }
protected void checkClosed() throws IllegalStateException { if (closed.get()) { IllegalStateException jmsEx = null; if (getFailureCause() == null) { jmsEx = new IllegalStateException("The ConnectionConsumer is closed"); } else { jmsEx = new IllegalStateException("The ConnectionConsumer was closed due to an unrecoverable error."); jmsEx.initCause(getFailureCause()); } throw jmsEx; } }
public Session createSession(boolean transacted, int ackMode) throws JMSException { SessionKey key = new SessionKey(transacted, ackMode); PooledSession session; try { session = new PooledSession(key, sessionPool.borrowObject(key), sessionPool, key.isTransacted(), useAnonymousProducers); session.addSessionEventListener(new PooledSessionEventListener() { @Override public void onTemporaryTopicCreate(TemporaryTopic tempTopic) { } @Override public void onTemporaryQueueCreate(TemporaryQueue tempQueue) { } @Override public void onSessionClosed(PooledSession session) { ConnectionPool.this.loanedSessions.remove(session); } }); this.loanedSessions.add(session); } catch (Exception e) { IllegalStateException illegalStateException = new IllegalStateException(e.toString()); illegalStateException.initCause(e); throw illegalStateException; } return session; }
public Session createSession(boolean transacted, int ackMode) throws JMSException { SessionKey key = new SessionKey(transacted, ackMode); PooledSession session; try { session = new PooledSession(key, sessionPool.borrowObject(key), sessionPool, key.isTransacted(), useAnonymousProducers); session.addSessionEventListener(new PooledSessionEventListener() { @Override public void onTemporaryTopicCreate(TemporaryTopic tempTopic) { } @Override public void onTemporaryQueueCreate(TemporaryQueue tempQueue) { } @Override public void onSessionClosed(PooledSession session) { ConnectionPool.this.loanedSessions.remove(session); } }); this.loanedSessions.add(session); } catch (Exception e) { IllegalStateException illegalStateException = new IllegalStateException(e.toString()); illegalStateException.initCause(e); throw illegalStateException; } return session; }
/** * Check whether a tranasction is active * * @throws IllegalStateException if the transaction is not active, preparing, prepared or committing or for any error in the transaction manager */ protected void checkTransactionActive() throws IllegalStateException { if (cm == null) throw new IllegalStateException("No connection manager"); try { if (cm instanceof JTATransactionChecker) ((JTATransactionChecker) cm).checkTransactionActive(); } catch (Exception e) { IllegalStateException ex = new IllegalStateException("Transaction not active"); ex.initCause(e); ex.setLinkedException(e); throw ex; } } }
} catch (Exception e) { javax.jms.IllegalStateException illegalStateException = new javax.jms.IllegalStateException(e.toString()); illegalStateException.initCause(e); throw illegalStateException;
} catch (Exception e) { javax.jms.IllegalStateException illegalStateException = new javax.jms.IllegalStateException(e.toString()); illegalStateException.initCause(e); throw illegalStateException;