List of usage examples for javax.jms IllegalStateException initCause
public synchronized Throwable initCause(Throwable cause)
From source file:org.apache.activemq.jms.pool.ConnectionPool.java
public Session createSession(boolean transacted, int ackMode) throws JMSException { SessionKey key = new SessionKey(transacted, ackMode); PooledSession session;//from ww w . j a v a 2s. co m 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; }
From source file:org.apache.aries.transaction.jms.internal.ConnectionPool.java
public Session createSession(boolean transacted, int ackMode) throws JMSException { SessionKey key = new SessionKey(transacted, ackMode); PooledSession session;//from w w w .j a v a2 s . co m try { session = sessionPool.borrowObject(key); } catch (Exception e) { javax.jms.IllegalStateException illegalStateException = new IllegalStateException(e.toString()); illegalStateException.initCause(e); throw illegalStateException; } return session; }
From source file:org.apache.karaf.jms.pool.internal.ConnectionPool.java
public Session createSession(boolean transacted, int ackMode) throws JMSException { SessionKey key = new SessionKey(transacted, ackMode); PooledSession session;// www . java 2 s. co m try { session = sessionPool.borrowObject(key); } catch (Exception e) { IllegalStateException illegalStateException = new IllegalStateException(e.toString()); illegalStateException.initCause(e); throw illegalStateException; } return session; }