Combining modules that use blossom puts some new requirements on how they collaborate to initialize the ApplicationContext.
- You should have only one root WebApplicationContext, so every module can't create its own.
- You should have <blossom:configuration /> only once in your application.
- Your xml files, both for application context and DispatcherServlet needs to have unique names. For instance two modules both using the name blossom-servlet.xml will collide/overlap.
Let one of your modules take the role of master module. It should load the root web application context. It should have the <blossom:configuration />. It can find xml files from other modules by scanning the classpath. Use a wildcard when setting configLocation. Another strategy could have modules registering their xml files in the repository where the master module would look for them.
Your other modules should depend on the master module to make sure its initialized first. They should not call BlossomModuleSupport.initRootWebApplicationContext(). They can however create BlossomDispatcherServlets.
To keep things clean and separated it can be a good idea to make a new module that serves as the master module.