Hi,
thanks a lot for your mails. And i agree. It was not a good idea ;)
Sepcially adding a method to the context for DS was really bad.
Thanks a lot for clearing things up.
best, Florian
Am 19.03.15 um 18:06 schrieb Peter Kriens:
So you want to use DS functionality without DS?
Isn't that an archetypical example of eating your cake and having it
too? :-)
Kind regards,
Peter Kriens
On 18 mrt. 2015, at 18:50, Florian Pirchner
<[email protected] <mailto:[email protected]>> wrote:
Hey,
i got an idea for a nice DS enhancement. I am using DS a lot. And
sometimes google.Guice too. And indeed there are some usecases where
these features can be combined.
Using DS i sometimes a miss a method, that injects (wires) all
references according the component definition xml for classes
instantiated by "new".
Like this:
/class Service {/
/
/
/ @Reference(...)/
/ protected void bindTransactionManager(TransactionManager tm) {/
/ ...../
/ }/
/}/
A different piece of code:
/Service s = new Service();/
/bundleContext.injectMembers(s);/
The call #injectMembers(s) will use the component definition (there
is generated xml file based on the annotations of Service.java) to
wire up all references for the given instance.
Usecase:
There are usecases where you can not use DS. And for these ones a
possibility to inject required services based on the component
definition would be great.
Are there any plans for such a specification change?
Thanks
Florian
--
Florian Pirchner
Lunifera GmbH
Marchfelder Straße 2
2301 Groß Enzersdorf
Austria
_______________________________________________
OSGi Developer Mail List
[email protected] <mailto:[email protected]>
https://mail.osgi.org/mailman/listinfo/osgi-dev
_______________________________________________
OSGi Developer Mail List
[email protected]
https://mail.osgi.org/mailman/listinfo/osgi-dev
--
Mit besten Grüßen
Florian Pirchner
Lunifera GmbH
Marchfelderstraße 2
A-2301 Groß Enzersdorf
_______________________________________________
OSGi Developer Mail List
[email protected]
https://mail.osgi.org/mailman/listinfo/osgi-dev