spring classpathxmlapplicationcontext

Hi,

I would like to know while instantiating  beanfactory why we use only classpathxmlapplicationcontext not other ones. What we use for ApplicationContext. What are the differences, similarities, uses of these two. Any ideas, suggestions, sample code, resources, links highly appreciated. Thanks in advance
LVL 7
gudii9Asked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
Sathish David Kumar NConnect With a Mentor Commented:
ApplicationContext context extends beanfactory only ... so you can use application context ..

>>>>>>>Tehn why we use BeanFactory. please advise

Actult its mainly used for wiring concept . In your application you use only wiring then u go for beanfactory .

If you use applicationContext then it extends beanfactory only so both class memory will take here !
0
 
Sathish David Kumar NCommented:
0
 
gudii9Author Commented:
>>>where memory consumption might be critical and a few extra kilobytes might make a difference

does usage of application context consumes more memory. please advise
0
 
Sathish David Kumar NCommented:
compare to beanfactory its take it takes less amount of memory , thats not main reason we go for applicationcontext! (AOP and transcation)

check diffrences table in that link .... u will get an idea

0
 
gudii9Author Commented:

Feature      BeanFactory      ApplicationContext
Bean instantiation/wiring

Yes

Yes

Automatic BeanPostProcessor registration

No

Yes

Automatic BeanFactoryPostProcessor registration

No

Yes

Convenient MessageSource access (for i18n)

No

Yes

ApplicationEvent publication

No

Yes



so

Automatic BeanPostProcessor registration

Automatic BeanFactoryPostProcessor registration

Convenient MessageSource access (for i18n)
ApplicationEvent publication

are not supported in BeanFactory where as supported in ApplicationContext. Tehn why we use BeanFactory. please advise
0
All Courses

From novice to tech pro — start learning today.