Thx guys this is what I thought and wanted some confirmation before I proceded 
to apply the changes.  The strangest part of this all is that this used to work 
with servicemix 3.0.


ANyway I will try that and let you guys know. ... Eric

----- Original Message ----
From: Bruce Snyder <[EMAIL PROTECTED]>
To: [email protected]
Sent: Saturday, January 20, 2007 1:31:54 PM
Subject: Re: Need help .


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/



 
____________________________________________________________________________________
Need Mail bonding?
Go to the Yahoo! Mail Q&A for great tips from Yahoo! Answers users.
http://answers.yahoo.com/dir/?link=list&sid=396546091

Reply via email to