Solved

spring classpathxmlapplicationcontext

Posted on 2011-03-11
5
435 Views
Last Modified: 2012-05-11
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
0
Comment
Question by:gudii9
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
5 Comments
 
LVL 20

Expert Comment

by:Sathish David Kumar N
ID: 35111328
0
 
LVL 7

Author Comment

by:gudii9
ID: 35218446
>>>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
 
LVL 20

Expert Comment

by:Sathish David Kumar N
ID: 35221025
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
 
LVL 7

Author Comment

by:gudii9
ID: 35369029

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
 
LVL 20

Accepted Solution

by:
Sathish David  Kumar N earned 500 total points
ID: 35372593
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

Featured Post

A new era in Cloud training has arrived.

A day that will go down in Cloud history.. But are you ready for it? Will you accept this Cloud challenge?

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

By the end of 1980s, object oriented programming using languages like C++, Simula69 and ObjectPascal gained momentum. It looked like programmers finally found the perfect language. C++ successfully combined the object oriented principles of Simula w…
Java had always been an easily readable and understandable language.  Some relatively recent changes in the language seem to be changing this pretty fast, and anyone that had not seen any Java code for the last 5 years will possibly have issues unde…
This tutorial covers a practical example of lazy loading technique and early loading technique in a Singleton Design Pattern.
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.
Suggested Courses

630 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question