users@glassfish.java.net

Re: How to pass properties to glassfishv2 startup/domain.xml?

From: <glassfish_at_javadesktop.org>
Date: Fri, 07 Sep 2007 16:45:15 PDT

Right, but ${com.sun.aas.installRoot} didn't have to be a Java System property. The current
implementation (mostly wrongly) chose to do so. It is merely a token replacement.

I think you are confused about jvm-options and classpath-suffix. Let me explain with an example:

- Suppose you want the GlassFish Server to start with: -DFoo=Bar (So that when your application does System.getProperty("Foo"), "Bar" is returned) and with a jar like "myclasses.jar", so that
you can find classes in that jar.

If that is the right use case, then you should:
- modify domain.xml as such:
  <java-config classpath-suffix="path-to-myclasses.jar" ...>
                 <jvm-options> -DFoo=Bar </jvm-options>
  ...
  </java-config>

Then, your GlassFish server is started thus:

java -Dcom.sun.aas.installRoot ...... [b]-DFoo=Bar[/b] [b]-Dcom.sun.aas.ClassPathSuffix=path-to-myclasses.jar [/b]-cp appserv-launch.jar [b]com.sun.enterprise.server.PELaunch[/b]

So, in essence, your GlassFish Server VM has all the things you need.

Clear?

Or am I completely off-base?

- Kedar
[Message sent by forum member 'km' (km)]

http://forums.java.net/jive/thread.jspa?messageID=234511