I just discussed with Guillaume about the whitebaord approach and the dsl approach in private chat. We agreed that both approaches are not ideal and that we will do some more experimentation and discussion before really putting a solution into broader usage in karaf.

I will try to recapitulate the major points about my whiteboard solution:

Pro:
- The user only uses the Action interface and our annotations. So he has minimal compile time dependencies - The injection of beans or services into actions is done by the user injection framework. So the solution is compatible to nearly any injection framework

Con:
- The Action object is exposed as an OSGi service in a way that is not common in OSGi. Normally in OSGi you expect to only use a service over its API (interface). The action object is used as a template which has to be copied into a new instance and later be filled with the actual command attributes from the session. Normally this kind of access should be done on the other side of the service boundary.

The DSL approach on the other hand kind of has the Pros and Cons just switched. So we will try to find a solution that keeps the pros and avoids the main cons.

I agreed with Guillaume that my code can stay in the separate module where it is located for now but should not be integrated more into karaf at the moment.

Best regards
Christian

On 17.02.2014 14:18, Guillaume Nodet wrote:
-1
I think it's a really bad idea to have the user expose services in OSGI
which are not supposed to be used and not thread safe by design.
Please revert and let's continue the discussion on the dev mailing list.


--
Christian Schneider
http://www.liquid-reality.de

Open Source Architect
http://www.talend.com

Reply via email to