Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Spring - When should I consider loading another context in same JVM?

I was just thinking that when should I actually consider loading more than one application contexts in Spring? All so far I have been merging the context files with <include> such that only one application context loads up.

Do you have an idea about when to go for more than one application contexts in the same JVM?

like image 433
peakit Avatar asked Feb 21 '26 08:02

peakit


1 Answers

When you need to use hierarchical contexts, for example - like Spring MVC does. Your "web" context is loaded separately from your "main" context, so stuff defined in "main" context (services / DAOs / etc) is available to "web" but not the other way around.

like image 94
ChssPly76 Avatar answered Feb 23 '26 21:02

ChssPly76



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!