Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [sisu-users] Problem with the Sisu Extender


> I think what you're looking for is something like the old Sisu
> context utility class, which provided a quick way to get the active
> BeanLocator from Eclipse plug-ins:

>
> https://github.com/eclipse/sisu.inject/tree/master/leftovers


I'll use the bean locator wrapped in a utility class as you suggested in a previous email.
The above example is still very useful, because it shows how to implement the equivalent of the Injector.injectMembers() method using the BeanLocator.
The dynamic proxy over the Injector is a nice idea, but at the moment I prefer not to expose the additional Injector methods.

> Now that the extender has been separated from the core bundle it
> will be easier to add this back (and make it configurable).

>
> I'll extend the new tutorial to cover using Sisu in Eclipse plug-
> ins, and schedule a work-item to add back the context utility class
> because it avoids the need to know about Sisu internals.


I refactored a bit the Sisu Extender and Friday afternoon I pushed a proposed set of changes to gerrit for you to review them.
There are some open points to discuss.
I would have liked to adapt also the tests, or maybe write some new tests for the extender, but I could not find the test suite in the repositories.

To integrate Sisu in my OSGi application, I wrote a custom extender on top of the above changes, where BundleTracker observes BundleEvent.STARTING
so that I can use Sisu in activators. And since I am now instantiating the BeanLocator, it is now easy for me to use the right BeanLocator instance.
Everything is working as expected, thank you very much for the effort you put in helping me out.

BTW, now that the prototype is done, my next step will be integrating Sisu in the real application, which is an OSGi enterprise application running on Eclipse Virgo.

Thanks
GianMaria.




Back to the top