geronimo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ivan <>
Subject Re: Substitution variables in gbean attribute value
Date Wed, 25 Aug 2010 15:45:32 GMT
You could NOT use the substitution directly in geronimo-web.xml, but you
might try a workaround solution below, it should work :-)

a. After deploying your application into the server, then stop the server.
b. Open the var/config/config.xml, and find the segment for your
c. Let's take the SharedLib as an example, add a xml fragment like :
    <gbean name="SharedLib">
        <attribute name="libDirs">${APP_HOME}/lib</attribute>

<attribute name="classesDirs">${APP_HOME}/conf</attribute>
d. add the APP_HOME and its real value in the
e. Start the server, now it should use the value configured in the

2010/8/25 Anil Chawla <>

> Hi,
> Is there a way to use substitution variables when defining gbeans in
> geronimo-web.xml? For example, I would like to define a SharedLib for our
> application with an APP_HOME variable that points to the actual location of
> files on the user's filesystem:
> <gbean name="SharedLib"
> class="org.apache.geronimo.system.sharedlib.SharedLib">
> <attribute name="libDirs">${APP_HOME}/lib</attribute>
> <attribute name="classesDirs">${APP_HOME}/conf</attribute>
> <reference name="ServerInfo">
> <name>ServerInfo</name>
> </reference>
> </gbean>
> I've tried setting an APP_HOME environment variable as well as passing
> APP_HOME as a Java system property. I even tried
> org.apache.geronimo.config.substitution.APP_HOME but that seems to be
> specific to config.xml.
> Thanks,
> Anil Chawla


View raw message