On 18/06/13 19:40, bytor99999 wrote:
> It is the morning, so maybe I am just really dense.
>
> But reading the doc, it still seems that the class that is loaded is still
> contained within a module and cannot be shared single instance across all
> modules in a Vert.x instance.
If you maintain your application context in a static member of a class
in a module, and you include that module in other modules then it will
indeed be the same application context instance which is seen by all
modules that include it.
>
> There is the one part about not finding it so use the platform classloader,
> which seems to be where you can load the ApplicationContext from. But where
> to put the Spring jars in that context?
The platform classloader is not relevant.
You would put the Spring jars in the lib directory of the spring module
that you're going to share
>
> "If classes or resources cannot be found by any of the module class loaders
> in the hierarchy the platform class loader (i.e. the class loader that
> Vert.x itself uses) will be asked."
>
> I guess from the command line you can add a classpath to point to the jars.
> Or is there a "lib" directory we can drop these in?
>
> And then in the main app class where you do container.deployVerticle() you
> can deploy the upcoming Spring module.
You don't need to deploy non runnable modules, you can include them
directly in other modules.