wolfhead
Nov 7th, 2006, 04:51 AM
hi there,
i've got an applicationContext which handles the main logic of my web application. there are several modules all in separate packages and all with their own context files.
now i want to load these contextfiles from the modules and make them accessible to the main application context.
the modules all share the same interface and i want to load them by a manager from the main context with:
appContext.getBeansOfType(IModuleServer.class);
the manager gets the applicationContext with the interface ApplicationContextAware.
so i thought i could load the module contexts this way:
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>
/WEB-INF/applicationContext.xml
classpath:de/bmw/grand/modul/**/*-context.xml
</param-value>
</context-param>
but when trying to access the modules, all i get is an empty Map.
so where's my problem?
is there a problem with the wildcard? or are the contexts of the modules loaded, but just not shared?
can anybody help me here?
<edit>: checking some more, the module contexts doesn't get loaded at all. so my problem seems to be the wildcard
i've got an applicationContext which handles the main logic of my web application. there are several modules all in separate packages and all with their own context files.
now i want to load these contextfiles from the modules and make them accessible to the main application context.
the modules all share the same interface and i want to load them by a manager from the main context with:
appContext.getBeansOfType(IModuleServer.class);
the manager gets the applicationContext with the interface ApplicationContextAware.
so i thought i could load the module contexts this way:
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>
/WEB-INF/applicationContext.xml
classpath:de/bmw/grand/modul/**/*-context.xml
</param-value>
</context-param>
but when trying to access the modules, all i get is an empty Map.
so where's my problem?
is there a problem with the wildcard? or are the contexts of the modules loaded, but just not shared?
can anybody help me here?
<edit>: checking some more, the module contexts doesn't get loaded at all. so my problem seems to be the wildcard