Re: DependencyManager: Removing component before bundle is started doesn't work

2016-05-28 Thread Pierre De Rop
Good to know it works :-) I just created FELIX-5268 which describes the issue, and added a test case. Thanks for having reported this problem. cheers /Pierre On Thu, May 26, 2016 at 3:55 PM, Bram Pouwelse wrote: > Pierre,

Re: DependencyManager: Removing component before bundle is started doesn't work

2016-05-26 Thread Pierre De Rop
Bram, Can you svn update the trunk, and give it a try ? I fixed the following: when a component is being removed, its service was not unregistered if the bundle state was STARTING ! Can you confirm it works now with the trunk ? I wait for your confirmation, then I will make a jira issue and the

Re: DependencyManager: Removing component before bundle is started doesn't work

2016-05-26 Thread Bram Pouwelse
Thanks! Maybe good to mention that I have a workaround for the issue, by adding a bundle dependency [1] to the component that creates and removes these services everything works ok. Regards, Bram 1: createBundleDependency().setBundle(context

Re: DependencyManager: Removing component before bundle is started doesn't work

2016-05-26 Thread Pierre De Rop
ok Bram; I will try to reproduce this issue with a test case. (I'm off this morning, will do it this afternoon). cheers; /Pierre On Thu, May 26, 2016 at 8:58 AM, Bram Pouwelse wrote: > I use an Activator and create a component with service dependencies, when > services are

Re: DependencyManager: Removing component before bundle is started doesn't work

2016-05-26 Thread Bram Pouwelse
I use an Activator and create a component with service dependencies, when services are added / removed the component will add / remove additional components. This all works but if a component is removed before the BundleActivator#start method has completed the service will stick around in the

Re: DependencyManager: Removing component before bundle is started doesn't work

2016-05-26 Thread Pierre De Rop
but the Activator is invoked only when the bundle is started. I'm not sure I understand ? Are you invoking the Activator.init method from another bundle, like an extender bundle which would track all install/resolve bundles and would instantiate an Activator from a not started bundle and invoke it

Re: DependencyManager: Removing component before bundle is started doesn't work

2016-05-26 Thread Bram Pouwelse
Hi Pierre, Thanks for the quick reply. I should've been a bit more clear in my message, the problem is when you remove a component before the bundle is started (that's why I used the Activator to demonstrate the issue). Once the test you've created runs the bundle is already started and all works

Re: DependencyManager: Removing component before bundle is started doesn't work

2016-05-26 Thread Pierre De Rop
Hi Bram, The service should be removed from the service registry when you remove the Component from DependencyManager. Now, I tried to reproduce the issue you are describing in [1], but I could not (the test is OK). Can you please take a look at it in order to see if it the same kind of scenario

DependencyManager: Removing component before bundle is started doesn't work

2016-05-25 Thread Bram Pouwelse
Hi, I have an issue with a bundle that removes a DM component before the bundle is started. If that happens the service remains available in the service registry. I could reproduce this using a simple activator (which doesn't make any sense but works to demonstrate the issue). public class