OxalisCommunity / oxalis

Oxalis - PEPPOL Access Point open source implementation - Core component
Other
124 stars 90 forks source link

Multiple OxalisOutbound Instances #465

Closed HarshaSuranjith closed 3 years ago

HarshaSuranjith commented 4 years ago

How can I instantiate multiple OxalisOutbound modules with different configureations ?

For example

OxalisOutboundModule outbound1 = new OxalisOutboundModule(config1);
OxalisOutboundModule outbound2 = new OxalisOutboundModule(config2);

(oversimplified example just to elaborate what I want to achieve)
artjomsk commented 4 years ago

We've done something similar, however it's wasn't very easy.

Probably, you should implement own HomeDetector to support multiple "oxalis homes". Next, you need to initiate (ex. GuiceModuleLoader.initiate) and store somewhere all Guice modules and injector of each config.

So, basically kind of Map with alias of "oxalis home" mapped to all modules (including OxalisOutboundModule you're interested in).