Cannot get working Dynamic Endpoint in SM 4.0.0 container
---------------------------------------------------------

                 Key: SMX4-487
                 URL: https://issues.apache.org/activemq/browse/SMX4-487
             Project: ServiceMix 4
          Issue Type: Bug
          Components: Bundles
    Affects Versions: 4.0.0
         Environment: Windows NT, SM 4.0.0
            Reporter: Andrei Shakirin


Hi,

Test case: custom binding component calls 
getContext().resolveEndpointReference() by start ConsumerEndpoint and send 
messages to resolved endpoint
(based on udp:// protocol). The same binding component provides "udp" protocol 
in getEPRProtocols() and returns ProviderEndpoint in getResolvedEPR() method. 
ConsumerEndpoint is started using static sa and sends messages to provider 
using dynamic endpoint resolving.
Component works fine under ServiceMix 3.3.1.

Problem: I have a following problem with Dynamic Endpoints under SM 4.0.0:
getContext().resolveEndpointReference() in binding component returns 
ResolvedEndpoint object containing correct ServiceName 
({urn:servicemix:my}MyComponent)
If I try to set this endpoint into exchange and send message, following 
exception occures:
org.apache.servicemix.nmr.api.ServiceMixException: Could not dispatch exchange.
No matching endpoints.
        at org.apache.servicemix.nmr.core.FlowRegistryImpl.dispatch(FlowRegistry
Impl.java:110)

I see as a difference that resolveEndpointReference() returns 
org.apache.servicemix.jbi.servicedesc.DynamicEndpoint object under SM 3.3.1, 
but under SM 4.0.0 it returns org.apache.servicemix.common.ResolvedEndpoint 
object.
JUnit test with ServiceMixClient works fine and also resolves endpoint to  
DynamicEndpoint object.

Source code of binding component is attached.

Thanks,
Andrei.

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

Reply via email to