Hi granda,

I think that it should go like this:

                       public void onMessage(MessageExchange exchange)
throws MessagingException {
                       // Here is the part that handles the exchange
received from Jms Consumer
                       if (exchange instanceof InOut && exchange.getStatus()
== ExchangeStatus.ACTIVE) {
                                channel.sendSync(exchange);                     
                        }
                        //You receive the exchange from the Web Service with
DONE status
                         else if (exchange instanceof InOut &&
exchange.getStatus() == ExchangeStatus.DONE) {                                  
                             
                                 log.info("inside DONE block");
                                 // You can also add here your fault
auditing.
                                channel.send(exchange); 
                        }
                        //If the exhcange is with status ERROR
                        else if (exchange.getStatus() ==
ExchangeStatus.ERROR) { 
                                log.info("inside ERROR block"); 
                                channel.send(exchange); 
                        }
                        //In all other cases (which means not InOut
Exchange, you should throw error 
                        else throw new IllegalStateException();
}

If this doesn't work for you (then I prolly missed something so please send
me your assembly to further investigate.

Hope it helps.

-----
Ioannis Canellos
-- 
View this message in context: 
http://old.nabble.com/smx4-javax.transaction.InvalidTransactionException%3A-tp28287860p28325695.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.

Reply via email to