OxalisCommunity / oxalis

Oxalis - PEPPOL Access Point open source implementation - Core component
Other
119 stars 89 forks source link

Allow statistics service to be loaded from plugin directory #639

Open WimMaerevoet-Octopus opened 8 months ago

WimMaerevoet-Octopus commented 8 months ago

Pull Request Description

Allow a clean separation between oxalis and statistics implementation using the already available plugin loading mechanism.

Type of Pull Request

Type of Change

Pull Request Checklist:

dladlk commented 8 months ago

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

dladlk commented 8 months ago

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

WimMaerevoet-Octopus commented 8 months ago

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.

dladlk commented 8 months ago

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