Great,
So it seems you and I are thinking exactly the same.
And I agree with what you wrote.
However I am trying to understand GERONIMO_BASE vs. GERONIMO_HOME and what is
appropriate for org.apache.geronimo.base.dir
This is what I was attempting to illustrate.
I searched for these on the wiki (and google and cuil), and found no information
to help me.
The documentation for multiple-instances support of Geronimo still basis
everything off of GERONIMO_HOME. But what about GERONIMO_BASE ?
If I want to move the var/ directory into another location, is that really a
reference of GERONIMO_HOME ? or a reference of GERONIMO_BASE ?
Is it not truely <GERONIMO_BASE>/foo/var instead of <GERONIMO_HOME>/foo/var ?
.... the scripts point at GERONIMO_BASE, not GERONIMO_HOME...
-Dorg.apache.geronimo.base.dir="$GERONIMO_BASE"
<GERONIMO_HOME>/bin/client.sh
<GERONIMO_HOME>/bin/deploy.sh
<GERONIMO_HOME>/bin/geronimo.sh
<GERONIMO_HOME>/bin/jaxws-tools.sh
If I had to guess, the committer that configured JAVA ext and JAVA endorsed in
the geronimo.sh and client.sh scripts mistakenly referred to GERONIMO_BASE
instead of GERONIMO_HOME.
-
EXT_DIRS="$GERONIMO_BASE/lib/ext;$JRE_HOME/lib/ext"
ENDORSED_DIRS="$GERONIMO_BASE/lib/endorsed;$JRE_HOME/lib/endorsed"
EXT_DIRS="$GERONIMO_BASE/lib/ext:$JRE_HOME/lib/ext"
ENDORSED_DIRS="$GERONIMO_BASE/lib/endorsed:$JRE_HOME/lib/endorsed"
-
Shouldn't that '/lib/ext' and '/lib/endorsed' be relative to GERONIMO_HOME ?
This snipit in the shell scripts is what brought on my confusion.
-RG
David Jencks wrote:
On Aug 4, 2008, at 1:13 PM, Russell E Glaue wrote:
My summarized question:
What is "GERONIMO_BASE" is <GERONIMO_HOME>/bin/geronimo.sh startup
script intended to reference?
According to the documentation in that file, GERONIMO_BASE is supposed
to point at the base directory in which dynamic content is found.
I interpret dynamic content as content that is created or manipulated
for the purpose and use of the run-time geronimo process.
Dynamic content would include:
1) run-time configuration files
2) log files
3) temporary directories
yes to these
4) possibly web applications
??? not sure how you got here.
However see
http://cwiki.apache.org/GMOxDOC21/running-multiple-instances-of-geronimo.html and
the instructions on multiple repositories
http://cwiki.apache.org/GMOxDOC21/multiple-repositories.html
GERONIMO_BASE vs. GERONIMO_HOME
If I were to break down Geronimo 2.1.1 file structure into
GERONIMO_HOME and GERONIMO_BASE, would this break-down be correct?
- GERONIMO_HOME/bin
- GERONIMO_HOME/etc
- GERONIMO_HOME/lib
- GERONIMO_HOME/master-repository
- GERONIMO_HOME/cluster-repository
- GERONIMO_BASE/var
ok
- GERONIMO_BASE/schema
schema is not used by geronimo, its only there for the convenience of
users.
After separating that out, what is the
-Dorg.apache.geronimo.base.dir=<dir> supposed to be pointing at? My
assumption would be GERONIMO_BASE, as everything from GERONIMO_HOME
should be referred to on the command line, or loaded into environment
variables before or during execution of the geronimo server...
$GERONIMO_HOME/bin/server.jar
Point to knowing about this:
Let's say I wanted a server specific configuration stored in /etc/,
say as : /etc/geronimo-servers/default-server
I would want GERONIMO_BASE=/etc/geronimo-servers/default-server while
GERONIMO_HOME points to everything as I have above.
You're going to have a really hard time making that work. While its not
set in stone, the thinking behind the setup is that everything
user-modifiable such as app specific settings, logs, configuration, etc
etc goes in var; all the other stuff should not be modified "by hand",
only be e.g. deploying or undeploying more plugins (or apps). So if you
want to set up an additional server you make another var directory
somewhere, say <GERONIMO_HOME>/myserver1/var and set GERONIMO_BASE to that.
Geronimo has a SystemInfo component that is used to resolve paths
internally and it can resolve based on either HOME or BASE. The stuff
that refers to user modifiable or variable content uses the
resolveServer method, the stuff that is shared across all instances uses
resolve.
And yes, I realize GERONIMO_BASE has the temp and logs directory.
Sparing me the convenience of keeping this example brief, how do I
achieve this simple split of the GERONIMO_HOME and GERONIMO_BASE files?
The <GERONIMO_HOME>/bin/geronimo.sh script does not allow the
separation of GERONIMO_HOME and GERONIMO_BASE as it is currently
written. It looks like the liberty of both vairables pointing to the
same directory has been widely accepted, thus seemingly invalidating
the reason for having both variables to begin with.
A possible patch:
So assuming all my above asumptions are correct, this would be the
patch to geronimo to fix this issue:
-----SNIP-SNIP-----PATCH-----SNIP-SNIP-----
Index: assemblies/geronimo-boilerplate/src/main/underlay/bin/geronimo.sh
===================================================================
--- assemblies/geronimo-boilerplate/src/main/underlay/bin/geronimo.sh
(revision 682467)
+++
assemblies/geronimo-boilerplate/src/main/underlay/bin/geronimo.sh
(working copy)
@@ -235,11 +235,11 @@
GERONIMO_HOME=`cygpath --absolute --windows "$GERONIMO_HOME"`
GERONIMO_BASE=`cygpath --absolute --windows "$GERONIMO_BASE"`
GERONIMO_TMPDIR=`cygpath --windows "$GERONIMO_TMPDIR"`
- EXT_DIRS="$GERONIMO_BASE/lib/ext;$JRE_HOME/lib/ext"
- ENDORSED_DIRS="$GERONIMO_BASE/lib/endorsed;$JRE_HOME/lib/endorsed"
+ EXT_DIRS="$GERONIMO_HOME/lib/ext;$JRE_HOME/lib/ext"
+ ENDORSED_DIRS="$GERONIMO_HOME/lib/endorsed;$JRE_HOME/lib/endorsed"
else
- EXT_DIRS="$GERONIMO_BASE/lib/ext:$JRE_HOME/lib/ext"
- ENDORSED_DIRS="$GERONIMO_BASE/lib/endorsed:$JRE_HOME/lib/endorsed"
+ EXT_DIRS="$GERONIMO_HOME/lib/ext:$JRE_HOME/lib/ext"
+ ENDORSED_DIRS="$GERONIMO_HOME/lib/endorsed:$JRE_HOME/lib/endorsed"
fi
# ----- Execute The Requested Command
-----------------------------------------
@@ -284,7 +284,7 @@
fi
# Setup the Java programming language agent
-JAVA_AGENT_JAR="$GERONIMO_BASE/bin/jpa.jar"
+JAVA_AGENT_JAR="$GERONIMO_HOME/bin/jpa.jar"
if [ -f "$JAVA_AGENT_JAR" ]; then
JAVA_AGENT_OPTS="-javaagent:$JAVA_AGENT_JAR"
else
-----SNIP-SNIP-----END-PATCH-----SNIP-SNIP-----
Discussion???
I'm pretty sure the multiple server feature is working as designed,
there's an extra-repo plugin for instance. I don't really understand
what you are trying to do or why you think there's a problem. All I can
see is that you could copy the existing var dir to
etc/geronimo-servers/default-server/var and run with BASE as
etc/geronimo-servers/default-server however IMO this is really weird to
put user modifiable content inside what is intended as a read-only
system level directory.
Perhaps you could explain more what you are trying to do?
thanks
david jencks
-RG