Bug 1056740 - Failing operation selection in Camel bindings invokes single operation
Summary: Failing operation selection in Camel bindings invokes single operation
Keywords:
Status: NEW
Alias: None
Product: JBoss Fuse Service Works 6
Classification: JBoss
Component: SwitchYard
Version: 6.0.0
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ---
: ---
Assignee: Rob Cernich
QA Contact: Matej Melko
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-01-22 19:41 UTC by Tomas Rohovsky
Modified: 2023-05-15 19:53 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Operation selectors are used in combination with a service binding to help SwitchYard determine the target operation for a service invocation. When a service only has a single operation, an operation selector should not be used. If an operation selector is, however, used for a service with a single operation, failure to assign an operation in the selector will not result in an error. If an operation selector fails to assign an operation for a service with multiple operations, an error is reported.
Clone Of:
Environment:
Last Closed:
Type: Bug
Embargoed:


Attachments (Terms of Use)
reporducer (31.62 KB, application/zip)
2014-01-22 19:47 UTC, Tomas Rohovsky
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker SWITCHYARD-1941 0 Major Open Failing operation selection in Camel bindings invokes single operation 2015-07-30 09:09:26 UTC

Internal Links: 1204862

Description Tomas Rohovsky 2014-01-22 19:41:17 UTC
If an operation selector of camel binding fails in selection of operation and the service has only one operation then the operation is executed. It should not be executed.

Comment 1 Tomas Rohovsky 2014-01-22 19:47:18 UTC
Created attachment 854016 [details]
reporducer

1. run: mvn clean package -DskipTests jboss-as:deploy exec:java -Pudp jboss-as:undeploy
2. write: hello
3. you can see in the server log: "SWITCHYARD034505: No node has been matched with the Regex expression 'greet' in the payload. It couldn't determine the operation", but you can also notice in message trace that the message was accepted. It should not be, since the regex selector is set to 'greet'.

Comment 2 Tomas Rohovsky 2014-01-22 20:00:11 UTC
If a service contains more operations (methods) then the behaviour does not occur.

Comment 3 Keith Babo 2014-01-22 21:00:24 UTC
This is sort of an odd case, as operation selectors are only used when there is more than one operation in a service interface. The purpose of an operation selector is to help the runtime assign an operation.  In the case where there's only a single operation, the runtime doesn't need help to assign an operation, so if the operation selector doesn't match the default operation resolution rules in the runtime are sufficient.

Long term, we should fail fast if the user decides to implement an operation selector and it doesn't match regardless of the number of operations.  For FSW 6.0, the answer is that operation selectors are not required for services with a single operation.

Comment 4 Keith Babo 2014-01-28 14:10:41 UTC
Proposed doc text:
Operation selectors are used in combination with a service binding to help SwitchYard determine the target operation for a service invocation.  When a service only has a single operation, an operation selector should not be used.  If an operation selector is used for a service with a single operation, failure to assign an operation in the operation selector will not result in an error.  If an operation selector fails to assign an operation for a service with multiple operations an error is reported.

Comment 5 Rob Cernich 2014-08-29 23:03:31 UTC
Can this be closed as a documentation issue?  Any change at this point would be a behavioral change in the runtime.

We could add validation to the tooling to generate a warning for cases where an operation is specified, when only one operation is defined on the service interface.

Comment 6 Rob Cernich 2014-10-21 17:15:47 UTC
Hey Kevin, I propose rejecting this issue, or deferring to 7.0.

Comment 7 kconner 2015-02-11 00:30:54 UTC
nacking this for 6.2 as per Rob's comments


Note You need to log in before you can comment on or make changes to this bug.