I have an implicit scaldi Module in my root package object so that any component can use the injector implicitly.
This module looks like this:
val additionalModule = new AtomicReference[Module](new Module {})
lazy val applicationModule = additionalModule.get ++ new Module {
bind[Trait1] to new Impl1
bind[Trait2] to new Impl2
}
The Scaldi documentation says it is not recommended to bind on an already initialised module so I added the additionalModule for testing/module reuse purposes and aggregated it with the predefined one. Did I get it right?