应用服务器如何运行多个应用?(How application server runs multiple applications?)
我一直在寻找这样的信息,但我找不到一个明确的答案。
应用程序服务器用于执行隔离的多个(Web)应用程序的确切机制 例如,他们如何管理静态字段隔离?
我可以想象几种解决方案:
隔离API ; 引导 ; 使用类加载器的技巧(使用线程上下文类加载器); 运行几个jvm实例。但他们在现实中使用了什么?
I've been looking for a while for such sort of information but i couldn't find a clear answer.
What exact mechanism application servers use to execute several (web)applications isolated? For instance how do they manage static fields isolation?
I can imagine several solutions:
isolation API; bootstrapping; tricks with class loaders (using thread context class loader); running several jvm instances.But what do they use in reality?
最满意答案
为了分离应用程序,应用程序服务器确实使用单独的ClassLoader来区分类(及其静态字段)。
例如,JBoss从v4开始使用统一类加载器 (UCL)。
To separate applications, application servers indeed use separate ClassLoaders to distinguish classes (and their static fields) from each other.
JBoss for example is using a Unified Class Loader (UCL) since v4.
更多推荐
发布评论