Search code examples
javaapplication-server

How application server runs multiple applications?


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:

But what do they use in reality?


Solution

  • 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.