@Override protected final void finalize() throws Throwable { if (!closed) { if (this.factoryReference.isFinalizeChecks()) { ActiveMQJMSClientLogger.LOGGER.connectionLeftOpen(creationStack); } close(); } }
@Override public synchronized void connectionFailed(final ActiveMQException me, boolean failedOver) { if (me == null) { return; } ActiveMQConnection conn = connectionRef.get(); if (conn != null) { try { final ExceptionListener exceptionListener = conn.getExceptionListener(); if (exceptionListener != null) { final JMSException je = new JMSException(me.toString(), failedOver ? EXCEPTION_FAILOVER : EXCEPTION_DISCONNECT); je.initCause(me); new Thread(new Runnable() { @Override public void run() { exceptionListener.onException(je); } }).start(); } } catch (JMSException e) { if (!conn.closed) { ActiveMQJMSClientLogger.LOGGER.errorCallingExcListener(e); } } } }
@Override public void failoverEvent(final FailoverEventType eventType) { ActiveMQConnection conn = connectionRef.get(); if (conn != null) { try { final FailoverEventListener failoverListener = conn.getFailoverListener(); if (failoverListener != null) { conn.failoverListenerExecutor.execute(new Runnable() { @Override public void run() { failoverListener.failoverEvent(eventType); } }); } } catch (JMSException e) { if (!conn.closed) { ActiveMQJMSClientLogger.LOGGER.errorCallingFailoverListener(e); } } } } }
msg.doBeforeReceive(); } catch (Exception e) { ActiveMQJMSClientLogger.LOGGER.errorPreparingMessageForReceipt(msg.getCoreMessage().toString(), e); return; } catch (ActiveMQException e) { ((ClientSessionInternal) session.getCoreSession()).markRollbackOnly(); ActiveMQJMSClientLogger.LOGGER.errorProcessingMessage(e); ActiveMQJMSClientLogger.LOGGER.onMessageError(e); ActiveMQJMSClientLogger.LOGGER.errorRecoveringSession(e2); ActiveMQJMSClientLogger.LOGGER.errorProcessingMessage(e);
@Override public ActiveMQMessage nextElement() { ActiveMQMessage msg; if (hasMoreElements()) { ClientMessage next = current; current = null; msg = ActiveMQMessage.createMessage(next, session, options); if (enable1xPrefixes) { msg.setEnable1xPrefixes(true); } try { msg.doBeforeReceive(); } catch (Exception e) { ActiveMQJMSClientLogger.LOGGER.errorCreatingMessage(msg.getCoreMessage().toString(), e); return null; } return msg; } else { throw new NoSuchElementException(); } } }
msg.doBeforeReceive(); } catch (Exception e) { ActiveMQJMSClientLogger.LOGGER.errorPreparingMessageForReceipt(msg.getCoreMessage().toString(), e); return; } catch (ActiveMQException e) { ((ClientSessionInternal) session.getCoreSession()).markRollbackOnly(); ActiveMQJMSClientLogger.LOGGER.errorProcessingMessage(e); ActiveMQJMSClientLogger.LOGGER.onMessageError(e); ActiveMQJMSClientLogger.LOGGER.errorRecoveringSession(e2); ActiveMQJMSClientLogger.LOGGER.errorProcessingMessage(e);
@Override public ActiveMQMessage nextElement() { ActiveMQMessage msg; if (hasMoreElements()) { ClientMessage next = current; current = null; if (enable1xPrefixes) { msg = ActiveMQCompatibleMessage.createMessage(next, session, options); } else { msg = ActiveMQMessage.createMessage(next, session, options); } try { msg.doBeforeReceive(); } catch (Exception e) { ActiveMQJMSClientLogger.LOGGER.errorCreatingMessage(msg.getCoreMessage().toString(), e); return null; } return msg; } else { throw new NoSuchElementException(); } } }
msg.doBeforeReceive(); } catch (Exception e) { ActiveMQJMSClientLogger.LOGGER.errorPreparingMessageForReceipt(msg.getCoreMessage().toString(), e); return; } catch (ActiveMQException e) { ((ClientSessionInternal) session.getCoreSession()).markRollbackOnly(); ActiveMQJMSClientLogger.LOGGER.errorProcessingMessage(e); ActiveMQJMSClientLogger.LOGGER.onMessageError(e); ActiveMQJMSClientLogger.LOGGER.errorRecoveringSession(e2); ActiveMQJMSClientLogger.LOGGER.errorProcessingMessage(e);
@Override protected final void finalize() throws Throwable { if (!closed) { if (this.factoryReference.isFinalizeChecks()) { ActiveMQJMSClientLogger.LOGGER.connectionLeftOpen(creationStack); } close(); } }
@Override public ActiveMQMessage nextElement() { ActiveMQMessage msg; if (hasMoreElements()) { ClientMessage next = current; current = null; msg = ActiveMQMessage.createMessage(next, session, options); if (enable1xPrefixes) { msg.setEnable1xPrefixes(true); } try { msg.doBeforeReceive(); } catch (Exception e) { ActiveMQJMSClientLogger.LOGGER.errorCreatingMessage(msg.getCoreMessage().toString(), e); return null; } return msg; } else { throw new NoSuchElementException(); } } }
@Override public void failoverEvent(final FailoverEventType eventType) { ActiveMQConnection conn = connectionRef.get(); if (conn != null) { try { final FailoverEventListener failoverListener = conn.getFailoverListener(); if (failoverListener != null) { conn.failoverListenerExecutor.execute(new Runnable() { @Override public void run() { failoverListener.failoverEvent(eventType); } }); } } catch (JMSException e) { if (!conn.closed) { ActiveMQJMSClientLogger.LOGGER.errorCallingFailoverListener(e); } } } } }
@Override public synchronized void connectionFailed(final ActiveMQException me, boolean failedOver) { if (me == null) { return; } ActiveMQConnection conn = connectionRef.get(); if (conn != null) { try { final ExceptionListener exceptionListener = conn.getExceptionListener(); if (exceptionListener != null) { final JMSException je = new JMSException(me.toString(), failedOver ? EXCEPTION_FAILOVER : EXCEPTION_DISCONNECT); je.initCause(me); new Thread(new Runnable() { @Override public void run() { exceptionListener.onException(je); } }).start(); } } catch (JMSException e) { if (!conn.closed) { ActiveMQJMSClientLogger.LOGGER.errorCallingExcListener(e); } } } }
msg.doBeforeReceive(); } catch (Exception e) { ActiveMQJMSClientLogger.LOGGER.errorPreparingMessageForReceipt(msg.getCoreMessage().toString(), e); return; } catch (ActiveMQException e) { ((ClientSessionInternal) session.getCoreSession()).markRollbackOnly(); ActiveMQJMSClientLogger.LOGGER.errorProcessingMessage(e); ActiveMQJMSClientLogger.LOGGER.onMessageError(e); ActiveMQJMSClientLogger.LOGGER.errorRecoveringSession(e2); ActiveMQJMSClientLogger.LOGGER.errorProcessingMessage(e);
@Override protected final void finalize() throws Throwable { if (!closed) { if (this.factoryReference.isFinalizeChecks()) { ActiveMQJMSClientLogger.LOGGER.connectionLeftOpen(creationStack); } close(); } }
@Override public ActiveMQMessage nextElement() { ActiveMQMessage msg; if (hasMoreElements()) { ClientMessage next = current; current = null; if (enable1xPrefixes) { msg = ActiveMQCompatibleMessage.createMessage(next, session, options); } else { msg = ActiveMQMessage.createMessage(next, session, options); } try { msg.doBeforeReceive(); } catch (Exception e) { ActiveMQJMSClientLogger.LOGGER.errorCreatingMessage(msg.getCoreMessage().toString(), e); return null; } return msg; } else { throw new NoSuchElementException(); } } }
@Override public void failoverEvent(final FailoverEventType eventType) { ActiveMQConnection conn = connectionRef.get(); if (conn != null) { try { final FailoverEventListener failoverListener = conn.getFailoverListener(); if (failoverListener != null) { conn.failoverListenerExecutor.execute(new Runnable() { @Override public void run() { failoverListener.failoverEvent(eventType); } }); } } catch (JMSException e) { if (!conn.closed) { ActiveMQJMSClientLogger.LOGGER.errorCallingFailoverListener(e); } } } } }
@Override public synchronized void connectionFailed(final ActiveMQException me, boolean failedOver) { if (me == null) { return; } ActiveMQConnection conn = connectionRef.get(); if (conn != null) { try { final ExceptionListener exceptionListener = conn.getExceptionListener(); if (exceptionListener != null) { final JMSException je = new JMSException(me.toString(), failedOver ? EXCEPTION_FAILOVER : EXCEPTION_DISCONNECT); je.initCause(me); new Thread(new Runnable() { @Override public void run() { exceptionListener.onException(je); } }).start(); } } catch (JMSException e) { if (!conn.closed) { ActiveMQJMSClientLogger.LOGGER.errorCallingExcListener(e); } } } }
msg.doBeforeReceive(); } catch (Exception e) { ActiveMQJMSClientLogger.LOGGER.errorPreparingMessageForReceipt(msg.getCoreMessage().toString(), e); return; } catch (ActiveMQException e) { ((ClientSessionInternal) session.getCoreSession()).markRollbackOnly(); ActiveMQJMSClientLogger.LOGGER.errorProcessingMessage(e); ActiveMQJMSClientLogger.LOGGER.onMessageError(e); ActiveMQJMSClientLogger.LOGGER.errorRecoveringSession(e2); ActiveMQJMSClientLogger.LOGGER.errorProcessingMessage(e);
@Override protected final void finalize() throws Throwable { if (!closed) { if (this.factoryReference.isFinalizeChecks()) { ActiveMQJMSClientLogger.LOGGER.connectionLeftOpen(creationStack); } close(); } }
@Override public ActiveMQMessage nextElement() { ActiveMQMessage msg; if (hasMoreElements()) { ClientMessage next = current; current = null; msg = ActiveMQMessage.createMessage(next, session, options); if (enable1xPrefixes) { msg.setEnable1xPrefixes(true); } try { msg.doBeforeReceive(); } catch (Exception e) { ActiveMQJMSClientLogger.LOGGER.errorCreatingMessage(msg.getCoreMessage().toString(), e); return null; } return msg; } else { throw new NoSuchElementException(); } } }