/** * simply throws an exception if the Connection is already closed or the * Transport has failed * * @throws JMSException */ protected synchronized void checkClosedOrFailed() throws JMSException { checkClosed(); if (transportFailed.get()) { throw new ConnectionFailedException(firstFailureError); } }
protected Scheduler getScheduler() throws JMSException { Scheduler result = scheduler; if (result == null) { if (isClosing() || isClosed()) { // without lock contention report the closing state throw new ConnectionClosedException(); } synchronized (this) { result = scheduler; if (result == null) { checkClosed(); try { result = new Scheduler("ActiveMQConnection["+info.getConnectionId().getValue()+"] Scheduler"); result.start(); scheduler = result; } catch(Exception e) { throw JMSExceptionSupport.create(e); } } } } return result; }
/** * simply throws an exception if the Connection is already closed or the * Transport has failed * * @throws JMSException */ protected synchronized void checkClosedOrFailed() throws JMSException { checkClosed(); if (transportFailed.get()) { throw new ConnectionFailedException(firstFailureError); } }
/** * simply throws an exception if the Connection is already closed or the * Transport has failed * * @throws JMSException */ protected synchronized void checkClosedOrFailed() throws JMSException { checkClosed(); if (transportFailed.get()) { throw new ConnectionFailedException(firstFailureError); } }
/** * simply throws an exception if the Connection is already closed or the * Transport has failed * * @throws JMSException */ protected synchronized void checkClosedOrFailed() throws JMSException { checkClosed(); if (transportFailed.get()) { throw new ConnectionFailedException(firstFailureError); } }
/** * simply throws an exception if the Connection is already closed or the * Transport has failed * * @throws JMSException */ protected synchronized void checkClosedOrFailed() throws JMSException { checkClosed(); if (transportFailed.get()) { throw new ConnectionFailedException(firstFailureError); } }
protected Scheduler getScheduler() throws JMSException { Scheduler result = scheduler; if (result == null) { if (isClosing() || isClosed()) { // without lock contention report the closing state throw new ConnectionClosedException(); } synchronized (this) { result = scheduler; if (result == null) { checkClosed(); try { result = new Scheduler("ActiveMQConnection["+info.getConnectionId().getValue()+"] Scheduler"); result.start(); scheduler = result; } catch(Exception e) { throw JMSExceptionSupport.create(e); } } } } return result; }
protected Scheduler getScheduler() throws JMSException { Scheduler result = scheduler; if (result == null) { if (isClosing() || isClosed()) { // without lock contention report the closing state throw new ConnectionClosedException(); } synchronized (this) { result = scheduler; if (result == null) { checkClosed(); try { result = new Scheduler("ActiveMQConnection["+info.getConnectionId().getValue()+"] Scheduler"); result.start(); scheduler = result; } catch(Exception e) { throw JMSExceptionSupport.create(e); } } } } return result; }
protected Scheduler getScheduler() throws JMSException { Scheduler result = scheduler; if (result == null) { if (isClosing() || isClosed()) { // without lock contention report the closing state throw new ConnectionClosedException(); } synchronized (this) { result = scheduler; if (result == null) { checkClosed(); try { result = new Scheduler("ActiveMQConnection["+info.getConnectionId().getValue()+"] Scheduler"); result.start(); scheduler = result; } catch(Exception e) { throw JMSExceptionSupport.create(e); } } } } return result; }