On Jul 10, 2009, at 6:53 PM, Thomas Mortagne wrote:

> On Fri, Jul 10, 2009 at 17:43, Vincent Massol<[email protected]>  
> wrote:
>>
>> On Jul 7, 2009, at 3:51 PM, Thomas Mortagne wrote:
>>
>>> H devs,
>>>
>>> To implements wiki macros Adiri need componenet manager to support  
>>> two
>>> new things:
>>> - unregister a component descriptor: when a wiki macro is removed  
>>> and
>>> does not exists anymore it you not be listed in components. This  
>>> will
>>> be also needed for application manager to be able to uninstall
>>> application containing components.
>>
>> +1
>>
>>> - register component instance: wiki macro are based on WikiMacro
>>> implementation of Macro component interface but with different datas
>>> depending of the macro, to register this kind of macro as  
>>> component we
>>> need to be able to directly register the instance to use and not let
>>> the component manager do the instantiation form the descriptor since
>>> we cant add custom datas in component descriptor
>>
>> This already exists.
>
> It exists only internally in embeddedCM, since it's not in the
> ComponentManager API it does not exist.

ah right, I had forgotten I had only added it to the ECM. There are  
some problems related to this though:
- once you register an instance you don't have a component descriptor  
for it so if you have code listening to component descriptor  
registration they won't be called. Also if you have code using  
getComponentDescriptor it may not work fine. Thus we'd need to  
probably create some sort of component descriptor (maybe without  
dependencies?). Or we'd need to change the signature to force the user  
to pass a component decriptor?

There may be other problems I haven't thought about.

Also this means we won't be able to use Plexus anymore at all and  
we'll need to remove it from our SVN since it's not possible to  
implement this feature with plexus (unless we patch it). It's fine  
with me since Guice supports this. However we'd need to verify how  
it's done in other CM systems too maybe (do they register a component  
descriptor automatically?)

Thanks
-Vincent
_______________________________________________
devs mailing list
[email protected]
http://lists.xwiki.org/mailman/listinfo/devs

Reply via email to