dev@glassfish.java.net

Differences starting v3 (asadmin vs. java -jar glassfish.jar)

From: Vivek Pandey <Vivek.Pandey_at_Sun.COM>
Date: Fri, 05 Sep 2008 11:00:57 -0700

When v3 is started using java -jar glassfish-VERSION.jar vs started
using asadmin command, it seems the jvm-options setting, such as Xmx is
not taking effect in the former case. Are both of these not equivalent?

Here is what we observed:

The default Xmx setting in the domain.xml is 512MB. Jacob was evaluating
a an OOM bug[1] and reported that when he starts v3 as

java -DJRUBY_HOME=/tools/jruby -jar modules/glassfish-10.0-SNAPSHOT.jar

JConsole reports that the max Heap is 64MB only and when he tries to
deploy more apps or hit the server multiple times and rails ruby pool
increases it gives OOM pretty quickly. So looks like the domain.xml
entry for Xmx is not taking effect when glassfish is started using java
and glassfish.jar.

Although when he starts using asadmin start-domain command the Xmx
setting of 512MB kicks in.

Is it not expected that when we start v3 using java the domain.xml
settings are applied?


-vivek.
[1]https://glassfish.dev.java.net/issues/show_bug.cgi?id=5839