This week's book giveaway is in the Java 8 forum.
We're giving away four copies of Java 8 in Action and have Raoul-Gabriel Urma, Mario Fusco, and Alan Mycroft on-line!
See this thread for details.
The moose likes Spring and the fly likes When to use ApplicationContext start() Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Frameworks » Spring
Bookmark "When to use ApplicationContext start()" Watch "When to use ApplicationContext start()" New topic
Author

When to use ApplicationContext start()

Kaspar Christenson
Greenhorn

Joined: Feb 26, 2009
Posts: 21

When would you ever use the ApplicationContext start() method?

I've seen some books do this:


Why would anyone do that?
If you use start() do you have to use close()?

I just don't see where start() would be used outside of the spring framework.
Ankit Garg
Sheriff

Joined: Aug 03, 2008
Posts: 9280
    
  17

I don't see any start method in ApplicationContext class. In which books have you seen it being used?


SCJP 6 | SCWCD 5 | Javaranch SCJP FAQ | SCWCD Links
Kaspar Christenson
Greenhorn

Joined: Feb 26, 2009
Posts: 21

My mistake was to use ApplicationContext (I going from memory). Correct class in ClassPathXmlApplicationContext.

Pro Spring Integration
By: Dr. Mark Lui; Mario Gray; Andy Chan; Josh Long
Publisher: Apress
Pub. Date: March 24, 2011
Print ISBN: 978-1-4302-3345-9
Web ISBN: 1-4302-3345-1

In Chapter 5 and about 6 other places in the book.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: When to use ApplicationContext start()
 
Similar Threads
How does this works
Best way to instantiate Spring context in a Servlet ?
very new to spring. Need help in this small spring program
1st Day in Springs: Introductory question
Spring MVC-How to get WebApplicationContext in Spring without ContextLoaderListener?