@Override public void saveToOutputStream(final OutputStream out) throws ActiveMQException { try { byte[] readBuffer = new byte[getBodySize()]; getBodyBuffer().readBytes(readBuffer); out.write(readBuffer); out.flush(); } catch (IOException e) { throw ActiveMQClientMessageBundle.BUNDLE.errorSavingBody(e); } }
@Override public void saveToOutputStream(final OutputStream out) throws ActiveMQException { try { byte[] readBuffer = new byte[getBodySize()]; getBodyBuffer().readBytes(readBuffer); out.write(readBuffer); out.flush(); } catch (IOException e) { throw ActiveMQClientMessageBundle.BUNDLE.errorSavingBody(e); } }
@Override public void saveToOutputStream(final OutputStream out) throws ActiveMQException { try { byte[] readBuffer = new byte[getBodySize()]; getBodyBuffer().readBytes(readBuffer); out.write(readBuffer); out.flush(); } catch (IOException e) { throw ActiveMQClientMessageBundle.BUNDLE.errorSavingBody(e); } }
@Override public void saveToOutputStream(final OutputStream out) throws ActiveMQException { try { byte[] readBuffer = new byte[getBodySize()]; getBodyBuffer().readBytes(readBuffer); out.write(readBuffer); out.flush(); } catch (IOException e) { throw ActiveMQClientMessageBundle.BUNDLE.errorSavingBody(e); } }
@Override public void saveToOutputStream(final OutputStream out) throws ActiveMQException { try { byte[] readBuffer = new byte[getBodySize()]; getBodyBuffer().readBytes(readBuffer); out.write(readBuffer); out.flush(); } catch (IOException e) { throw ActiveMQClientMessageBundle.BUNDLE.errorSavingBody(e); } }
@Override public void saveToOutputStream(final OutputStream out) throws ActiveMQException { try { byte[] readBuffer = new byte[getBodySize()]; getBodyBuffer().readBytes(readBuffer); out.write(readBuffer); out.flush(); } catch (IOException e) { throw ActiveMQClientMessageBundle.BUNDLE.errorSavingBody(e); } }
@Override public void saveToOutputStream(final OutputStream out) throws ActiveMQException { try { byte[] readBuffer = new byte[getBodySize()]; getBodyBuffer().readBytes(readBuffer); out.write(readBuffer); out.flush(); } catch (IOException e) { throw ActiveMQClientMessageBundle.BUNDLE.errorSavingBody(e); } }
producer.send(message); session.commit(); Assert.assertTrue("Message body growing indefinitely and unexpectedly", message.getBodySize() < 1000);