Are you implementing this using the extender pattern? If so, I would not
use DS. I would use something lower level.

There are plenty of good alternatives for doing this, but I would suggest
looking at Apache Aries Component DSL [1] (it's what is used to implement
Aries JAXRS Whiteboard).

- Ray

[1] https://github.com/apache/aries/tree/trunk/component-dsl

On Sun, Feb 10, 2019 at 8:01 AM Thomas Driessen via osgi-dev <
osgi-dev@mail.osgi.org> wrote:

> Hi,
>
> I'm currently trying to sketch out a possible better OSGi integration for
> Vaadin 10+.
>
> For this I need to programmatically create DS components in order to
> make @Route/@RouteAlias annotated classes also DS components.
>
> Right now I'm doing this via ComponentFactory and the assumption that
> all @Route annotated classes are also annotated with
> @Component(factory="fully qualified class name")
>
> I don't think this is the best way to do this. Having to type the fqcn
> seems rather errorprone to me and therefore I wanted to ask if there is a
> better way (maybe even a typesafe way) to do this?
>
> The code instantiating a component can be seen here:
> https://github.com/Sandared/flow-osgi/blob/master/flow.osgi.integration/src/main/java/io/jatoms/flow/osgi/integration/FlowOsgiInstantiator.java
> The class that shall be instantiated can be seen here:
> https://github.com/Sandared/flow-osgi/blob/master/flow.osgi.simpleui/src/main/java/io/jatoms/flow/osgi/simpleui/MainView.java
>
> Any advice is highly appreciated.
>
> Kind regards,
> Thomas
> _______________________________________________
> OSGi Developer Mail List
> osgi-dev@mail.osgi.org
> https://mail.osgi.org/mailman/listinfo/osgi-dev



-- 
*Raymond Augé* <http://www.liferay.com/web/raymond.auge/profile>
 (@rotty3000)
Senior Software Architect *Liferay, Inc.* <http://www.liferay.com>
 (@Liferay)
Board Member & EEG Co-Chair, OSGi Alliance <http://osgi.org> (@OSGiAlliance)
_______________________________________________
OSGi Developer Mail List
osgi-dev@mail.osgi.org
https://mail.osgi.org/mailman/listinfo/osgi-dev

Reply via email to