user2010955
user2010955

Reputation: 4011

WebLogic, choosing the JDK

Regarding a Java EE application and WebLogic; I've noticed that I could change the Java VM (Sun JDK or JRockit) in different places:

  1. During creation of the WebLogic Domain
  2. Project classpath
  3. During creation of WebLogic Server Runtime Environment
  4. Other?

Can you explain me what happens if I change one of the different settings?

Upvotes: 3

Views: 1620

Answers (2)

eis
eis

Reputation: 53462

There are really only two main use cases that I can think of. Standalone client apps, which care about startup time and not about GC in the long run, and server usage, which doesn't really care about startup time but GC and steady performance in the long rung is vital. Some apps may create (class) instances runtime a lot more than others, so that might have an impact as well.

About the differences:

  1. JRockit doesn't really have PermGen, but uses regular heap for the same. As some software have issues with PermGen not getting collected, JRockit behaves better on those. Oracle/Sun VM has Eden space, survivior space, tenured generation and permanent generation, whereas JRockit has just young generation and old generation.
  2. Garbage collection strategies are somewhat different. Depends on the software which one is best suited for a given situation.
  3. Debug flags are different, and some debugging software expect a certain JDK. JRockit has JRockit mission control which is an advanced tool on monitoring the current status of your JVM. Some version is free to download, for latest patches you need an Oracle support contract. With Oracle VM, you can use all the standard tools: visualvm, jhat, jmap, jprof, MAT, jstat. It's a matter of taste and use case which one you prefer.

If you change it manually, you will likely see an error about unsupported debug flags. Once you change those, you can hit a PermGen error earlier on the Oracle VM: other than that, I would expect you only see a difference in GC profiles and/or performance testing.

In the long run you might want to take a look at what this thread has to say. JRockit and Oracle JVM will become one and the same.

Upvotes: 0

Display Name is missing
Display Name is missing

Reputation: 6227

The only real difference is that JRockit is specifically tuned to work with Weblogic so you'll see performance improvements. Memory settings will change when picking one or the other as well.

There are two easy ways to guarantee what JVM your server uses when it is started:

  • You can explicitly set the JVM on the 'Server Start' tab for a managed server. This only applies when the server is started via the nodemanager.
  • Set both BEA_JAVA_HOME and SUN_JAVA_HOME in the setDomainEnv.sh file. We set them both to the same value because we always want a particular JVM

Like you said, there are other places the value can be set but I think the above 2 options are the easiest way to go.

Upvotes: 3

Related Questions