0
votes

When we start up a managed server on a weblogic intance, the managed server starts up a jvm. Right? So now when we deploy multiple applications (war files, ear files) etc, on the same weblogic instance on the same managed server, do all these apps run on the same jvm? So how is an object(name = obj1) belonging to app1 differentiate from a similarly named object (name = obj2) in app2?

1
Okay, so I've merged five of your accounts together into your one and only registered account: stackoverflow.com/users/454671/kaushik Also, you keep adding answers instead of using comments. You can always edit your question to add information, and you can always leave comments on answers to your questions. If you can manage to log into your real account (instead of creating a new unregistered one) you'll find you have enough rep now to make comments anywhere.user1228

1 Answers

3
votes

Yes, all apps like EARs, WARs run in the same JVM.

The JVM is one java process, and these artifacts are multiple applications running in that JVM.

I'm not clear what you you mean by object names which are same across apps, (your question says obj1 and obj2) but if they are things like connection pools etc, these have unique identifiers across apps by virtue of JNDI.

If you are referring to simple classes (and objects), these are loaded and maintained separately by the Java classloader.

Read the Application Classloading Hierarchy on the docs

Every application receives its own classloader hierarchy; the parent of this hierarchy is the system classpath classloader. This isolates applications so that application A cannot see the classloaders or classes of application B.