Win a copy of Machine Learning Systems: Designs that scale this week in the Scala forum
or Xamarin in Action: Creating native cross-platform mobile apps in the Android forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

J2EE Application Deployed on IBM Websphere App Server  RSS feed

 
Ranch Hand
Posts: 233
2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

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?

Thanks,
 
Sheriff
Posts: 12010
196
Android Debian Eclipse IDE IntelliJ IDE Java Linux Mac Spring Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well...

If I search for "WAS Websphere Application Server architecture" and follow the first link, I find this:

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.
 
Vaibhav Gargs
Ranch Hand
Posts: 233
2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
So, suppose we have 1 IBM Websphere installed on 1 Unix Server and running 4 J2EE Applications:

1. All 4 apps will share the same JVM?

2. All 4 apps will then share the same Heap Memory? Won't it be a security threat in that sense?

3. Is there any way we can configure the size of Heap Memory allocated to these apps individually?
 
Rancher
Posts: 955
9
Java Linux Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.    
 
Sheriff
Posts: 23506
47
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Vaibhav Gargs wrote:3. Is there any way we can configure the size of Heap Memory allocated to these apps individually?



Not that I know of. And anyway that would just increase the chances of out-of-memory errors, wouldn't it? What would be the advantage of that?
 
Ranch Hand
Posts: 3447
17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Vaibhav Gargs wrote:Hi,

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?

Thanks,



Hi !

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.

So,

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

HTH,
MZ
 
You can't have everything. Where would you put it?
Rocket Oven Kickstarter - from the trailboss
https://coderanch.com/t/695773/Rocket-Oven-Kickstarter-trailboss
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!