[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [equinox-dev] bug or not
|
Hey all,
I think I may have gotten a false positive on some tests because this week I can't reproduce it.
Seems you should test code again after a week off. Glad I didn't file a ticket.
Excuse the noise,
Ray
On Apr 28, 2014 9:07 PM, "Richard Hall" <
heavy@xxxxxxxxxxxxxx> wrote:
If you only meant for registering resources with the HttpService, then i can agree with that. :-)
-> richard
On Apr 28, 2014 8:59 PM, "Thomas Watson" <
tjwatson@xxxxxxxxxx> wrote:
But for the HttpService I consider this an anti-pattern. When a bundle's usecount reaches zero the HttpService implementation must unregister all resources registered by that bundle. If that is really what the webconsole bundle wants then that is fine and I agree with you. But if the webconsole has resources (servlets) it does not want unregisered then it better keep its usecount of the service (it is still using to serve resources) greater than zero.
Tom
"Richard S. Hall" ---04/28/2014 05:34:25 PM---On 4/28/14, 17:37 , Thomas Watson wrote: >
From: "Richard S. Hall" <heavy@xxxxxxxxxxxxxx>
To: Equinox development mailing list <equinox-dev@xxxxxxxxxxx>
Date: 04/28/2014 05:34 PM
Subject: Re: [equinox-dev] bug or not
Sent by: equinox-dev-bounces@xxxxxxxxxxx
On 4/28/14, 17:37 , Thomas Watson wrote:
Is your ServiceFactory.ungetService getting called each time? If so then it is likely the felix webconsole is using an anti pattern like this:
HttpService service = bc.getService(httpServiceRef);
/// do some work with http service
bc.ungetService(httpServiceRef);
Is this really an anti-pattern? It doesn't seem so to me. If so, why don't we just deprecate ungetService() and tell all bundle implementers to not worry about ungetting, since they framework will do it for you when the bundle stops?
The fact that ungetting and recreating may be costly is an issue for the service implementer, it would seem, not the service consumer. If it costs a lot to create instances, the service factory could consider doing caching of instances and reusing them on subsequent requests.
Having client bundles call ungetService when they are done with a service that they may not use again for a while seems reasonable to me.
-> richard
_______________________________________________
equinox-dev mailing list
equinox-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/equinox-dev
_______________________________________________
equinox-dev mailing list
equinox-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/equinox-dev
_______________________________________________
equinox-dev mailing list
equinox-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/equinox-dev
