WebSphere Application Server. An application server is a Java virtual machine (JVM) running user applications.
Taken at face value, this appears to imply that there is only one JVM running a number of user applications. However, you also have to consider environments that employ clustering and load balancing which by definition would involve several machines and thus most likely, at least as many JVMs.
But why would you? I'm not a WebSphere person, but done plenty of middleware with WebLogic. Common practice is to have a few WebLogic managed [JEE] servers (think in WebSphere they are known as nodes) that each run separate instances of an application. This provides reliability and performance. You also have a administrator server, which has the sole responsibility of controlling the other managed servers. Suspect this is similar in the IBM product. I'm assuming that your running four instances of the same application? Even if your deploying four different applications, I'll still want to have at least two servers each running all four applications.
Normally is one JVM per managed application server, and yes you should be configuring the heap memory - in line with performance test results. No idea how its done in WS, but in WL we used the command line arguments passed to the JVM at startup.
Suppose we have 5 applications deployed on same IBM Websphere App Server, in that case, there will be one JVM only running all 5 applications OR there will be 5 JVMs each one for J2EE app?
You need to clarify conditions:
IBM Websphere App Server is a **product**, it must have a Profile inside which a Runtime Environment is created.
Profile can be said == a Node.
And inside a Node must be a Server (server in terms of WAS - an Application Server configuration).
Inside 1 Node of WAS ND *can* be created 1...N servers (each will have unique ports, so no conflicts to run simultaneously)
And as you were said -- 1 Server (which must be part of some Node) == 1 JVM.
To answer you question we need to know topology first.
I would assume you have 1 Node and 1 Server inside it, so all 5 applications will run inside the same JVM.
WAS provides some settings to isolate classloaders for EAR (WAR) applications, so you can use these if you wish.
Another option -- for the best isolation would be to create 5 Servers for 5 applications. These 5 Servers can be created within a single Node (or each server within an own Node). In that case you have 5 JVMs and applications are accessible via HTTP ports like : 9080, 9081, ... 9084.
The tradeoff for better isolation - amount of memory available on server and CPU. Each Node will require extra JVM (PID interms of OS) for nodeagent, and extra server will require extra JVM (OS PID) for server.
A. 1 Node and 1 Server = 2 JVMs, all 5 apps run on same server , weaker isolation.
B. 5 Nodes and each Node has own Server = 10 JVMs - overkill 8-)
C. 1 Node and 5 Servers = 6 JVMs, the isolation is the same as above, but less memory required.
1 JVM usually require 256kB...1Gb of heap..
Exam 1Z0-810: Upgrade to Java SE 8 Programmer Study Guide and Quiz Exam 1Z0-817: Upgrade OCP Java 6, 7 and 8 to Java SE 11 Developer Study Guide