Solved

spring classpathxmlapplicationcontext

Posted on 2011-03-11
5
424 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
  • 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

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
listing all functions in JavaScript 19 180
Checkbox and ListView in Android Layout 4 56
eclipse argument 14 53
Error in @AspectJ Based AOP with Spring 2 5
An old method to applying the Singleton pattern in your Java code is to check if a static instance, defined in the same class that needs to be instantiated once and only once, is null and then create a new instance; otherwise, the pre-existing insta…
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…
Viewers will learn about if statements in Java and their use The if statement: The condition required to create an if statement: Variations of if statements: An example using if statements:
Viewers will learn about the regular for loop in Java and how to use it. Definition: Break the for loop down into 3 parts: Syntax when using for loops: Example using a for loop:

863 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now