public void resendExchange(MessageExchange exchange) throws JBIException {
if (!(exchange instanceof MessageExchangeImpl)) {
throw new IllegalArgumentException("exchange should be a MessageExchangeImpl");
}
MessageExchangeImpl me = (MessageExchangeImpl) exchange;
me.getPacket().setExchangeId(new IdGenerator().generateId());
me.getPacket().setOut(null);
me.getPacket().setFault(null);
me.getPacket().setError(null);
me.getPacket().setStatus(ExchangeStatus.ACTIVE);
me.getPacket().setProperty(JbiConstants.DATESTAMP_PROPERTY_NAME, Calendar.getInstance());