You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@servicemix.apache.org by "Ron Gavlin (JIRA)" <ji...@apache.org> on 2008/10/31 13:05:07 UTC

[jira] Created: (SM-1667) TransformBeanSupport does not correctly report errors for in-only exchanges

TransformBeanSupport does not correctly report errors for in-only exchanges
---------------------------------------------------------------------------

                 Key: SM-1667
                 URL: https://issues.apache.org/activemq/browse/SM-1667
             Project: ServiceMix
          Issue Type: Bug
          Components: servicemix-bean
    Affects Versions: servicemix-bean-2008.01
            Reporter: Ron Gavlin
            Priority: Critical


The smx-bean TransformBeanSupport class does not correctly report errors for in-only exchanges. If the target exchange status is ERROR, the source exchange status is still returned as DONE. This should be fixed for both sync and async use cases.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Reopened: (SM-1667) TransformBeanSupport does not correctly report errors for in-only exchanges

Posted by "Andrea Zoppello (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/SM-1667?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Andrea Zoppello reopened SM-1667:
---------------------------------


Hi the patch introcuced here introduce a bug in handling done for TransformComponent Support.

the following exception is raised with a simple http <--> sm-bean.

javax.jbi.messaging.MessagingException: Out not supported
        at org.apache.servicemix.jbi.messaging.MessageExchangeImpl.setMessage(MessageExchangeImpl.ja
va:357)
        at org.apache.servicemix.bean.support.TransformBeanSupport.processFirstExchange(TransformBea
nSupport.java:163)
        at org.apache.servicemix.bean.support.TransformBeanSupport.onMessageExchange(TransformBeanSu
pport.java:128)
        at org.apache.servicemix.bean.BeanEndpoint.onProviderExchange(BeanEndpoint.java:226)
        at org.apache.servicemix.bean.BeanEndpoint.process(BeanEndpoint.java:212)
        at org.apache.servicemix.common.AsyncBaseLifeCycle.doProcess(AsyncBaseLifeCycle.java:600)
        at org.apache.servicemix.common.AsyncBaseLifeCycle.processExchange(AsyncBaseLifeCycle.java:5
54)
        at org.apache.servicemix.common.AsyncBaseLifeCycle.onMessageExchange(AsyncBaseLifeCycle.java
:510)
        at org.apache.servicemix.common.SyncLifeCycleWrapper.onMessageExchange(SyncLifeCycleWrapper.
java:60)
        at org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.processInBound(DeliveryChannelImp
l.java:620)
        at org.apache.servicemix.jbi.nmr.flow.AbstractFlow.doRouting(AbstractFlow.java:172)
        at org.apache.servicemix.jbi.nmr.flow.seda.SedaFlow.doRouting(SedaFlow.java:168)
        at org.apache.servicemix.jbi.nmr.flow.seda.SedaQueue$1.run(SedaQueue.java:134)
        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
        at java.lang.Thread.run(Thread.java:595)

This is due to the fact that when a done arrives the processFirstMessage is called instead of calling processOngoinMessage.

Andrea



> TransformBeanSupport does not correctly report errors for in-only exchanges
> ---------------------------------------------------------------------------
>
>                 Key: SM-1667
>                 URL: https://issues.apache.org/activemq/browse/SM-1667
>             Project: ServiceMix
>          Issue Type: Bug
>          Components: servicemix-bean
>    Affects Versions: servicemix-bean-2008.01
>            Reporter: Ron Gavlin
>            Assignee: Guillaume Nodet
>            Priority: Critical
>             Fix For: servicemix-bean-2008.02, 3.2.4
>
>
> The smx-bean TransformBeanSupport class does not correctly report errors for in-only exchanges. If the target exchange status is ERROR, the source exchange status is still returned as DONE. This should be fixed for both sync and async use cases.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SM-1667) TransformBeanSupport does not correctly report errors for in-only exchanges

Posted by "Guillaume Nodet (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/SM-1667?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=48582#action_48582 ] 

Guillaume Nodet commented on SM-1667:
-------------------------------------

What is this "restart from the failure point" feature about ? Do you have more infos on that ? How does it work ?

> TransformBeanSupport does not correctly report errors for in-only exchanges
> ---------------------------------------------------------------------------
>
>                 Key: SM-1667
>                 URL: https://issues.apache.org/activemq/browse/SM-1667
>             Project: ServiceMix
>          Issue Type: Bug
>          Components: servicemix-bean
>    Affects Versions: servicemix-bean-2008.01
>            Reporter: Ron Gavlin
>            Assignee: Guillaume Nodet
>            Priority: Critical
>             Fix For: servicemix-bean-2008.02, 3.2.4
>
>         Attachments: sm-1667-inout-regression.patch
>
>
> The smx-bean TransformBeanSupport class does not correctly report errors for in-only exchanges. If the target exchange status is ERROR, the source exchange status is still returned as DONE. This should be fixed for both sync and async use cases.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SM-1667) TransformBeanSupport does not correctly report errors for in-only exchanges

Posted by "Andrea Zoppello (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/SM-1667?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=48588#action_48588 ] 

Andrea Zoppello commented on SM-1667:
-------------------------------------

Hi Guillaume,

I read carefully what you said, and it seems you agree with me.

The scenario you describe make perfect sense, but what you're describing is a scenario within transaction management
where if i understand well you need to use sendSync ( right or not ??? ).
 I've not try directly but if i remember well the only way tomake automatic transaction work is to use sendSync. 

In that case i want to repeat myself it perfect make sense, the exchange must be propagate back in all the chain.

But let immagine a scenario where i do not want automatic transaction management, because i want all my exchange will
use send instead of sendSync, handling fault manually ( think for example compensation handler and error handler in bpel ),
the back propagation of the exchange does not make sense in that case.

Finally my opinion is that:

1) In all scenario where the exchanges are propagated using sendSync and, the approach provided by Ron is right

2) In all other scenario, where all the InOnly MEP are propagated using send it does not make sense.

Hope this help.

Thoughts??







> TransformBeanSupport does not correctly report errors for in-only exchanges
> ---------------------------------------------------------------------------
>
>                 Key: SM-1667
>                 URL: https://issues.apache.org/activemq/browse/SM-1667
>             Project: ServiceMix
>          Issue Type: Bug
>          Components: servicemix-bean
>    Affects Versions: servicemix-bean-2008.01
>            Reporter: Ron Gavlin
>            Assignee: Guillaume Nodet
>            Priority: Critical
>             Fix For: servicemix-bean-2008.02, 3.2.4
>
>         Attachments: sm-1667-inout-regression.patch
>
>
> The smx-bean TransformBeanSupport class does not correctly report errors for in-only exchanges. If the target exchange status is ERROR, the source exchange status is still returned as DONE. This should be fixed for both sync and async use cases.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SM-1667) TransformBeanSupport does not correctly report errors for in-only exchanges

Posted by "Ron Gavlin (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/SM-1667?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=48531#action_48531 ] 

Ron Gavlin commented on SM-1667:
--------------------------------

Hi Gianfranco,

I believe the JBI spec requires that message exchange semantics be identical for both sync and async use cases. The recent changes made to various components addresses cases where these components were not jbi-compliant when used asynchronously. 

These changes allow appropriate JBI error/fault handling to be introduced anywhere in the flow for both sync and now async flows. In particular, the smx-camel errorHandler can now be injected into sync and async flows to provide detailed error/exception processing. IMO, this is a dramatic improvement over other work-arounds, such as listening for fault/error exchanges on the nmr and then attempting to do something smart with them at the SA boundary.

Thoughts?

/Ron

> TransformBeanSupport does not correctly report errors for in-only exchanges
> ---------------------------------------------------------------------------
>
>                 Key: SM-1667
>                 URL: https://issues.apache.org/activemq/browse/SM-1667
>             Project: ServiceMix
>          Issue Type: Bug
>          Components: servicemix-bean
>    Affects Versions: servicemix-bean-2008.01
>            Reporter: Ron Gavlin
>            Assignee: Guillaume Nodet
>            Priority: Critical
>             Fix For: servicemix-bean-2008.02, 3.2.4
>
>         Attachments: sm-1667-inout-regression.patch
>
>
> The smx-bean TransformBeanSupport class does not correctly report errors for in-only exchanges. If the target exchange status is ERROR, the source exchange status is still returned as DONE. This should be fixed for both sync and async use cases.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SM-1667) TransformBeanSupport does not correctly report errors for in-only exchanges

Posted by "Guillaume Nodet (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/SM-1667?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=48576#action_48576 ] 

Guillaume Nodet commented on SM-1667:
-------------------------------------

I think the behavior is specified in the spec, though not very explicitely.
Section 5.4.2 of the JBI spec says:
{code}
Each pattern ends with a status exchange; this is necessary to deterministically complete the exchange.
{code}
Status exchanges include ERROR and DONE status.

Also, section 5.5.2.3.1 states: 
{code}
A new ME instance is ACTIVE, and remains so until the end of its life cycle, when it transitions to either a DONE or ERROR state.
{code}

Section 5.5.5.1 also gives an example of an InOnly MEP terminated with an ERROR status.

So the ERROR state on the InOnly MEP is not a ServiceMix extension to the spec.  In addition, the DONE / ERROR statuses are required to be able to use sendSync, which as Ron said, must not change the semantic of the MEP.

> TransformBeanSupport does not correctly report errors for in-only exchanges
> ---------------------------------------------------------------------------
>
>                 Key: SM-1667
>                 URL: https://issues.apache.org/activemq/browse/SM-1667
>             Project: ServiceMix
>          Issue Type: Bug
>          Components: servicemix-bean
>    Affects Versions: servicemix-bean-2008.01
>            Reporter: Ron Gavlin
>            Assignee: Guillaume Nodet
>            Priority: Critical
>             Fix For: servicemix-bean-2008.02, 3.2.4
>
>         Attachments: sm-1667-inout-regression.patch
>
>
> The smx-bean TransformBeanSupport class does not correctly report errors for in-only exchanges. If the target exchange status is ERROR, the source exchange status is still returned as DONE. This should be fixed for both sync and async use cases.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SM-1667) TransformBeanSupport does not correctly report errors for in-only exchanges

Posted by "Guillaume Nodet (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/SM-1667?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=48586#action_48586 ] 

Guillaume Nodet commented on SM-1667:
-------------------------------------

I do understand your use case, but I still disagree.  Let's take your example and say that endpoint A is a jms transacted consumer.   If it does not receive the propagated error, it will commit the transaction.  But if it receives an error, it will be able to rollback the transaction and the same message will be processed later by virtue of the redelivery mechanism in jms.

I think in your use feature, you need to intercept the exchange before it reaches B and act there, else, there are chances that endpoints earlier in the flow may be a bit screwed.  Another example: if A is a file poller endpoint, it may move the file to a different location after processing whether is has been successfully processed or if the processing failed.  So this needs to be done after the actually know the result.  Hence i think you'd have to intercept the exchange in error between B and C and do something there.

> TransformBeanSupport does not correctly report errors for in-only exchanges
> ---------------------------------------------------------------------------
>
>                 Key: SM-1667
>                 URL: https://issues.apache.org/activemq/browse/SM-1667
>             Project: ServiceMix
>          Issue Type: Bug
>          Components: servicemix-bean
>    Affects Versions: servicemix-bean-2008.01
>            Reporter: Ron Gavlin
>            Assignee: Guillaume Nodet
>            Priority: Critical
>             Fix For: servicemix-bean-2008.02, 3.2.4
>
>         Attachments: sm-1667-inout-regression.patch
>
>
> The smx-bean TransformBeanSupport class does not correctly report errors for in-only exchanges. If the target exchange status is ERROR, the source exchange status is still returned as DONE. This should be fixed for both sync and async use cases.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (SMXCOMP-10) TransformBeanSupport does not correctly report errors for in-only exchanges

Posted by "Gert Vanthienen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/SMXCOMP-10?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Gert Vanthienen updated SMXCOMP-10:
-----------------------------------

    Fix Version/s:     (was: servicemix-bean-2009.02)
                   servicemix-bean-2010.01

> TransformBeanSupport does not correctly report errors for in-only exchanges
> ---------------------------------------------------------------------------
>
>                 Key: SMXCOMP-10
>                 URL: https://issues.apache.org/activemq/browse/SMXCOMP-10
>             Project: ServiceMix Components
>          Issue Type: Bug
>          Components: servicemix-bean
>    Affects Versions: 3.2.3, servicemix-bean-2008.01
>            Reporter: Ron Gavlin
>            Assignee: Guillaume Nodet
>            Priority: Critical
>             Fix For: 3.2.4, servicemix-bean-2010.01
>
>         Attachments: sm-1667-inout-regression.patch
>
>
> The smx-bean TransformBeanSupport class does not correctly report errors for in-only exchanges. If the target exchange status is ERROR, the source exchange status is still returned as DONE. This should be fixed for both sync and async use cases.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (SM-1667) TransformBeanSupport does not correctly report errors for in-only exchanges

Posted by "Ron Gavlin (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/SM-1667?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ron Gavlin updated SM-1667:
---------------------------

    Patch Info: [Patch Available]
    Regression: [Regression]

> TransformBeanSupport does not correctly report errors for in-only exchanges
> ---------------------------------------------------------------------------
>
>                 Key: SM-1667
>                 URL: https://issues.apache.org/activemq/browse/SM-1667
>             Project: ServiceMix
>          Issue Type: Bug
>          Components: servicemix-bean
>    Affects Versions: servicemix-bean-2008.01
>            Reporter: Ron Gavlin
>            Assignee: Guillaume Nodet
>            Priority: Critical
>             Fix For: servicemix-bean-2008.02, 3.2.4
>
>
> The smx-bean TransformBeanSupport class does not correctly report errors for in-only exchanges. If the target exchange status is ERROR, the source exchange status is still returned as DONE. This should be fixed for both sync and async use cases.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Reopened: (SM-1667) TransformBeanSupport does not correctly report errors for in-only exchanges

Posted by "Gianfranco Boccalon (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/SM-1667?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Gianfranco Boccalon reopened SM-1667:
-------------------------------------


I dont agree with the approach that you are applying to some components: in my opinion the right behaviour should be the suggested one only in case of Synchronous send, while in the asynchronous mode the management of the output message (in case of in-only usage) should be decoupled from the management of the input message.
Doing so, should allow also avoiding using some temporary stores to keep the exchanges that are in pending states, because in asynchronous mode I think that the concept of "pending" is not appliable.

> TransformBeanSupport does not correctly report errors for in-only exchanges
> ---------------------------------------------------------------------------
>
>                 Key: SM-1667
>                 URL: https://issues.apache.org/activemq/browse/SM-1667
>             Project: ServiceMix
>          Issue Type: Bug
>          Components: servicemix-bean
>    Affects Versions: servicemix-bean-2008.01
>            Reporter: Ron Gavlin
>            Assignee: Guillaume Nodet
>            Priority: Critical
>             Fix For: servicemix-bean-2008.02, 3.2.4
>
>         Attachments: sm-1667-inout-regression.patch
>
>
> The smx-bean TransformBeanSupport class does not correctly report errors for in-only exchanges. If the target exchange status is ERROR, the source exchange status is still returned as DONE. This should be fixed for both sync and async use cases.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SM-1667) TransformBeanSupport does not correctly report errors for in-only exchanges

Posted by "Ron Gavlin (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/SM-1667?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=48583#action_48583 ] 

Ron Gavlin commented on SM-1667:
--------------------------------

Hi Andrea,

What you are describing dramatically changes the semantic of the MEP, based on whether sync or async is being used. Therefore the flow developer must be intimately aware of this implementation detail which IMHO violates the intent of the specification.

In addition, as Guillaume stated, "Section 5.5.5.1 also gives an example of an InOnly MEP terminated with an ERROR status"... which is clearly returned to the consumer endpoint, otherwise there would be no value in setting the ERROR status.

/Ron

> TransformBeanSupport does not correctly report errors for in-only exchanges
> ---------------------------------------------------------------------------
>
>                 Key: SM-1667
>                 URL: https://issues.apache.org/activemq/browse/SM-1667
>             Project: ServiceMix
>          Issue Type: Bug
>          Components: servicemix-bean
>    Affects Versions: servicemix-bean-2008.01
>            Reporter: Ron Gavlin
>            Assignee: Guillaume Nodet
>            Priority: Critical
>             Fix For: servicemix-bean-2008.02, 3.2.4
>
>         Attachments: sm-1667-inout-regression.patch
>
>
> The smx-bean TransformBeanSupport class does not correctly report errors for in-only exchanges. If the target exchange status is ERROR, the source exchange status is still returned as DONE. This should be fixed for both sync and async use cases.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SM-1667) TransformBeanSupport does not correctly report errors for in-only exchanges

Posted by "Andrea Zoppello (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/SM-1667?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=48580#action_48580 ] 

Andrea Zoppello commented on SM-1667:
-------------------------------------

Hi Guillaume,

I think that what you are saying is right and i find ( despite is on the specification or not ) that to have the error status
is quite useful.

But i don't agree that if InOnly MEP terminate with an ERROR status it should propagated back.

I agree totally with Gianfranco this should be done only when we're working in sync mode, otherwise it's better not 
to propagate the error back and use feature like restart from the failure point, that we've just implemeted.

Do you agree with this??

Andrea 

> TransformBeanSupport does not correctly report errors for in-only exchanges
> ---------------------------------------------------------------------------
>
>                 Key: SM-1667
>                 URL: https://issues.apache.org/activemq/browse/SM-1667
>             Project: ServiceMix
>          Issue Type: Bug
>          Components: servicemix-bean
>    Affects Versions: servicemix-bean-2008.01
>            Reporter: Ron Gavlin
>            Assignee: Guillaume Nodet
>            Priority: Critical
>             Fix For: servicemix-bean-2008.02, 3.2.4
>
>         Attachments: sm-1667-inout-regression.patch
>
>
> The smx-bean TransformBeanSupport class does not correctly report errors for in-only exchanges. If the target exchange status is ERROR, the source exchange status is still returned as DONE. This should be fixed for both sync and async use cases.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (SM-1667) TransformBeanSupport does not correctly report errors for in-only exchanges

Posted by "Guillaume Nodet (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/SM-1667?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Guillaume Nodet resolved SM-1667.
---------------------------------

    Fix Version/s: 3.2.4
       Resolution: Fixed

Adding         src/main/java/org/apache/servicemix/bean/support/BeanSupport.java
Adding         src/main/java/org/apache/servicemix/bean/support/ExchangeTarget.java
Adding         src/main/java/org/apache/servicemix/bean/support/TransformBeanSupport.java
Transmitting file data ...
Committed revision 711672.

> TransformBeanSupport does not correctly report errors for in-only exchanges
> ---------------------------------------------------------------------------
>
>                 Key: SM-1667
>                 URL: https://issues.apache.org/activemq/browse/SM-1667
>             Project: ServiceMix
>          Issue Type: Bug
>          Components: servicemix-bean
>    Affects Versions: servicemix-bean-2008.01
>            Reporter: Ron Gavlin
>            Assignee: Guillaume Nodet
>            Priority: Critical
>             Fix For: servicemix-bean-2008.02, 3.2.4
>
>
> The smx-bean TransformBeanSupport class does not correctly report errors for in-only exchanges. If the target exchange status is ERROR, the source exchange status is still returned as DONE. This should be fixed for both sync and async use cases.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SM-1667) TransformBeanSupport does not correctly report errors for in-only exchanges

Posted by "Ron Gavlin (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/SM-1667?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=46982#action_46982 ] 

Ron Gavlin commented on SM-1667:
--------------------------------

Please backport to SMX 3.2.x branch if possible.

> TransformBeanSupport does not correctly report errors for in-only exchanges
> ---------------------------------------------------------------------------
>
>                 Key: SM-1667
>                 URL: https://issues.apache.org/activemq/browse/SM-1667
>             Project: ServiceMix
>          Issue Type: Bug
>          Components: servicemix-bean
>    Affects Versions: servicemix-bean-2008.01
>            Reporter: Ron Gavlin
>            Assignee: Guillaume Nodet
>            Priority: Critical
>             Fix For: servicemix-bean-2008.02
>
>
> The smx-bean TransformBeanSupport class does not correctly report errors for in-only exchanges. If the target exchange status is ERROR, the source exchange status is still returned as DONE. This should be fixed for both sync and async use cases.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SM-1667) TransformBeanSupport does not correctly report errors for in-only exchanges

Posted by "Gianfranco Boccalon (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/SM-1667?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=48533#action_48533 ] 

Gianfranco Boccalon commented on SM-1667:
-----------------------------------------

I have to check the specs to be sure of the right behaviour.
Now I have a big question: which is the behaviour of all other standard components ?
Does they keep an exchange store, like the new TransformBeanComponent ? I'm not sure about this.
If they behave like the old TransformBeanComponent they should be changed to be compliant with the specs.

> TransformBeanSupport does not correctly report errors for in-only exchanges
> ---------------------------------------------------------------------------
>
>                 Key: SM-1667
>                 URL: https://issues.apache.org/activemq/browse/SM-1667
>             Project: ServiceMix
>          Issue Type: Bug
>          Components: servicemix-bean
>    Affects Versions: servicemix-bean-2008.01
>            Reporter: Ron Gavlin
>            Assignee: Guillaume Nodet
>            Priority: Critical
>             Fix For: servicemix-bean-2008.02, 3.2.4
>
>         Attachments: sm-1667-inout-regression.patch
>
>
> The smx-bean TransformBeanSupport class does not correctly report errors for in-only exchanges. If the target exchange status is ERROR, the source exchange status is still returned as DONE. This should be fixed for both sync and async use cases.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SM-1667) TransformBeanSupport does not correctly report errors for in-only exchanges

Posted by "Gianfranco Boccalon (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/SM-1667?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=48563#action_48563 ] 

Gianfranco Boccalon commented on SM-1667:
-----------------------------------------

The JBI specs doesn't say anything about this topic: this means that the new behaviour may be right or not, it depends on how you read the specs.
My opinion still remains that this behaviour should be applied only for synchronous processing, while for asynchronous processing the old behaviour should be applied, because I think that asynchronous mode should work as a "fire and forget" model, maximizing the throughput of the system with the disadvantage that the errors are not propagated backward in the process.
To support this theory I can say also that in the JBI specs there is no the concept of Error for the in-only MEP: this is a SMX extension, that we use in our code, but I think that it's not standard.

> TransformBeanSupport does not correctly report errors for in-only exchanges
> ---------------------------------------------------------------------------
>
>                 Key: SM-1667
>                 URL: https://issues.apache.org/activemq/browse/SM-1667
>             Project: ServiceMix
>          Issue Type: Bug
>          Components: servicemix-bean
>    Affects Versions: servicemix-bean-2008.01
>            Reporter: Ron Gavlin
>            Assignee: Guillaume Nodet
>            Priority: Critical
>             Fix For: servicemix-bean-2008.02, 3.2.4
>
>         Attachments: sm-1667-inout-regression.patch
>
>
> The smx-bean TransformBeanSupport class does not correctly report errors for in-only exchanges. If the target exchange status is ERROR, the source exchange status is still returned as DONE. This should be fixed for both sync and async use cases.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (SM-1667) TransformBeanSupport does not correctly report errors for in-only exchanges

Posted by "Ron Gavlin (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/SM-1667?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ron Gavlin updated SM-1667:
---------------------------

    Attachment: sm-1667-inout-regression.patch

Here is a patch for the regression introduced when this issue was originally resolved. The patch fixes the scenario where the provider incorrectly handled a DONE exchange.

Please backport this patch to SMX 3.2.x.

> TransformBeanSupport does not correctly report errors for in-only exchanges
> ---------------------------------------------------------------------------
>
>                 Key: SM-1667
>                 URL: https://issues.apache.org/activemq/browse/SM-1667
>             Project: ServiceMix
>          Issue Type: Bug
>          Components: servicemix-bean
>    Affects Versions: servicemix-bean-2008.01
>            Reporter: Ron Gavlin
>            Assignee: Guillaume Nodet
>            Priority: Critical
>             Fix For: servicemix-bean-2008.02, 3.2.4
>
>         Attachments: sm-1667-inout-regression.patch
>
>
> The smx-bean TransformBeanSupport class does not correctly report errors for in-only exchanges. If the target exchange status is ERROR, the source exchange status is still returned as DONE. This should be fixed for both sync and async use cases.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (SM-1667) TransformBeanSupport does not correctly report errors for in-only exchanges

Posted by "Guillaume Nodet (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/SM-1667?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Guillaume Nodet resolved SM-1667.
---------------------------------

    Resolution: Fixed

Sending        servicemix-bean/src/main/java/org/apache/servicemix/bean/support/TransformBeanSupport.java
Sending        servicemix-bean/src/test/java/org/apache/servicemix/bean/TransformBeanSupportTest.java
Transmitting file data ..
Committed revision 726642.

Sending        src/main/java/org/apache/servicemix/bean/support/TransformBeanSupport.java
Sending        src/test/java/org/apache/servicemix/bean/TransformBeanSupportTest.java
Transmitting file data ..
Committed revision 726643.

> TransformBeanSupport does not correctly report errors for in-only exchanges
> ---------------------------------------------------------------------------
>
>                 Key: SM-1667
>                 URL: https://issues.apache.org/activemq/browse/SM-1667
>             Project: ServiceMix
>          Issue Type: Bug
>          Components: servicemix-bean
>    Affects Versions: servicemix-bean-2008.01
>            Reporter: Ron Gavlin
>            Assignee: Guillaume Nodet
>            Priority: Critical
>             Fix For: servicemix-bean-2008.02, 3.2.4
>
>         Attachments: sm-1667-inout-regression.patch
>
>
> The smx-bean TransformBeanSupport class does not correctly report errors for in-only exchanges. If the target exchange status is ERROR, the source exchange status is still returned as DONE. This should be fixed for both sync and async use cases.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Reopened: (SM-1667) TransformBeanSupport does not correctly report errors for in-only exchanges

Posted by "Ron Gavlin (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/SM-1667?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ron Gavlin reopened SM-1667:
----------------------------


Please backport to the SMX 3.2.x branch.

> TransformBeanSupport does not correctly report errors for in-only exchanges
> ---------------------------------------------------------------------------
>
>                 Key: SM-1667
>                 URL: https://issues.apache.org/activemq/browse/SM-1667
>             Project: ServiceMix
>          Issue Type: Bug
>          Components: servicemix-bean
>    Affects Versions: servicemix-bean-2008.01
>            Reporter: Ron Gavlin
>            Assignee: Guillaume Nodet
>            Priority: Critical
>             Fix For: servicemix-bean-2008.02
>
>
> The smx-bean TransformBeanSupport class does not correctly report errors for in-only exchanges. If the target exchange status is ERROR, the source exchange status is still returned as DONE. This should be fixed for both sync and async use cases.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SM-1667) TransformBeanSupport does not correctly report errors for in-only exchanges

Posted by "Ron Gavlin (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/SM-1667?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=48569#action_48569 ] 

Ron Gavlin commented on SM-1667:
--------------------------------

Hi Gianfranco,

Although not in the spec, I do believe section 2.5.5 of the "JBI Components Theory" document https://open-esb.dev.java.net/public/pdf/JBI-Components-Theory.pdf validates the existing of an ERROR status for every MEP, including "in-only". While you could make the argument that the in-only MEP should be fire-and-forget and that the robust-in-only MEP be stateful, I think there is much value in handling errors consistently for sync/async uses as well as for all MEPs. JBI is already complex. Handling errors differently for sync/async and for different MEPs would only make the situation worse IMHO.

/Ron

> TransformBeanSupport does not correctly report errors for in-only exchanges
> ---------------------------------------------------------------------------
>
>                 Key: SM-1667
>                 URL: https://issues.apache.org/activemq/browse/SM-1667
>             Project: ServiceMix
>          Issue Type: Bug
>          Components: servicemix-bean
>    Affects Versions: servicemix-bean-2008.01
>            Reporter: Ron Gavlin
>            Assignee: Guillaume Nodet
>            Priority: Critical
>             Fix For: servicemix-bean-2008.02, 3.2.4
>
>         Attachments: sm-1667-inout-regression.patch
>
>
> The smx-bean TransformBeanSupport class does not correctly report errors for in-only exchanges. If the target exchange status is ERROR, the source exchange status is still returned as DONE. This should be fixed for both sync and async use cases.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SM-1667) TransformBeanSupport does not correctly report errors for in-only exchanges

Posted by "Ron Gavlin (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/SM-1667?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=48158#action_48158 ] 

Ron Gavlin commented on SM-1667:
--------------------------------

Hi Andrea,

Thanks for the proposed patch which can be found at: http://www.nabble.com/SM-Bean---CXF-BC-Problem-DONE-Not-managed-Correctly%21%21%21%21-tp20975364p20975364.html

/Ron

> TransformBeanSupport does not correctly report errors for in-only exchanges
> ---------------------------------------------------------------------------
>
>                 Key: SM-1667
>                 URL: https://issues.apache.org/activemq/browse/SM-1667
>             Project: ServiceMix
>          Issue Type: Bug
>          Components: servicemix-bean
>    Affects Versions: servicemix-bean-2008.01
>            Reporter: Ron Gavlin
>            Assignee: Guillaume Nodet
>            Priority: Critical
>             Fix For: servicemix-bean-2008.02, 3.2.4
>
>
> The smx-bean TransformBeanSupport class does not correctly report errors for in-only exchanges. If the target exchange status is ERROR, the source exchange status is still returned as DONE. This should be fixed for both sync and async use cases.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (SMXCOMP-10) TransformBeanSupport does not correctly report errors for in-only exchanges

Posted by "Lars Heinemann (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/SMXCOMP-10?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Lars Heinemann updated SMXCOMP-10:
----------------------------------

    Fix Version/s:     (was: servicemix-bean-2009.01)
                   servicemix-bean-2009.02

> TransformBeanSupport does not correctly report errors for in-only exchanges
> ---------------------------------------------------------------------------
>
>                 Key: SMXCOMP-10
>                 URL: https://issues.apache.org/activemq/browse/SMXCOMP-10
>             Project: ServiceMix Components
>          Issue Type: Bug
>          Components: servicemix-bean
>    Affects Versions: 3.2.3, servicemix-bean-2008.01
>            Reporter: Ron Gavlin
>            Assignee: Guillaume Nodet
>            Priority: Critical
>             Fix For: 3.2.4, servicemix-bean-2009.02
>
>         Attachments: sm-1667-inout-regression.patch
>
>
> The smx-bean TransformBeanSupport class does not correctly report errors for in-only exchanges. If the target exchange status is ERROR, the source exchange status is still returned as DONE. This should be fixed for both sync and async use cases.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SM-1667) TransformBeanSupport does not correctly report errors for in-only exchanges

Posted by "Guillaume Nodet (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/SM-1667?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=48589#action_48589 ] 

Guillaume Nodet commented on SM-1667:
-------------------------------------

ServiceMix 4 allows to use transactions with asynchronous sends to allow better scalability.  This is not the case in ServiceMix 3, and it did make things a lot more complicated, because the transactions semantics were different if you were using send or sendSync.   Also, components may use sendSync even if the exchange is not transacted (this was the case for the file poller until recently and also for cxf bc).
So I really don't think what you suggest is the right approach.
Each component should be able to use either send or sendSync without knowing if the previous or next component also use send or sendSync, which means the behavior has to be the same in both cases, else components would quickly become unable to work together.

I think your use case shows up because you want to "intercept" the error and retry the exchange, but I do think that in such cases, you really need to intercept the exchange and not let it be propagated back to the consumer endpoint.  If the consumer has anything to do when the exchange comes back, it will be totally screwed up, because this processing will actually occur before the remaining of the flow is fully processed.  Also, if I reuse the file poller example, your retry strategy may only retry for a limited number of times, and if it still fails, propagate the error back to the consumer.  

I guess the problem you hit is that ServiceMix 3 exchange listeners do not really allow to "pause" the exchange and not deliver it to the consumer immediately.  However, this could be done using a custom flow wrapping one of the existing flow.

In your example using a bpel process, i don't really see the point.  If the bpel process sends an InOnly exchange, using your retry strategy, the bpel process would always receive a DONE status and no error could be thrown inside the process, so no compensation at all.  Components have to be able to make the difference between a sucess and a failure for a given exchange.

Anyway, I'm a bit lost in what you are suggesting ? Are you suggesting that when using an InOnly mep sent asychronously, there should be no DONE nor ERROR status at all ?  This would really be against the spec and would lead to the impossibility of using streams to transfer large amounts of data for example.



> TransformBeanSupport does not correctly report errors for in-only exchanges
> ---------------------------------------------------------------------------
>
>                 Key: SM-1667
>                 URL: https://issues.apache.org/activemq/browse/SM-1667
>             Project: ServiceMix
>          Issue Type: Bug
>          Components: servicemix-bean
>    Affects Versions: servicemix-bean-2008.01
>            Reporter: Ron Gavlin
>            Assignee: Guillaume Nodet
>            Priority: Critical
>             Fix For: servicemix-bean-2008.02, 3.2.4
>
>         Attachments: sm-1667-inout-regression.patch
>
>
> The smx-bean TransformBeanSupport class does not correctly report errors for in-only exchanges. If the target exchange status is ERROR, the source exchange status is still returned as DONE. This should be fixed for both sync and async use cases.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SM-1667) TransformBeanSupport does not correctly report errors for in-only exchanges

Posted by "Ron Gavlin (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/SM-1667?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=48534#action_48534 ] 

Ron Gavlin commented on SM-1667:
--------------------------------

Unfortunately, most of the JBI component unit tests only test synchronous usage. I have been testing and opening issues against numerous components that either: 

1. did not support async processing at all 

2. only partially supported async processing but didn't handle errors/faults correctly

3. did not support the robust-in-only MEP

A few that come to mind are smx-eip, smx-bean, smx-camel, smx-drools, smx-jms, smx-http, and smx-cxf-bc. 

With the exception of SM-1757, all my outstanding issues with async support are now resolved. I believe most of the components that support async processing use the exchange StoreFactory/Store interfaces to do so. Of course async support is not relevant for components that support only in-out MEPs.

>From my perspective, sync vs. async is a tradeoff. Sync consumes lots of threads and small amounts of memory while async consumes few threads and lots of memory managing state. With 64-bit JVMs and cheap memory, the scalability provided by async processing is attractive.

/Ron

> TransformBeanSupport does not correctly report errors for in-only exchanges
> ---------------------------------------------------------------------------
>
>                 Key: SM-1667
>                 URL: https://issues.apache.org/activemq/browse/SM-1667
>             Project: ServiceMix
>          Issue Type: Bug
>          Components: servicemix-bean
>    Affects Versions: servicemix-bean-2008.01
>            Reporter: Ron Gavlin
>            Assignee: Guillaume Nodet
>            Priority: Critical
>             Fix For: servicemix-bean-2008.02, 3.2.4
>
>         Attachments: sm-1667-inout-regression.patch
>
>
> The smx-bean TransformBeanSupport class does not correctly report errors for in-only exchanges. If the target exchange status is ERROR, the source exchange status is still returned as DONE. This should be fixed for both sync and async use cases.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (SMXCOMP-10) TransformBeanSupport does not correctly report errors for in-only exchanges

Posted by "Jean-Baptiste Onofré (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/SMXCOMP-10?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jean-Baptiste Onofré updated SMXCOMP-10:
----------------------------------------

    Fix Version/s:     (was: servicemix-bean-2010.01)
                   servicemix-bean-2010.02

> TransformBeanSupport does not correctly report errors for in-only exchanges
> ---------------------------------------------------------------------------
>
>                 Key: SMXCOMP-10
>                 URL: https://issues.apache.org/activemq/browse/SMXCOMP-10
>             Project: ServiceMix Components
>          Issue Type: Bug
>          Components: servicemix-bean
>    Affects Versions: 3.2.3, servicemix-bean-2008.01
>            Reporter: Ron Gavlin
>            Assignee: Guillaume Nodet
>            Priority: Critical
>             Fix For: 3.2.4, servicemix-bean-2010.02
>
>         Attachments: sm-1667-inout-regression.patch
>
>
> The smx-bean TransformBeanSupport class does not correctly report errors for in-only exchanges. If the target exchange status is ERROR, the source exchange status is still returned as DONE. This should be fixed for both sync and async use cases.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (SM-1667) TransformBeanSupport does not correctly report errors for in-only exchanges

Posted by "Guillaume Nodet (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/SM-1667?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Guillaume Nodet resolved SM-1667.
---------------------------------

         Assignee: Guillaume Nodet
    Fix Version/s: servicemix-bean-2008.02
       Resolution: Fixed

Sending        src/main/java/org/apache/servicemix/bean/support/TransformBeanSupport.java
Adding         src/test/java/org/apache/servicemix/bean/TransformBeanSupportTest.java
Transmitting file data ..
Committed revision 709820.

> TransformBeanSupport does not correctly report errors for in-only exchanges
> ---------------------------------------------------------------------------
>
>                 Key: SM-1667
>                 URL: https://issues.apache.org/activemq/browse/SM-1667
>             Project: ServiceMix
>          Issue Type: Bug
>          Components: servicemix-bean
>    Affects Versions: servicemix-bean-2008.01
>            Reporter: Ron Gavlin
>            Assignee: Guillaume Nodet
>            Priority: Critical
>             Fix For: servicemix-bean-2008.02
>
>
> The smx-bean TransformBeanSupport class does not correctly report errors for in-only exchanges. If the target exchange status is ERROR, the source exchange status is still returned as DONE. This should be fixed for both sync and async use cases.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SM-1667) TransformBeanSupport does not correctly report errors for in-only exchanges

Posted by "Guillaume Nodet (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/SM-1667?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=48597#action_48597 ] 

Guillaume Nodet commented on SM-1667:
-------------------------------------

I now clearly see your point.  But imho, you are mixing the MEP with the sync / sendSync, which is also related to mixing faults with errors.
Let's clearly state again: using sendSync or send should not change the semantic of the exchange.  The semantic of the exchange is defined by its MEP.

So now, back to your example.  Let's say we have an external client which sends a request on some protocol and does not expect a fault to come back.  This does not necesseraly mean it won't have any error status reported back: I don't know any protocol that can not fail at some point: an HTTP server can be down, a JMS broker can be down, a database can be down a hard drive can be full or with incorrect permissions.  So even if we were not using an ESB, the underlying protocol can still fail at some point.
Anyway, if the client does not expect any response, this means the BC will create an InOnly exchange.  It's up to the BC to inform the client that the request has been accepted or not (if it makes sense at all, for example if we were using HTTP).  If the client expects a response, an InOut exchange will be created.

Now, when the InOnly request is received by the BC, it has the choice of using sendSync or send to send the JBI exchange.  I guess if you say the client can be blocked, you're kinda implying HTTP, because file, jms or email are pure asynchonous protocols.  The BC does not necesseraly have to wait for the exchange to come back to send the HTTP status back to the consumer.  It could even just read the request, send the HTTP response, and only send the JBI exchange after that, though this is now has the servicemix-http component is implemented.  In both cases, it could use either send or sendSync and the behavior should be the same.

So I don't really think this is a matter of using send / sendSync in the NMR, it's more a problem of the BC and its protocol.

I already have the need to implement an InOnly http request, where the exchange needs to be reliably processed.  The best way atm is to put a pair of JMS endpoints (provider / consumer) just after the HTTP endpoint.  When an HTTP request is received, an InOnly exchange is created and sent to the jms provider.  As soon as the JMS provider has sent the JMS message, the DONE / ERROR status is sent back to the HTTP consumer which sends a 202 / 500 http status code.  The client knows if the request has been accepted very soon without waiting for the request to be fully processed.  However, it also knows if the request has been rejected for some reason.  At a later time, the JMS consumer will consume the JMS message and the request will be processed.  At this point, the JMS layer will also provide redelivery if the processing failed.

Now, let's say we are already inside the bus.  An endpoint receives an InOnly exchange, creates a new InOnly exchange, maybe doing some small transformation of the message and send it. If it does not want to want the DONE/ERROR status to come back before sending the DONE status for the exchange it received, it is free to do so.  However, it needs to make sure that the message does not contain any stream which could be closed by the endpoint that has send that exchange, before the next endpoint has processed the stream (if you use servicemix-http, you may have noticed that the http request input stream is directly set as the content of the exchange).  Anyway, the endpoint is free to send a DONE status before the new exchange has been processed.  This would lead to the error being completely lost if you don't have any enhanced retry strategy somewhere.

For example, the eip static recipient list supports both modes.  It receives an InOnly exchange and will send a copy of it to several recipients.  In asynchronous mode (which is the case unless the exchange is transacted, so forget about transaction), it will send all copies asynchronously then send a DONE status.  If the reportErrors flag is set, it will wait for all exchanges to come back to report any error on those or send the DONE status.

So, I think your suggestion would be a real pain in the case there is no retry strategy: all errors would quickly be lost and noone would have any way to know what really happens.  If I may also use your BPEL compensation example, compensations can be quite difficult to write and won't always be handled by a simple retry strategy.  
Let's say you have to complex processes.  The first one does some action, call the second process, and may need to compensate any problem if the second process failed.  The second process may also involve several steps.  With the retry strategy, you may want to retry a few times, and then ?  if you never propagate an error back, how would the process compensate the error ?  I think the retry strategy should act as an interceptor, retry a few times, and then send back the error.   The problem you stated with the client is kinda specific to servicemix-http, not to an error handling mechanism imho (and it should be possible to add a flag to change this behavior on the BC so that it would just read the request, send a 200 http response, then generate the exchange and sent it).

Not reporting back errors makes sense in the context of Spagic, where all exchanges are stored in a DB for audit, along with the retry strategy.  For plain servicemix, it would just mean that you loose all informations when an error occurs.






> TransformBeanSupport does not correctly report errors for in-only exchanges
> ---------------------------------------------------------------------------
>
>                 Key: SM-1667
>                 URL: https://issues.apache.org/activemq/browse/SM-1667
>             Project: ServiceMix
>          Issue Type: Bug
>          Components: servicemix-bean
>    Affects Versions: servicemix-bean-2008.01
>            Reporter: Ron Gavlin
>            Assignee: Guillaume Nodet
>            Priority: Critical
>             Fix For: servicemix-bean-2008.02, 3.2.4
>
>         Attachments: sm-1667-inout-regression.patch
>
>
> The smx-bean TransformBeanSupport class does not correctly report errors for in-only exchanges. If the target exchange status is ERROR, the source exchange status is still returned as DONE. This should be fixed for both sync and async use cases.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SM-1667) TransformBeanSupport does not correctly report errors for in-only exchanges

Posted by "Andrea Zoppello (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/SM-1667?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=48590#action_48590 ] 

Andrea Zoppello commented on SM-1667:
-------------------------------------

Hi Guillaume,

The news you're saying is quite interesting.

Despite all things, maybe it's my limitation, but i do not see a real utility to have a flow where you use a mixin of send and send sync.
and i don't real understand the meaning of handling a transactional context management  when using async send. Could you explain this with a real example??

My opinion is that in real use case you would have the following use case:

1) Synchnronous Execution, this mean for me that if i've a flow A->B->C where A is m starting binding component, if i use sync when
an external application will use that flow it wait until it receives either a) a Response b) a Status Code c) a Response. 
In that case each error must be propagated back to the client because i'm using sync and i'm expecting some type of response or status code.

2) ASynchnronous Execution, this mean that if i've the same  flow A->B->C if i use an async model i don't want the client be pending until execution of B and C, so it cannot handle a transactional context. In that case i'm figuring propagating back the error is not correct for me.

In Async case the approach of "handling a fault" in some way without propagating back, but handling with a restart or a specific handler is quite useful.

My reference to BPEL was not referring using the BPEL service engine inside servicemix, but to make an example because BPEL with compensation handler, and error handler construct are in my opinion the only right way to handle faults in SOA projects.

BTW my suggesttion is to have this way:

When a consumer receive back an error for an exchange, if the orginal exchange was sent using send it should be propagated back
otherwise no, that's my proposal and not to propagate back always, in that case the error must be handled in other ways but must not be propagate back.

Andrea



> TransformBeanSupport does not correctly report errors for in-only exchanges
> ---------------------------------------------------------------------------
>
>                 Key: SM-1667
>                 URL: https://issues.apache.org/activemq/browse/SM-1667
>             Project: ServiceMix
>          Issue Type: Bug
>          Components: servicemix-bean
>    Affects Versions: servicemix-bean-2008.01
>            Reporter: Ron Gavlin
>            Assignee: Guillaume Nodet
>            Priority: Critical
>             Fix For: servicemix-bean-2008.02, 3.2.4
>
>         Attachments: sm-1667-inout-regression.patch
>
>
> The smx-bean TransformBeanSupport class does not correctly report errors for in-only exchanges. If the target exchange status is ERROR, the source exchange status is still returned as DONE. This should be fixed for both sync and async use cases.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SM-1667) TransformBeanSupport does not correctly report errors for in-only exchanges

Posted by "Ron Gavlin (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/SM-1667?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=48557#action_48557 ] 

Ron Gavlin commented on SM-1667:
--------------------------------

Hi Gianfranco,

Please re-close this JIRA if your review of the spec concurs that this patch implements the appropriate, spec-compliant behavior.

Thanks,

/Ron

> TransformBeanSupport does not correctly report errors for in-only exchanges
> ---------------------------------------------------------------------------
>
>                 Key: SM-1667
>                 URL: https://issues.apache.org/activemq/browse/SM-1667
>             Project: ServiceMix
>          Issue Type: Bug
>          Components: servicemix-bean
>    Affects Versions: servicemix-bean-2008.01
>            Reporter: Ron Gavlin
>            Assignee: Guillaume Nodet
>            Priority: Critical
>             Fix For: servicemix-bean-2008.02, 3.2.4
>
>         Attachments: sm-1667-inout-regression.patch
>
>
> The smx-bean TransformBeanSupport class does not correctly report errors for in-only exchanges. If the target exchange status is ERROR, the source exchange status is still returned as DONE. This should be fixed for both sync and async use cases.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SM-1667) TransformBeanSupport does not correctly report errors for in-only exchanges

Posted by "Andrea Zoppello (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/SM-1667?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=48584#action_48584 ] 

Andrea Zoppello commented on SM-1667:
-------------------------------------

Guillaume,

Basically what we do is to save all exchanges and for the ones that has the error status we basically provide
a restart feature that let you to resend the exchange that produce the error.

In that way when you've an error ( if it's recoverable ) you could try resend the exchange through the esb, from the point
where it was faulted.


Ron and Guillaume,

I agree that the error status must be sent back to consumer endpoint.
But let me to explain, if you've an sa like the following one:

A->B->C ( suppose you've all InOnly MEP )

and the error is in the InOnly MEP between B and C i agree the error must come back to B but i don't agree
that it's propagated back to A, because in async use case the InOnly MEP between A and B is correct.


What happen at the moment is that the exchange is propagated back returning to B and then to A.
In my opinion i repeat myself this is right for sync but not for async use case.

In that case we're providing a feature that let you to resend the exchange faulted from B to C.
Hope this help.

Andrea




> TransformBeanSupport does not correctly report errors for in-only exchanges
> ---------------------------------------------------------------------------
>
>                 Key: SM-1667
>                 URL: https://issues.apache.org/activemq/browse/SM-1667
>             Project: ServiceMix
>          Issue Type: Bug
>          Components: servicemix-bean
>    Affects Versions: servicemix-bean-2008.01
>            Reporter: Ron Gavlin
>            Assignee: Guillaume Nodet
>            Priority: Critical
>             Fix For: servicemix-bean-2008.02, 3.2.4
>
>         Attachments: sm-1667-inout-regression.patch
>
>
> The smx-bean TransformBeanSupport class does not correctly report errors for in-only exchanges. If the target exchange status is ERROR, the source exchange status is still returned as DONE. This should be fixed for both sync and async use cases.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.