Solved

spring classpathxmlapplicationcontext

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

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
groupSumClump challenge 9 115
GUI builder for Eclipse? 8 35
Java Loop 6 59
eclipse apache tomcat admin console 52 97
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…
After being asked a question last year, I went into one of my moods where I did some research and code just for the fun and learning of it all.  Subsequently, from this journey, I put together this article on "Range Searching Using Visual Basic.NET …
Viewers will learn one way to get user input in Java. Introduce the Scanner object: Declare the variable that stores the user input: An example prompting the user for input: Methods you need to invoke in order to properly get  user input:
The viewer will learn how to implement Singleton Design Pattern in Java.

776 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