The big issue I recently ran into which caused me to suggest the changes to the jelly.bat file involved the configuration of services like log4j on JVM initialization. I seem to have to place the following on the classpath prior to initializing forehead for log4j to configure properly through forehead.

A .bat file example (where log4j config file is in C:\xyz\conf\logconfig.xml):

@echo off

set CLASSPATH=C:\xyz\conf
set FOREHEAD_CONF=C:\xyz\conf\forehead.conf

set JELLY_OPTS=%JELLY_OPTS% -Dxyz.home=C:\xyz
set JELLY_OPTS=%JELLY_OPTS% -Dlog4j.configuratorClass=org.apache.log4j.xml.DOMConfigurator
set JELLY_OPTS=%JELLY_OPTS% -Dlog4j.configuration=logconfig.xml

call %JELLY_HOME%\bin\jelly model.xml

now I was hoping to get away with loading up the classpath in forehead like this in C:\xyz\conf\forehead.conf:

+ant.home
+jelly.home
+xyz.home
+tools.jar

=[root] org.apache.commons.jelly.Jelly

[root]
${xyz.home}/conf
${xyz.home}/classes
${xyz.home}/lib/*.jar
${jelly.home}/lib/*.jar
${ant.home}/lib/*.jar
${tools.jar}


but it appears something is wrong because log4j attempts to fire up and fails to locate the logconfig.xml file on the classpath. I'm not exactly sure why this happens when it appears that the log4j jar isn't placed on the classpath until the forhead.conf file has been processed.

I'll try it with classworlds and see if I get the same effect.

-Mark

bob mcwhirter wrote:
Ideally, we need to move Jelly to use classworlds instead of forehead
also.
http://classworlds.werken.com/

Maven is making the move, as forehead was a only premature attempt to
solve a larger problem. classworlds solves the problem better, I believe.

Your same suggestion applies though, regarding supplying alternate
launcher config files.

-bob




On Fri, 27 Dec 2002, Mark R. Diggory wrote:


Making jelly.bat support alternate sources for forehead.conf would good as well. This allows for addition of jars to the classpath when its unfeasable to place them into the jelly/custom directory.


@echo off

if "%FOREHEAD_CONF%"=="" set FOREHEAD_CONF=%JELLY_HOME%\bin\forehead.conf

%JAVA_HOME%\bin\java -classpath %CLASSPATH%;%JELLY_HOME%\lib\forehead.jar -Dforehead.conf.file=%FOREHEAD_CONF% -Dant.home=%ANT_HOME% -Djelly.home=%JELLY_HOME% -Dtools.jar=%JAVA_HOME%\lib\tools.jar %JELLY_OPTS% com.werken.forehead.Forehead %*


----
Mark


--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

--
Bob McWhirter        [EMAIL PROTECTED]
The Werken Company   http://werken.com/


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to