geronimo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From toby cabot <>
Subject adding dependency jars to a GBean at run-time?
Date Tue, 05 Jun 2007 20:46:29 GMT
Hi Folks,

In my application of Geronimo I need to add a third-party log4j
appender to send log messages as SNMP traps.  I can add the jars I
need to the j2ee-system pom.xml and build a custom Geronimo image, but
it would be better if I could do everything at run-time so I could use
an unmolested Geronimo.

Is there a way to add dependency jars to a configuration at run-time?
For example, could I add something to config.xml so that my jars would
get added to the j2ee-system classpath?  I tried adding the following
to var/config/config.xml (based on some other :

    <module name="org.apache.geronimo.configs/j2ee-system/2.0-SNAPSHOT/car">
        <gbean name="org.apache.geronimo.configs/j2ee-system/2.0-SNAPSHOT/car?ServiceModule=org.apache.geronimo.configs/j2ee-system/2.0-SNAPSHOT/car,j2eeType=SystemLog,name=Logger">
            <attribute name="configFileName">/path/to/my/log4j.xml</attribute>
            <attribute name="defaultEnvironment">
                <environment xmlns="">

This partially worked - Geronimo used my log4j.xml file.  It didn't
add the jars to the classpath, though.  The jars are in the repository
and they're added to the classpath when I declare them in the pom.xml
and rebuild.


View raw message