Re: OSGi Installer API

2010-08-24 Thread Bertrand Delacretaz
Hi,

On Mon, Aug 23, 2010 at 8:26 PM, Carsten Ziegeler  wrote:
> the current OSGi installer has three methods:

> ...I have the feeling that it would be
> nicer, if the client could submit several changes add once, so maybe
> instead of having a addResource and removeResource method, just a
> updateResources([] addedResources, [] removedResources).

Agreed, makes sense.
-Bertrand


OSGi Installer API

2010-08-23 Thread Carsten Ziegeler
Hi,

the current OSGi installer has three methods:
- registerResources : which is used to register all resources from the
installer client like jcr install; this is usually invoked on startup
- addResource : adds a resource during runtime
- removeResource : removes a resource during runtime

The api is simple, fine and sufficient. However there is a small glitch
here. If a client detects several changes at once, like a set of bundles
is removed or updated, it has to call addResource or removeResource for
each change separately. The OSGi installer could run a install cycle
inbetween those method calls. Causing a part of this process to be done
in the first cycle and the other part in the second cycle - now as OSGi
has a dynamic nature this isn't a problem after two cycles everything is
installed as expected. But still I have the feeling that it would be
nicer, if the client could submit several changes add once, so maybe
instead of having a addResource and removeResource method, just a
updateResources([] addedResources, [] removedResources).

WDYT?

Carsten
-- 
Carsten Ziegeler
cziege...@apache.org