Hi Granda,

before we get to the transactional part, I think that you have some issues
in your bean endpoint.

The bean endpoint has the "role" of transformer for your pipeline. That
means that it should handle InOut requests.

a) When you get an as ACTIVE exchange (The InOut with In message and no
OUT), you need to create the out message and send it to through the delivery
channel.

b) After doing so you will receive an exchange which will be either DONE or
ERROR. This exchange you will send again through the delivery channel and it
will reach your consumer.

You are doing part a correctly. However in part b you are resending the
original exchange instead of the response: 



>                 if(good){ 
>                                 log.info("inside DONE block"); 
>                                 exchange.setStatus(ExchangeStatus.DONE); 
>                                 channel.send(exchange); 
>                         } 
>                         //else if(exchange.getStatus() ==
> ExchangeStatus.ERROR){ 
>                 else{ 
>                                 log.info("inside ERROR block"); 
>                                 //Exception ex = new Exception
> ("ERROR:Fault occurred"+faultbody); 
>                                 Exception ex = new Exception ("ERROR:Fault
> occurred"); 
>                                 exchange.setError(ex); 
>                                 exchange.setStatus(ExchangeStatus.ERROR); 
>                                 channel.send(exchange); 
>                         } 
> 


You need to implement this as indicated above. This is probably the reason
you have the error with the transaction.



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

Reply via email to