Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[sisu-dev] Bundle fragment-based extension

There are a number of places that I'd like to extend or customize sisu, like hooking into the bean scanning [1] or add new default modules [2], but right now, there is no way to do that.  Spring DM uses a bundle fragment to allow you to add new XML files to the configuration to either add or override key behaviors, so I'm wondering if we could do the same thing here?

A couple ideas:
1. Turn the scanner on ourselves in a subpackage like sisu.extensions.  This would work as bundle fragment classes are treated as local bundle classes.
2. Have a custom XML or YAML file that describes how the fragment wants to plug in, for example:
   <sisu-extension>
     <default-module>org.company.MyDefaultModule</default-module>
     <scanner>org.company.MyBeanScanner</scanner>
   </sisu-extension>

I like #1 the most, as it keeps things Guice-like and partial bundle scanning would be useful elsewhere.

Don

[1] https://bugs.eclipse.org/bugs/show_bug.cgi?id=393213
[2] https://bugs.eclipse.org/bugs/show_bug.cgi?id=393214

Back to the top