-
Sep 10th, 2009, 09:55 AM
#1
Question about the simple sample
Hi All,
I am a bit confused about the configuration of simple sample application:
there is a bean definition in the : richclient-application-context.xml
------------------------------------------------------------------
<bean id="applicationServices"
class="org.springframework.richclient.application. support.DefaultApplicationServices" />
------------------------------------------------------------------
Below is the "services" method of org.springframework.richclient.application.Applica tion
------------------------------------------------------------------
public static ApplicationServices services() {
if (!ApplicationServicesLocator.isLoaded()) {
ApplicationServicesLocator.load(new ApplicationServicesLocator(new DefaultApplicationServices()));
}
return ApplicationServicesLocator.services();
}
------------------------------------------------------------------
My question is that : why use "new DefaultApplicationServices()" to get a DefaultApplicationServices instead of using ctx.getBean("applicationServices"). As there is already the bean definition in the configuration file.
Thanks,
kcheng
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules