Hello,

I'm working on a (quite large) application, split in several modules, and I want to start managing inter-modules dependencies using Hivemind (sort of like Eclipse plugin extension mechanism). It seems like Hivemind configuration-point and service mechanism is exactly what I need (although I would need module lifecycle, but is not such important as I already have built a mechanism for that).

I want to add hivemind little by little, without major changes in the application - in other words, I need an on-the-fly migration, not a stop-and-change-everything one. The non-intrusiveness principle of Hivemind is great in this aspect.

However, here are the first issues I ran into:

1. I have something similar to services, implemented as singletons. I want to change those to hivemind services with singletons model, but this should be transparent for the rest of the application - i.e. if other parts of the code use this as a normal singleton, it should work. The problem is in telling Hivemind to get the service implementation using the singleton getter method (called getInstance). Hivemind seems to always want to instantiate the class itself using a constructor, or my constructor is private and must remain so. What I would need is a way to specify in <invoke-factory> to use the static method (getInstance) of the class to instantiate it instead of the constructor.

2. Same problem with configuration points: I have main configuration classes implemented as singletons, but there is no way in <rules> section to put on the stack an object created by a static method of a class instead of an object created using constructor.

3. A problem with <set-configuration>: the setter method is expected to receive a List object. This is correct for configuration points with 0..n cardinality, but there are some issues with configuration points with occurs=1. In the (future) service class, I already have a method setConfiguration(Configuration), which is called now by hand. If I want to make that class a service, and Configuration a configuration point, I would have to change the method signature setConfiguration(List), and the list would always have one element. But this will make the service class look quite ugly, and I think it's also against the non-intrusiveness principle of Hivemind.

These are all the (major) problems I ran into.
Could somebody tell me if there are Hivemind issues indeed, or if I am using Hivemind in the wrong way? And maybe there are some workarounds...

Thank you,
Catalin

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to