You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@servicemix.apache.org by Fabrice Dewasmes <fa...@gmail.com> on 2006/10/06 14:58:24 UTC
http endpoint activation ordering
Hi,
when you use two http endpoints in the same service unit, you have no idea
of which one will be activated first. in the case of one endpoint proxying
another, if consumer is activated first, the WSDL is not correctly generated
as it relies on the proxied endpoint WSDL.
ordering of http endpoint can solve this. Another approach could be to make
the consumer endpoint wait for the targeted provider to be available and
then resume activation.
Thoughts ?
Fabrice
--
View this message in context: http://www.nabble.com/http-endpoint-activation-ordering-tf2395343.html#a6678712
Sent from the ServiceMix - Dev mailing list archive at Nabble.com.
Re: http endpoint activation ordering
Posted by Fabrice Dewasmes <fa...@gmail.com>.
Done. issue #SM-692.
I may have the time on next monday to make a patch.
Have a nice Week-end ;)
Fabrice
gnodet wrote:
>
> Endpoints order should be kept inside an SU.
> Could you raise a JIRA for that, it should be easy
> to fix by replacing the used map implementation by
> an ordered map.
>
> On 10/6/06, Fabrice Dewasmes <fa...@gmail.com> wrote:
>>
>> Hi,
>>
>> when you use two http endpoints in the same service unit, you have no
>> idea
>> of which one will be activated first. in the case of one endpoint
>> proxying
>> another, if consumer is activated first, the WSDL is not correctly
>> generated
>> as it relies on the proxied endpoint WSDL.
>>
>> ordering of http endpoint can solve this. Another approach could be to
>> make
>> the consumer endpoint wait for the targeted provider to be available and
>> then resume activation.
>>
>> Thoughts ?
>>
>> Fabrice
>> --
>> View this message in context:
>> http://www.nabble.com/http-endpoint-activation-ordering-tf2395343.html#a6678712
>> Sent from the ServiceMix - Dev mailing list archive at Nabble.com.
>>
>>
>
>
> --
> Cheers,
> Guillaume Nodet
>
>
--
View this message in context: http://www.nabble.com/http-endpoint-activation-ordering-tf2395343.html#a6696224
Sent from the ServiceMix - Dev mailing list archive at Nabble.com.
Re: http endpoint activation ordering
Posted by Fabrice Dewasmes <fa...@gmail.com>.
OK I will provide another patch tomorrow morning.
Thanks
Fabrice
gnodet wrote:
>
> But if we use a LinkedHashMap, the map keeps the
> order of keys as they were inserted:
> "This linked list defines the iteration ordering,
> which is normally the order in which keys were
> inserted into the map".
> So it should be safe to use this implementation.
> The map does not sort on key values like a TreeMap does.
>
> On 10/9/06, Fabrice Dewasmes <fa...@gmail.com> wrote:
>>
>>
>> gnodet wrote:
>> >
>> > Endpoints order should be kept inside an SU.
>> > Could you raise a JIRA for that, it should be easy
>> > to fix by replacing the used map implementation by
>> > an ordered map.
>> >
>>
>> In fact, endpoints are stored in a HashMap with keys generated by
>> EndpointSupport class and which are Strings that look like :
>> {namespace}servicename:endpointname
>>
>> using an ordered map won't solve anything as you've got no indication of
>> ordering except the natural order, and I don't know if we can safely
>> prefix
>> the key string with the order number or even use an object as a key as
>> the
>> string is used to build destination for routing.
>>
>> Fabrice
>>
>> --
>> View this message in context:
>> http://www.nabble.com/http-endpoint-activation-ordering-tf2395343.html#a6718919
>> Sent from the ServiceMix - Dev mailing list archive at Nabble.com.
>>
>>
>
>
> --
> Cheers,
> Guillaume Nodet
>
>
--
View this message in context: http://www.nabble.com/http-endpoint-activation-ordering-tf2395343.html#a6723223
Sent from the ServiceMix - Dev mailing list archive at Nabble.com.
Re: http endpoint activation ordering
Posted by Guillaume Nodet <gn...@gmail.com>.
But if we use a LinkedHashMap, the map keeps the
order of keys as they were inserted:
"This linked list defines the iteration ordering,
which is normally the order in which keys were
inserted into the map".
So it should be safe to use this implementation.
The map does not sort on key values like a TreeMap does.
On 10/9/06, Fabrice Dewasmes <fa...@gmail.com> wrote:
>
>
> gnodet wrote:
> >
> > Endpoints order should be kept inside an SU.
> > Could you raise a JIRA for that, it should be easy
> > to fix by replacing the used map implementation by
> > an ordered map.
> >
>
> In fact, endpoints are stored in a HashMap with keys generated by
> EndpointSupport class and which are Strings that look like :
> {namespace}servicename:endpointname
>
> using an ordered map won't solve anything as you've got no indication of
> ordering except the natural order, and I don't know if we can safely prefix
> the key string with the order number or even use an object as a key as the
> string is used to build destination for routing.
>
> Fabrice
>
> --
> View this message in context: http://www.nabble.com/http-endpoint-activation-ordering-tf2395343.html#a6718919
> Sent from the ServiceMix - Dev mailing list archive at Nabble.com.
>
>
--
Cheers,
Guillaume Nodet
Re: http endpoint activation ordering
Posted by Fabrice Dewasmes <fa...@gmail.com>.
gnodet wrote:
>
> Endpoints order should be kept inside an SU.
> Could you raise a JIRA for that, it should be easy
> to fix by replacing the used map implementation by
> an ordered map.
>
In fact, endpoints are stored in a HashMap with keys generated by
EndpointSupport class and which are Strings that look like :
{namespace}servicename:endpointname
using an ordered map won't solve anything as you've got no indication of
ordering except the natural order, and I don't know if we can safely prefix
the key string with the order number or even use an object as a key as the
string is used to build destination for routing.
Fabrice
--
View this message in context: http://www.nabble.com/http-endpoint-activation-ordering-tf2395343.html#a6718919
Sent from the ServiceMix - Dev mailing list archive at Nabble.com.
Re: http endpoint activation ordering
Posted by Guillaume Nodet <gn...@gmail.com>.
Endpoints order should be kept inside an SU.
Could you raise a JIRA for that, it should be easy
to fix by replacing the used map implementation by
an ordered map.
On 10/6/06, Fabrice Dewasmes <fa...@gmail.com> wrote:
>
> Hi,
>
> when you use two http endpoints in the same service unit, you have no idea
> of which one will be activated first. in the case of one endpoint proxying
> another, if consumer is activated first, the WSDL is not correctly generated
> as it relies on the proxied endpoint WSDL.
>
> ordering of http endpoint can solve this. Another approach could be to make
> the consumer endpoint wait for the targeted provider to be available and
> then resume activation.
>
> Thoughts ?
>
> Fabrice
> --
> View this message in context: http://www.nabble.com/http-endpoint-activation-ordering-tf2395343.html#a6678712
> Sent from the ServiceMix - Dev mailing list archive at Nabble.com.
>
>
--
Cheers,
Guillaume Nodet