On 1/19/07, Eric Dofonsou <[EMAIL PROTECTED]> wrote:


SynchronizationProvider.process()
------------
  public void process(MessageExchange exchange) throws Exception
  {
      //exchange.setService(endpoint.getDestinationService());
      channel.send(exchange);
  }

I believe the issue is that, like Adrian noted, you cannot just send
along an exchange. The reason that the strange error is being thrown
is because the SynchronizationProvider is a consumer and so the
exchange passed to its process method is already active and must
therefore must be set to DONE. In addition, you must copy the in
message to the out message. Below is an example of all of this:

NormalizedMessage in = exchange.getMessage("in");
NormalizedMessage out = exchange.createMessage();
out.setContent(in.getContent());
exchange.setMessage(out, "out");
exchange.setStatus(ExchangeStatus.DONE);
channel.send(exchange);

Bruce
--
perl -e 'print unpack("u30","D0G)[EMAIL 
PROTECTED]&5R\"F)R=6-E+G-N>61E<D\!G;6%I;\"YC;VT*"
);'

Apache Geronimo - http://geronimo.apache.org/
Apache ActiveMQ - http://activemq.org/
Apache ServiceMix - http://servicemix.org/
Castor - http://castor.org/

Reply via email to