This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Spring and the fly likes How to separate out the application context 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 "How to separate out the application context" Watch "How to separate out the application context" New topic
Author

How to separate out the application context

Joybrata Chakraborty
Greenhorn

Joined: Nov 27, 2006
Posts: 29
Hi Friends

I have adoubt on spring frame work. In my application I want to separate out the application context file. So how ref a bean which in the different application context.

Joy


Thanks in advance
Mark Spritzler
ranger
Sheriff

Joined: Feb 05, 2001
Posts: 17249
    
    6

Joybrata Chakraborty wrote:Hi Friends

I have adoubt on spring frame work. In my application I want to separate out the application context file. So how ref a bean which in the different application context.

Joy


just ref it by name, and when you create your ApplicationContext object the constructor can also take a String array String[] where the array has each of your xml config files. Or your can have one config file <import resource="location of other xml file"/> import another config file, and have the main one as the single String in the ApplicationContext constructor.

Mark


Perfect World Programming, LLC - Two Laptop Bag - Tube Organizer
How to Ask Questions the Smart Way FAQ
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: How to separate out the application context
 
Similar Threads
Spring - Multiple IoC Containers with Singleton Bean in a JVM
Login Screen Customization
AC and SC
Getting Tomcat 4.1.18 to recoginze my context
variable doesn't increment