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

On 9 Sep 2013, at 09:44, gian.maria.romanato@xxxxxxxxxxxx wrote:

> 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.

Excellent, thanks for the contribution - I'll try to review your changes this week so they can be part of the upcoming release.

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.

The extender bundle currently has no test coverage, that's another area which could do with some attention :)

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.

No worries, glad to help.

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.
_______________________________________________
sisu-users mailing list
sisu-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/sisu-users


Back to the top