• Post Reply Bookmark Topic Watch Topic
  • New Topic

Singleton Java Class V/S Spring Singleton  RSS feed

 
Ranch Hand
Posts: 162
2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I understand that

A Java program written as Singleton means 1 instance per JVM per class loader

Spring Singleton is 1 instance per Spring Container.

So, I was just wondering if is it possible to have two Spring Containers in a Spring MVC application? If yes, then how? And, if we have 2 containers does that mean 2 separate JVMs?
 
Time is the best teacher, but unfortunately, it kills all of its students - Robin Williams. tiny ad:
ScroogeXHTML 7.1 - RTF to HTML5 / XHTML converter
https://coderanch.com/t/690611/ScroogeXHTML-RTF-HTML-XHTML-converter
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!