title: how to do runtime bean deployement and destroy a bean in spring ioc container?
body: <p>I have an application which is having a <code>ClassPathXMLApplicationContext</code> which has loaded some beans from spring xml files.
  I want to add a bean at runtime. So i created another instance of <code>ClassPathXMLApplicationContext</code> which reads the new bean definitions from new xml files. Now i have two appContexts.</p>
  
  <p>My Question is: how do i copy the beans from the new context to the old context? is it necessary to copy? cant i just merge these two contexts? is there an api for merging?</p>
  
  <p>Later i want to undeploy the bean a runtime. I also want classloader to unload the bean class when i delete the bean.</p>
  
  <p>How to delete a bean from an ApplicationContext and also unload the bean class.</p>
  
  <p>Thanks,
  Regards,
  Vimal</p>