title: Spring MVC: Share beans between WARs in the same webserver
body: <p>I'm running a web-server (Embedded Jetty) that hosts multiple WARs and also supports hot deployment of new\exisitng webapps (as described <a href="https://www.eclipse.org/jetty/documentation/9.4.x/deployment-architecture.html" rel="nofollow noreferrer">here</a>).</p>
  
  <p>I have a set of common beans which needs to be shared (same instance) between the different web-apps. Is it possible to use Spring to somehow handle this beans?</p>
  
  <p>Found <a href="https://stackoverflow.com/questions/16162877/spring-mvc-sharing-context-within-ear">this excellent explanation</a>, but it explain how to do it with EAR files, which is not an option on my side since as I mentioned we support hot deployment of new WARs, we don't want to redeploy all the web-apps when deploying one web-app.</p>
  
  <p>Is it possible to use Spring to handle these beans? or do I need to create some kind of wrapper in my common-beans to behave as a singleton (all web-apps runs on the same JVM)</p>