felix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Jencks <david_jen...@yahoo.com>
Subject [DS] Various factory component issues, and progress on RFC 190
Date Mon, 19 May 2014 20:57:29 GMT

I've been working on implementing the proposed rfc 190 changes to DS in felix scr.  I've committed
some work and have most of the DTO and multiple pid support implemented locally.  The major
bits I haven't started on yet are configuration through annotations and scope support (for
exposed services and for references).  I don't expect either of these to be particularly difficult,
but then I haven't started.

There are some difficulties with factory components and DTO/mutliple pid support.  In terms
of the spec, DTO and factory components don't work well together, see bug 2683 (I'm not sure
how visible this is to non-osgi-members).  In Felix,

1. I think we should not support the obsolete factory configuration >> newInstance-like
behavior on namespace 1.3+ components.  We shouldn't have supported it after namespace 1.0,
but we should stop now for sure. Trying to support this with multiple pids is just too weird.

2. Because of how I implemented multiple pid support for normal components, I think it would
be easy to Implement factory config > multiple instances of the ComponentFactory service.
 I believe this behavior was requested by Pierre de Rop.  There's an additional problem if
you do this that you can't distinguish the ComponentFactory services registered from the multiple
factory configurations.  To solve this I propose that configuration properties prefixed with
"org.apache.felix.scr.factory." (exact string up for discussion) be added to the ComponentFactory
service properties.  Of course all this would have to be enabled by an flag in the xml such
as felix:factoryComponentFactoryPID="true" (no good ideas on this one yet).

As a reminder, a few days ago I said I was about to remove the legacy configuration system
entirely in favor of the spec one based on DTOs since they are conceptually incompatible and
the existing one is fundamentally confused.  So far no response so it's going soon….


david jencks

View raw message