Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
None
-
None
-
Patch Available
Description
Hi
I encountered problems regarding message routing to the camel service engine and
back to the jbi NMR again. The information about the ("initial") called
operation on a endpoint is lost while communicating with camel.
IMHO there are three different strategies to solve this problem:
(thanks Guillaume pointing me to them )
- (1) DSL - API call within the RouteBuilder
It's currently not possible to do this because the JbiEndpoint doesn't have
methods to set the operation.
Sample:
— 8< —
String toUri = "jbi:endpoint:xxx";
Endpoint endpoint = getContext().getEndpoint(toUri);
if (endpoint instanceof JbiEndpoint)
{ JbiEndpoint jbiEndpoint = (JbiEndpoint) endpoint; //not possible jbiEndpoint.setOperation(operation); }
from(fromUri).to(toUri);
— 8< —
- (2) URI - Setting the operation within the endpoint URI.
This option specifies the operation within the given endpoint URI. It's clear
which operation should be called but you always have to define the operation
for a routing.
— 8< —
String toUri = "jbi:endpoint:xxx?operation=process";
from(fromUri).to(toUri);
— 8< —
- (3) Copying the information
This option copies the operation information from the "from-"Endpoint to the
"to-"Endpoint. This is a simple solution if you want to call the same
operation on all endpoints involved.
I think option 2 and 3 should be applied. Option 2 overrides option 3. If you
specify a direct operation information within your URI this one is used.
Kristian
ps: option 2 and 3 are available as patches within the attached file
Attachments
Attachments
Issue Links
- is depended upon by
-
SMXCOMP-341 camel component lost the property which was set in the JBI endpoint
- Resolved