Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How Spring manages beans inside?

 
Himanshu Gupta
Ranch Hand
Posts: 598
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It was asked to me in an interview.

Can anyone help me in finding its answer.
 
Nathan Pruett
Bartender
Posts: 4121
IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The base container interface is BeanFactory... but that's a really broad question...
 
Himanshu Gupta
Ranch Hand
Posts: 598
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Nathan.


Looking for more replies.
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Spring internals could fill a small book. What specific type of information are you looking for?

Have you looked at the source code and are having a problem with a specific area?
 
Himanshu Gupta
Ranch Hand
Posts: 598
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am looking for the design they are using to maintain the information about beans and the process how they create it? How the beans are maintained inside? What type of data structure they use?

I havn't looked at the source code. I want to know all this just to be aware that what happens inside.

Thanks David for the reply.
 
Mark Spritzler
ranger
Sheriff
Posts: 17278
6
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How about HashMaps.

Yep the BeanFactory is just a set of glorified HashMaps. So is Hibernate's SessionFactory.

Yes, there is a bit more to it than just that, but in terms of storage, that is what it uses.

Mark
 
Craig Taylor
Ranch Hand
Posts: 64
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hashmaps with an occasional proxy tossed in for fun - that's all it is.

The rest is smoke and mirrors (sometimes fire depending upon your app).


 
Mark Spritzler
ranger
Sheriff
Posts: 17278
6
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Craig Taylor wrote:(sometimes fire depending upon your app).




Nice!

Mark
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic