[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [equinox-dev] bug or not

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);

If they are getting/ungetting the service each time they are interacting with the service then the usecount for the service goes to zero for each usage which then causes the framework to free the service instance object.  The should be using something like a ServiceTracker to avoid this kind of anti-pattern.

Tom



Inactive hide details for Raymond Auge ---04/28/2014 04:26:50 PM---I agree that I should NOT have to implement this code. HowevRaymond Auge ---04/28/2014 04:26:50 PM---I agree that I should NOT have to implement this code. However, I'm having to do so in order to work

From: Raymond Auge <raymond.auge@xxxxxxxxxxx>
To: Equinox development mailing list <equinox-dev@xxxxxxxxxxx>
Date: 04/28/2014 04:26 PM
Subject: Re: [equinox-dev] bug or not
Sent by: equinox-dev-bounces@xxxxxxxxxxx





I agree that I should NOT have to implement this code. However, I'm having to do so in order to work around this apparent issue.

- Ray


On Mon, Apr 28, 2014 at 5:23 PM, Raymond Auge <raymond.auge@xxxxxxxxxxx> wrote:



--
Raymond Augé (@rotty3000)
Senior Software Architect
Liferay, Inc. (@Liferay)
_______________________________________________
equinox-dev mailing list
equinox-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/equinox-dev

GIF image