Allow statistics service to be loaded from plugin directory
Pull Request Description
Allow a clean separation between oxalis and statistics implementation using the already available plugin loading mechanism.
Type of Pull Request
- [x] New feature/Enhancement - non-breaking change which adds functionality
- [ ] Bug fix
- [ ] Breaking change (Require Major version change?)
Type of Change
- [ ] OpenPeppol AS2/AS4 specification
- [ ] OpenPeppol Spring/Fall release
- [x] Oxalis software change or enhancement
- [ ] CEF change
Pull Request Checklist:
- [x] My code follows the style guidelines of this project
- [x] I have commented my code, particularly in hard-to-understand areas. But did not added unnecessary annotation/comment say @author name etc
- [x] I have checked my code for variable and method name and corrected grammar/spelling mistakes if any
- [ ] I have made corresponding changes to the documentation where needed
- [x] My changes generate no new/additional warnings
- [x] My change is not breaking or creating conflict with associated dependencies
- [x] I have performed a self-review of my own code
- [x] I ran
mvn clean installbefore commit and all tests run successfully - [x] I conducted basic QA to assure all features are working fine
- [x] My pull request generate no conflicts with
masterbranch - [x] I requested code review from other team members
Are you sure that you need this change in the core statistics of Oxalis? You could just create your own module class PluginStatisticsModule with this provider method and activate it via reference.conf like
oxalis.module.as4.pluginstatistics {
class=XXXXX.MyPluginStatisticsModule
}
pack it to jar and use in your Oxalis deployment classpath...
I've made a bunch of such modules during testing, you can take a look at the setup: https://github.com/OxalisCommunity/Oxalis-AS4/discussions/228
Yes, I know that is possible. But you need to copy the jar into the same folder as the rest of the oxalis jars. For deployment with a war, this is not so simple. I did this PR to have a nice separation between 'own plugin code' and oxalis code.
Do you suggest that EACH Oxalis component has such "-plugin" provider? Searching for "-plugin" in the source code I found nothing.
Isn't it too specific for your use case? For me it looks strange to have 2 different implementations distinguished by the "source" of the module... This new definition will be specific only for your module, which knows about existence of "statistics-plugin" named bean...