aspose file tools*
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 EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Frameworks » Spring
Bookmark "When to use ApplicationContext start()" Watch "When to use ApplicationContext start()" New topic

When to use ApplicationContext start()

Kaspar Christenson

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

Joined: Aug 03, 2008
Posts: 9280

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

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:
subject: When to use ApplicationContext start()
Similar Threads
very new to spring. Need help in this small spring program
How does this works
1st Day in Springs: Introductory question
Best way to instantiate Spring context in a Servlet ?
Spring MVC-How to get WebApplicationContext in Spring without ContextLoaderListener?