开发者

Spring Application Context Switch at Runtime

开发者 https://www.devze.com 2022-12-22 21:30 出处:网络
I\'m wondering if it is possible to change which application context your app is using at run time. The use case would be:

I'm wondering if it is possible to change which application context your app is using at run time.

The use case would be:

I have a GUI that allows you create queuing networks. It also allows you to select which simulation library you would like 开发者_开发技巧to use run the model you've just created. Each library has its own application context which says which castor mapping files to use for translation, how to instantiate beans etc....

How do I tell the system to switch from one context to another?

Any help would be much appreciated.


Have you looked at using parent and child ApplicationContexts for what you need; where each "simulation library" could be loaded as a child context?

0

精彩评论

暂无评论...
验证码 换一张
取 消