wood burning stoves 2.0*
The moose likes Spring and the fly likes Query about object creation in Spring Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Frameworks » Spring
Bookmark "Query about object creation in Spring" Watch "Query about object creation in Spring" New topic

Query about object creation in Spring

Salil Vverma
Ranch Hand

Joined: Sep 06, 2009
Posts: 253


In spring, does the container instantiates all the beans defined in different spring_context_ xmls or we need to mention in some configuration file to let the container know about the xmls whose been should be created at startup ?

Salil Verma
Vivek K Singh
Ranch Hand

Joined: Dec 22, 2009
Posts: 85

If you split your spring configs across multiple files (good thing to do) and then want a subset to be loaded, you can do that. example:

if you have appCntx-jms.xml, appCntx-jdbc.xml, appCntx-common.xml then you can say:

Also you can have a main-appCntx.xml that loads all the other config files, All you do is just load this xml (cascading load):

I agree. Here's the link: http://aspose.com/file-tools
subject: Query about object creation in Spring
Similar Threads
What is LightWeight Container
calling jsp from servlet
What is the best way to Cache Static XMLs
parsing XML in java
Spring and jboss