title: Spring - Use applicationContext from .jar file added as a dependency
body: <p>Imagine a situation where there are 2 independent modules - Module A and B. Both of them are constructed using Spring. Each of them have its own applicationContext - Module A works with applicationContextA and B - applicationContextB.<br>
  Module A contains facade class - defined in a bean moduleAFacade - that provides some functionality of Module A. Module B needs to access the functionality of Module A. <br>
  Let's have Module A added as a .jar dependency in the module B.
  There is this construction in applicationContextB: <br></p>
  
  <pre class="lang-xml prettyprint-override"><code>&lt;bean id="moduleBBeanUsingModuleAfacade" class="com.example.moduleB"&gt;
      &lt;property name="moduleAFacadeObject" ref="moduleAFacade" /&gt;
  &lt;/bean&gt;
  </code></pre>
  
  <p>But applicationContext of Module A is not accessible from Module B's appContext directly. I need to use something like <br></p>
  
  <pre class="lang-xml prettyprint-override"><code>&lt;import resource="classpath*:moduleAApplicationContext.xml" /&gt; 
  </code></pre>
  
  <p>Are there any other methods to access application contexts of .jar files added to the project as dependency?<br>
  Are there some best practises how to accomplish the task?</p>
  
  <p><br></p>