First off, let me say that I don't know how I'd do my job without Cargo!
So, onto the issue. I can't seem to set the JVM options for GlassFish 3.1.2. This seems to be closely related to CARGO-1108 , which just addressed system properties. Maybe something similar needs to be done for JVM options?
The fix for 1108 is here .
The problem, I think, is that it sets the JVM options on the calls to asadmin to perform the tasks or loading the WARs -- it doesn't actually change the JVM options for the app server process, which should be done via 'create-jvm-options' .
I use the same code to set the JVM options across all of my Tomcat, JBoss, Jetty and WebLogic Cargo-driven tests, so I'm pretty confident the setting of the JVM options is done correctly.
I'll create an issue in JIRA if you agree.
I think the problem is in AbstractGlassFishStandaloneLocalConfiguration.java, starting on line 164 [snippet below]. It seems to only actually support the -Xmx and -XX:MaxPermSize options. I need support for -javaagent for my purposes. Note that -javaagent switches are of the format:
As opposed to the more typical convention in JVM options:
Here's the problematic section (I think):
String jvmArgs = this.getPropertyValue(GeneralPropertySet.JVMARGS);
if (jvmArgs != null)
String xmx = this.getJvmArg(jvmArgs, "-Xmx");
if (xmx != null)
String maxPermSize = this.getJvmArg(jvmArgs, "-XX:MaxPermSize");
if (maxPermSize != null)
On Fri, Sep 27, 2013 at 3:07 PM, Arshan Dabirsiaghi <[hidden email]> wrote:
Well spotted! I've opened https://jira.codehaus.org/browse/CARGO-1224 for this one and actually think fixed it with revision 3736.
Feel free to try version 1.4.5-SNAPSHOT to see if it helps. Instructions are on http://cargo.codehaus.org/Maven2+Plugin+Installation#Maven2PluginInstallation-snapshots but since the code has just been checked in it would take 1-2 hours to reach the SNAPSHOT repository.
As an alternative, you can always build the code yourself.
S. Ali Tokmen http://ali.tokmen.com/ My IM, GSM, PGP and other contact details are on http://contact.ali.tokmen.comOn 9/27/13 21:32 , Arshan Dabirsiaghi wrote:
Your fix works well. Thanks for the quick turnaround, and keep up the great work.
On Fri, Sep 27, 2013 at 6:20 PM, S. Ali Tokmen <[hidden email]> wrote:
|Free forum by Nabble||Edit this page|