File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Spring and the fly likes Limitation on Spring bean definitions Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Frameworks » Spring
Bookmark "Limitation on Spring bean definitions" Watch "Limitation on Spring bean definitions" New topic

Limitation on Spring bean definitions

pavankumar shetty

Joined: May 05, 2007
Posts: 4

I am a new to springs. Is there is any limitation for the number of beans to be defined in an application and will there be any performance issue if the number of beans defined in an application is more (May be around 250 bean definitions).
Mark Spritzler

Joined: Feb 05, 2001
Posts: 17276

I'll rephrase it.

Is there any limitation on the number of instances/objects that you can create in Java? It is the same thing. The Spring definitions is just that, a definition that tells Spring what to instantiate for you.

By default all beans are Singleton, which is a great thing. And Spring instantiates them when you create an ApplicationContext instance. So the creation of the ApplicationContext might take a little bit of time, but really very small, but no performance issues later. If you find performance issues, it is probably because of your Heap configuration. Which would be a performance issue for you whether you were using Spring or not.

Good Luck and enjoy your trip in learning Spring. My first lesson for you is it is just called Spring. There is no pluralization to it. No such thing as springs.

Also, as you are learning, please post your questions here, we love helping people out.


Perfect World Programming, LLC - iOS Apps
How to Ask Questions the Smart Way FAQ
pavankumar shetty

Joined: May 05, 2007
Posts: 4
Thanks Mark
I agree. Here's the link:
subject: Limitation on Spring bean definitions
It's not a secret anymore!