xml spring context files, package extructure and performance
Hi all,
I have a great doubt about how i most organize my xml context definitions in my spring web application.
I have a package extructure like this i show below:
Subsistem
--I__Module
--------I__web
--------I__domain
--------I__facade
--------I__service
Now the xml contexts where will be the bean declaration for all the classes include in those packages under the Module are in a central place in WEB-INF\. This approach hinder several tests where i most to load the spring context, for instance test to my spring manage transaction beans. Beside this approach is not convenient if i want to pack in a jar file for example one module, because the beans declared in the spring context are not inside the module but under WEB-INF and spread across the severals xml contexts, because the organization criteria of bean declaration in the xml contexts is not the same of the package extructure for this approach.
I can to dedicate a xml spring context to declare all the service beans without caring of what module they belong.
In this approach with a few xml spring context files i resolve all my application.
All rigth there are a solution, to include a package under every module where i put a xml spring context with the bean declarations relative to the module, just like this:
Subsistem
--I__Module
--------I__web presentation javaBeans
--------I__domain bussiness classes
--------I__facade module funtionality tha is used by the presentation beans
--------I__service methods to be exposed to external sistems, like web services for example
--------I__config xml spring context files for bean declarations of the module
This approach solve all the dificulties i mention above, but my doubt is about the performance. With this approach the number of xml spring context files is much bigger (so many xml context files like modules have the application), and spring container have to read and parse all of then.
My question is:
The performance of a spring application is afected when the number of xml context files is big?