karaf-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christian Schneider <ch...@die-schneider.net>
Subject Re: git commit: KARAF-2762 Refactored CommandExporter and implemented removal on stop
Date Mon, 17 Feb 2014 14:24:29 GMT
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:

- 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

- 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 

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

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

Open Source Architect

View raw message