I try to explain better:
1) I execute the SA the first time, but because there is a wrong XSLT file in the Transformer component, the SA fails.
2) I fix the XSLT in the transformer, I update the SA, and I redeploy it.
3) I resend the exchange sent in the step 1 from the HTTP BC to the Transformer SE, to complete the process of step 1. 4) When the HTTP BC receives the Done from the Transformer SE, it doesnt recognize it, because in fact it doesnt send it, in step 3.

The problem is that in step 3, I dont want to start a new SA again, because the components used in the SA may have altered the database (for example), when executed for step 1. I need only to complete the SA started in step 1, starting from the components that produced the errors.




Guillaume Nodet ha scritto:
I don't really follow.  If the HTTP did not received the DONE for the
previous exchange,
why do you need to recreate another exchange, you could just reuse the old
one.

Or adding an optional argument to the resendExchange(), to indicate if the
exchange
id should be regenerated or not.
See
http://fisheye6.cenqua.com/browse/servicemix/branches/servicemix-3.1/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/container/JBIContainer.java?r=500974#l1286

On 6/8/07, Gianfranco Boccalon <[EMAIL PROTECTED]> wrote:

No, I mean that the whole flow has been executed, but when the HTTP BC
receives the DONE exchange from the Transformer SE, it produces an error
because this exchange is not in the "locks" Map, that means that this
exchange was not sent by itself (I suppose).

Guillaume Nodet ha scritto:
> Do you mean that the whole flow has been executed, but the HTTP BC
> has received  a fault or error and you want to retry it ?
> The problem is that the BC has some processing to do when receiving
> the fault or error, so the exhcange will be terminated.  If you want
> to be
> able
> to retry, I would put a simple SE in between (the still-to-develop EIP
> pattern
> about error handling).
>
> On 6/8/07, Gianfranco Boccalon <[EMAIL PROTECTED]> wrote:
>>
>> Hi all,
>> I'm using the resend exchange feature of ServiceMix (method
>> resendExchange of JBIContainer) and I have the following problem: I
have
>> a very simple SA composed of
>>
>> HTTP BC -> Transformer SE -> Screen BC
>>
>> I saved the exchange sent from the HTTP BC to the Transformer SE, and
>> later I resent it.
>> What happens is that the exchange is sent (with status Active), the
>> transformer elaborates it and send another exchange to the Screen BC,
>> and finally the Transformer SE send the Done exchange to the HTTP BC.
>> And now the problem: when the HTTP BC receives the Done exchange, it
>> says "what is this ?? ah, no no no, this is not my exchange..." with
>> this exception:
>>
>> ERROR - HttpComponent                  - Error processing exchange
>> InOnly[
>>   id: ID:boccalon-1470-1181286796962-62:0
>>   status: Done
>>   role: consumer
>>   service: {http://servicemix.org/cheese}myTransformertransfi
>>   endpoint: myTransformertransfi
>>   operation: ACTIONS
>>   in: ....content of message here.......
>> ]
>> java.lang.IllegalStateException: Exchange not found
>>         at
>> org.apache.servicemix.http.processors.ConsumerProcessor.process(
>> ConsumerProcessor.java:104)
>>         at
>> org.apache.servicemix.common.AsyncBaseLifeCycle.doProcess(
>> AsyncBaseLifeCycle.java:489)
>>         at
>> org.apache.servicemix.common.AsyncBaseLifeCycle.processExchange(
>> AsyncBaseLifeCycle.java:463)
>>         at
>> org.apache.servicemix.common.BaseLifeCycle.onMessageExchange(
>> BaseLifeCycle.java:46)
>>         at
>> org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.processInBound(
>> DeliveryChannelImpl.java:593)
>>         at
>> org.apache.servicemix.jbi.nmr.flow.AbstractFlow.doRouting(
>> AbstractFlow.java:174)
>>         at
>> org.apache.servicemix.jbi.nmr.flow.seda.SedaFlow.doRouting(
SedaFlow.java
>> :176)
>>         at
>> org.apache.servicemix.jbi.nmr.flow.seda.SedaQueue$1.run(SedaQueue.java
>> :134)
>>         at
>>
>>
edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.runTask
>>
>> (ThreadPoolExecutor.java:665)
>>         at
>>
>>
edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.run
>>
>> (ThreadPoolExecutor.java:690)
>>         at java.lang.Thread.run(Thread.java:595)
>>
>>
>> ERROR - HttpComponent - Error setting exchange status
>> to ERROR
>> javax.jbi.messaging.MessagingException: illegal call to send / sendSync
>>         at
>> org.apache.servicemix.jbi.messaging.MessageExchangeImpl.handleSend(
>> MessageExchangeImpl.java:571)
>>         at
>> org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.doSend(
>> DeliveryChannelImpl.java:370)
>>         at
>> org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.send(
>> DeliveryChannelImpl.java:417)
>>         at
>> org.apache.servicemix.common.BaseLifeCycle.onMessageExchange(
>> BaseLifeCycle.java:58)
>>         at
>> org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.processInBound(
>> DeliveryChannelImpl.java:593)
>>         at
>> org.apache.servicemix.jbi.nmr.flow.AbstractFlow.doRouting(
>> AbstractFlow.java:174)
>>         at
>> org.apache.servicemix.jbi.nmr.flow.seda.SedaFlow.doRouting(
SedaFlow.java
>> :176)
>>         at
>> org.apache.servicemix.jbi.nmr.flow.seda.SedaQueue$1.run(SedaQueue.java
>> :134)
>>
>>
>> In fact, it's right: it didn't send that exchange because I resent an
>> old exchange, but....
>> Is there a way to avoid this problem ? The resend feature is very
useful
>> for me because it allows to restart a failed SA in the middle, and not
>> from the beginning, that in some cases can be a problem because the
>> previous components may have changed the database (for example).
>> A listener could intercept the Done exchange for the HTTP BC and block
>> it (for example) ?
>> Do you have any idea ?
>>
>> Thanks
>>
>> --
>> Gianfranco Boccalon
>> Engineering Ingegneria Informatica S.p.A.
>> Direzione Centrale Ricerca e Innovazione
>> Direzione Architetture e Consulenza
>> 35127 PADOVA
>> Corso Stati Uniti 23/I
>> Tel. +39.049.8692508
>> Cell. 335.7813507
>> Fax +39.049.8692566
>> E-mail: [EMAIL PROTECTED]
>>
>>
>
>





Reply via email to