geronimo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Jencks <david_jen...@yahoo.com>
Subject Re: GERONIMO_BASE vs. GERONIMO_HOME and org.apache.geronimo.base.dir
Date Mon, 04 Aug 2008 21:53:43 GMT

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


Mime
View raw message