You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@geronimo.apache.org by "Russell E Glaue (Created) (JIRA)" <ji...@apache.org> on 2012/02/16 22:55:00 UTC

[jira] [Created] (GERONIMO-6275) Defining and Using org.apache.geronimo.server.dir versus org.apache.geronimo.home.dir in shell scripts

Defining and Using org.apache.geronimo.server.dir versus org.apache.geronimo.home.dir in shell scripts
------------------------------------------------------------------------------------------------------

                 Key: GERONIMO-6275
                 URL: https://issues.apache.org/jira/browse/GERONIMO-6275
             Project: Geronimo
          Issue Type: Sub-task
      Security Level: public (Regular issues)
          Components: startup/shutdown
    Affects Versions: 3.0-beta-1
         Environment: Linux x86, Red Hat Enterprise Linux Server release 5.4 (Tikanga); Java JDK1.6.0_25
            Reporter: Russell E Glaue
            Priority: Minor


Related: GERONIMO-6270, GERONIMO-6175, GERONIMO-6174, GERONIMO-5987, GERONIMO-4229

It would be easier to support multiple server instances of Geronimo if there is one shell variable that is used to reference the path on disk to the instance, proposed as GERONIMO_SERVER as opposed to the GERONIMO_HOME installation path. This issue tracks the discussion and modification of such a change.
GERONIMO_SERVER defines:
- GERONIMO_SERVER defaults to GERONIMO_HOME if no instances are specified
- GERONIMO_SERVER is expanded to GERONIMO_HOME/GERONIMO_SERVER if GERONIMO_SERVER is a relative path
- GERONIMO_SERVER defines org.apache.geronimo.server.dir

In the java code there are the following properties:
# org.apache.geronimo.home.dir - equivelant to GERONIMO_HOME shell variable
# org.apache.geronimo.server.dir - proposed to be equivelant to GERONIMO_SERVER 

The words "BASE" versus "HOME" appear a few times in the source. Once example is "karaf.home" and "karaf.base" properties. According to the code usage, it is aparant that these terms are assumed to mean these things:
# HOME - path location on disk of read-only binaries and configuration
# BASE - path location on disk of read-write configuration and data storage

The term BASE is intended to point at a Geronimo Server Instance Base path. However, this has not been clearly defined, and has appeared to cause some misusage. Thus this and other issues lead to the removal of GERONIMO_BASE shell variable and org.apache.geronimo.base.dir java property in GERONIMO-4229 .


Currently, to start a Geronimo Instance, the org.apache.geronimo.server.dir java property must be defined in the GERONIMO_OPTS variable. However, this prevents the Shell scripts from being able to know and use the path location to the Geronimo Server Instance.

In particular, there are a few issues affected by a variable like this not being available.
# Reported in GERONIMO-6174 - GERONIMO_TMPDIR is set in the shell/bat scripts as GERONIMO_HOME/var/tmp. In turn, the java property "java.io.tmpdir" is set to GERONIMO_TMPDIR (this is GERONIMO_HOME/var/tmp). Shouldn't GERONIMO_TMPDIR instead be set to a value provided by GERONIMO_SERVER/var/tmp ?
-- affected scripts: client, deploy, geronimo, internalLauncher, jaxws-tools
-- This can be argued to whether or not all Geronimo Server Instance should share a common temp directory.
# Reported in GERONIMO-6174 - The java properties karaf.home and karaf.base are both being set to GERONIMO_HOME. When instead karaf.base should be set to a value held by GERONIMO_SERVER.
-- affected scripts: client, geronimo, internalLauncher
-- see resulting errors and reasoning in GERONIMO-6174
# Not Reported - The java property java.util.logging.config.file is being set to GERONIMO_HOME/etc/java.util.logging.properties . It is intended to be an empty configuration file. This only causes a problem when using instances if GERONIMO_HOME/etc does not exist (it would not exist if GERONIMO_SERVER/etc is intended to be used).
-- affected scripts: client, geronimo, internalLauncher
# Not Reported - Logging startup output to GERONIMO_HOME/var/log/geronimo.out - Obviously if multiple instances are being started, this should be GERONIMO_SERVER/var/log/geronimo.out . Any error is silent if var/log/geronimo.out does not exist.
-- affected scripts: geronimo
# Not Reported - The register-service script does a grep and awk on GERONIMO_HOME/var/config/config-substitutions.properties to discover the portOffset . Obviously this will not work for multiple instances
-- The register-service script does not take multiple instances into consideration at all
-- affected scripts: register-service


Solution:

- Create a new shell variable GERONIMO_SERVER to hold the path location to the run-time server configuration, and leave GERONIMO_HOME to hold the path location to the Geronimo Installation Path.

Arguments:

- If GERONIMO_SERVER defaults to GERONIMO_HOME, then any installation not having multiple instances configured will not be affected.
- This will not resolve the multiple instance support issue in Geronimo, GERONIMO-6270, but having this support in the shell scripts will get Geronimo much closer.
- About half of the currently known issues (listed above) can be resolved with the addition of GERONIMO_SERVER as proposed.

The remaining currently known issues will be:
# GERONIMO-6174: the proper use of karaf.home versus karaf.base
# GERONIMO-6270 SnapshotConfigXMLBuilder using the org.apache.geronimo.server.dir/var directory
# GERONIMO-5987 and GERONIMO-6270: ActiveMQ using org.apache.geronimo.server.dir as the base for var rather than the current working directory the run-time server is in at startup
# GERONIMO-6175: The Geronimo Repository using org.apache.geronimo.server.dir instead of org.apache.geronimo.home.dir


--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (GERONIMO-6275) Defining and Using org.apache.geronimo.server.dir versus org.apache.geronimo.home.dir in shell scripts

Posted by "Russell E Glaue (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/GERONIMO-6275?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Russell E Glaue updated GERONIMO-6275:
--------------------------------------

    Attachment: geronimo-6275-procrun_service.patch

geronimo-6275-procrun_service.patch adds GERONIMO_SERVER to plugins/procrun/src/main/resources/bin/service_pr.bat

                
> Defining and Using org.apache.geronimo.server.dir versus org.apache.geronimo.home.dir in shell scripts
> ------------------------------------------------------------------------------------------------------
>
>                 Key: GERONIMO-6275
>                 URL: https://issues.apache.org/jira/browse/GERONIMO-6275
>             Project: Geronimo
>          Issue Type: Sub-task
>      Security Level: public(Regular issues) 
>          Components: startup/shutdown
>    Affects Versions: 3.0-beta-1
>         Environment: Linux x86, Red Hat Enterprise Linux Server release 5.4 (Tikanga); Java JDK1.6.0_25
>            Reporter: Russell E Glaue
>            Assignee: Russell E Glaue
>            Priority: Minor
>              Labels: geronimo
>         Attachments: geronimo-6275-procrun_service.patch, geronimo-6275.patch
>
>
> Related: GERONIMO-6270, GERONIMO-6175, GERONIMO-6174, GERONIMO-5987, GERONIMO-4229
> It would be easier to support multiple server instances of Geronimo if there is one shell variable that is used to reference the path on disk to the instance, proposed as GERONIMO_SERVER as opposed to the GERONIMO_HOME installation path. This issue tracks the discussion and modification of such a change.
> GERONIMO_SERVER defines:
> - GERONIMO_SERVER defaults to GERONIMO_HOME if no instances are specified
> - GERONIMO_SERVER is expanded to GERONIMO_HOME/GERONIMO_SERVER if GERONIMO_SERVER is a relative path
> - GERONIMO_SERVER defines org.apache.geronimo.server.dir
> In the java code there are the following properties:
> # org.apache.geronimo.home.dir - equivelant to GERONIMO_HOME shell variable
> # org.apache.geronimo.server.dir - proposed to be equivelant to GERONIMO_SERVER 
> The words "BASE" versus "HOME" appear a few times in the source. Once example is "karaf.home" and "karaf.base" properties. According to the code usage, it is aparant that these terms are assumed to mean these things:
> # HOME - path location on disk of read-only binaries and configuration
> # BASE - path location on disk of read-write configuration and data storage
> The term BASE is intended to point at a Geronimo Server Instance Base path. However, this has not been clearly defined, and has appeared to cause some misusage. Thus this and other issues lead to the removal of GERONIMO_BASE shell variable and org.apache.geronimo.base.dir java property in GERONIMO-4229 .
> Currently, to start a Geronimo Instance, the org.apache.geronimo.server.dir java property must be defined in the GERONIMO_OPTS variable. However, this prevents the Shell scripts from being able to know and use the path location to the Geronimo Server Instance.
> In particular, there are a few issues affected by a variable like this not being available.
> # Reported in GERONIMO-6174 - GERONIMO_TMPDIR is set in the shell/bat scripts as GERONIMO_HOME/var/tmp. In turn, the java property "java.io.tmpdir" is set to GERONIMO_TMPDIR (this is GERONIMO_HOME/var/tmp). Shouldn't GERONIMO_TMPDIR instead be set to a value provided by GERONIMO_SERVER/var/tmp ?
> -- affected scripts: client, deploy, geronimo, internalLauncher, jaxws-tools
> -- This can be argued to whether or not all Geronimo Server Instance should share a common temp directory.
> # Reported in GERONIMO-6174 - The java properties karaf.home and karaf.base are both being set to GERONIMO_HOME. When instead karaf.base should be set to a value held by GERONIMO_SERVER.
> -- affected scripts: client, geronimo, internalLauncher
> -- see resulting errors and reasoning in GERONIMO-6174
> # Not Reported - The java property java.util.logging.config.file is being set to GERONIMO_HOME/etc/java.util.logging.properties . It is intended to be an empty configuration file. This only causes a problem when using instances if GERONIMO_HOME/etc does not exist (it would not exist if GERONIMO_SERVER/etc is intended to be used).
> -- affected scripts: client, geronimo, internalLauncher
> # Not Reported - Logging startup output to GERONIMO_HOME/var/log/geronimo.out - Obviously if multiple instances are being started, this should be GERONIMO_SERVER/var/log/geronimo.out . Any error is silent if var/log/geronimo.out does not exist.
> -- affected scripts: geronimo
> # Not Reported - The register-service script does a grep and awk on GERONIMO_HOME/var/config/config-substitutions.properties to discover the portOffset . Obviously this will not work for multiple instances
> -- The register-service script does not take multiple instances into consideration at all
> -- affected scripts: register-service
> Solution:
> - Create a new shell variable GERONIMO_SERVER to hold the path location to the run-time server configuration, and leave GERONIMO_HOME to hold the path location to the Geronimo Installation Path.
> Arguments:
> - If GERONIMO_SERVER defaults to GERONIMO_HOME, then any installation not having multiple instances configured will not be affected.
> - This will not resolve the multiple instance support issue in Geronimo, GERONIMO-6270, but having this support in the shell scripts will get Geronimo much closer.
> - About half of the currently known issues (listed above) can be resolved with the addition of GERONIMO_SERVER as proposed.
> The remaining currently known issues will be:
> # GERONIMO-6174: the proper use of karaf.home versus karaf.base
> # GERONIMO-6270 SnapshotConfigXMLBuilder using the org.apache.geronimo.server.dir/var directory
> # GERONIMO-5987 and GERONIMO-6270: ActiveMQ using org.apache.geronimo.server.dir as the base for var rather than the current working directory the run-time server is in at startup
> # GERONIMO-6175: The Geronimo Repository using org.apache.geronimo.server.dir instead of org.apache.geronimo.home.dir

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (GERONIMO-6275) Defining and Using org.apache.geronimo.server.dir versus org.apache.geronimo.home.dir in shell scripts

Posted by "Russell E Glaue (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/GERONIMO-6275?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13211983#comment-13211983 ] 

Russell E Glaue commented on GERONIMO-6275:
-------------------------------------------

Since were now setting GERONIMO_TMPDIR in setjavaenv.sh, we also need to make sure that is checked in the "# For Cygwin, ensure paths are in UNIX format before anything is touched" section - in the scripts geronimo, client and deploy. Batch files are okay since they do not account for Cygwin.

Otherwise, all of my testing is successful with the new changes you committed.

Change...
{noformat:borderStyle=solid}
# For Cygwin, ensure paths are in UNIX format before anything is touched
if $cygwin; then
  [ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
  [ -n "$JRE_HOME" ] && JRE_HOME=`cygpath --unix "$JRE_HOME"`
  [ -n "$JDB_SRCPATH" ] && JDB_SRCPATH=`cygpath --unix "$JDB_SRCPATH"`
  [ -n "$GERONIMO_HOME" ] && GERONIMO_HOME=`cygpath --unix "$GERONIMO_HOME"`
  [ -n "$GERONIMO_SERVER" ] && GERONIMO_SERVER=`cygpath --unix "$GERONIMO_SERVER"`
fi
{noformat}

To...
{noformat:borderStyle=solid}
# For Cygwin, ensure paths are in UNIX format before anything is touched
if $cygwin; then
  [ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
  [ -n "$JRE_HOME" ] && JRE_HOME=`cygpath --unix "$JRE_HOME"`
  [ -n "$JDB_SRCPATH" ] && JDB_SRCPATH=`cygpath --unix "$JDB_SRCPATH"`
  [ -n "$GERONIMO_HOME" ] && GERONIMO_HOME=`cygpath --unix "$GERONIMO_HOME"`
  [ -n "$GERONIMO_SERVER" ] && GERONIMO_SERVER=`cygpath --unix "$GERONIMO_SERVER"`
  [ -n "$GERONIMO_TMPDIR" ] && GERONIMO_TMPDIR=`cygpath --unix "$GERONIMO_TMPDIR"`
fi
{noformat}

                
> Defining and Using org.apache.geronimo.server.dir versus org.apache.geronimo.home.dir in shell scripts
> ------------------------------------------------------------------------------------------------------
>
>                 Key: GERONIMO-6275
>                 URL: https://issues.apache.org/jira/browse/GERONIMO-6275
>             Project: Geronimo
>          Issue Type: Sub-task
>      Security Level: public(Regular issues) 
>          Components: startup/shutdown
>    Affects Versions: 3.0-beta-1
>         Environment: Linux x86, Red Hat Enterprise Linux Server release 5.4 (Tikanga); Java JDK1.6.0_25
>            Reporter: Russell E Glaue
>            Assignee: Russell E Glaue
>            Priority: Minor
>              Labels: geronimo
>         Attachments: geronimo-6275-B-comments.patch, geronimo-6275-procrun_service.patch, geronimo-6275.patch
>
>
> Related: GERONIMO-6270, GERONIMO-6175, GERONIMO-6174, GERONIMO-5987, GERONIMO-4229
> It would be easier to support multiple server instances of Geronimo if there is one shell variable that is used to reference the path on disk to the instance, proposed as GERONIMO_SERVER as opposed to the GERONIMO_HOME installation path. This issue tracks the discussion and modification of such a change.
> GERONIMO_SERVER defines:
> - GERONIMO_SERVER defaults to GERONIMO_HOME if no instances are specified
> - GERONIMO_SERVER is expanded to GERONIMO_HOME/GERONIMO_SERVER if GERONIMO_SERVER is a relative path
> - GERONIMO_SERVER defines org.apache.geronimo.server.dir
> In the java code there are the following properties:
> # org.apache.geronimo.home.dir - equivelant to GERONIMO_HOME shell variable
> # org.apache.geronimo.server.dir - proposed to be equivelant to GERONIMO_SERVER 
> The words "BASE" versus "HOME" appear a few times in the source. Once example is "karaf.home" and "karaf.base" properties. According to the code usage, it is aparant that these terms are assumed to mean these things:
> # HOME - path location on disk of read-only binaries and configuration
> # BASE - path location on disk of read-write configuration and data storage
> The term BASE is intended to point at a Geronimo Server Instance Base path. However, this has not been clearly defined, and has appeared to cause some misusage. Thus this and other issues lead to the removal of GERONIMO_BASE shell variable and org.apache.geronimo.base.dir java property in GERONIMO-4229 .
> Currently, to start a Geronimo Instance, the org.apache.geronimo.server.dir java property must be defined in the GERONIMO_OPTS variable. However, this prevents the Shell scripts from being able to know and use the path location to the Geronimo Server Instance.
> In particular, there are a few issues affected by a variable like this not being available.
> # Reported in GERONIMO-6174 - GERONIMO_TMPDIR is set in the shell/bat scripts as GERONIMO_HOME/var/tmp. In turn, the java property "java.io.tmpdir" is set to GERONIMO_TMPDIR (this is GERONIMO_HOME/var/tmp). Shouldn't GERONIMO_TMPDIR instead be set to a value provided by GERONIMO_SERVER/var/tmp ?
> -- affected scripts: client, deploy, geronimo, internalLauncher, jaxws-tools
> -- This can be argued to whether or not all Geronimo Server Instance should share a common temp directory.
> # Reported in GERONIMO-6174 - The java properties karaf.home and karaf.base are both being set to GERONIMO_HOME. When instead karaf.base should be set to a value held by GERONIMO_SERVER.
> -- affected scripts: client, geronimo, internalLauncher
> -- see resulting errors and reasoning in GERONIMO-6174
> # Not Reported - The java property java.util.logging.config.file is being set to GERONIMO_HOME/etc/java.util.logging.properties . It is intended to be an empty configuration file. This only causes a problem when using instances if GERONIMO_HOME/etc does not exist (it would not exist if GERONIMO_SERVER/etc is intended to be used).
> -- affected scripts: client, geronimo, internalLauncher
> # Not Reported - Logging startup output to GERONIMO_HOME/var/log/geronimo.out - Obviously if multiple instances are being started, this should be GERONIMO_SERVER/var/log/geronimo.out . Any error is silent if var/log/geronimo.out does not exist.
> -- affected scripts: geronimo
> # Not Reported - The register-service script does a grep and awk on GERONIMO_HOME/var/config/config-substitutions.properties to discover the portOffset . Obviously this will not work for multiple instances
> -- The register-service script does not take multiple instances into consideration at all
> -- affected scripts: register-service
> Solution:
> - Create a new shell variable GERONIMO_SERVER to hold the path location to the run-time server configuration, and leave GERONIMO_HOME to hold the path location to the Geronimo Installation Path.
> Arguments:
> - If GERONIMO_SERVER defaults to GERONIMO_HOME, then any installation not having multiple instances configured will not be affected.
> - This will not resolve the multiple instance support issue in Geronimo, GERONIMO-6270, but having this support in the shell scripts will get Geronimo much closer.
> - About half of the currently known issues (listed above) can be resolved with the addition of GERONIMO_SERVER as proposed.
> The remaining currently known issues will be:
> # GERONIMO-6174: the proper use of karaf.home versus karaf.base
> # GERONIMO-6270 SnapshotConfigXMLBuilder using the org.apache.geronimo.server.dir/var directory
> # GERONIMO-5987 and GERONIMO-6270: ActiveMQ using org.apache.geronimo.server.dir as the base for var rather than the current working directory the run-time server is in at startup
> # GERONIMO-6175: The Geronimo Repository using org.apache.geronimo.server.dir instead of org.apache.geronimo.home.dir

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (GERONIMO-6275) Defining and Using org.apache.geronimo.server.dir versus org.apache.geronimo.home.dir in shell scripts

Posted by "Russell E Glaue (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/GERONIMO-6275?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Russell E Glaue updated GERONIMO-6275:
--------------------------------------

    Attachment: geronimo-6275.patch

Modifies startup shell scripts to use new variable GERONIMO_SERVER. And use of GERONIMO_HOME is replaced with GERONIMO_SERVER when the path needed is intended to "hold the configuration and data for a Geronimo instance."
                
> Defining and Using org.apache.geronimo.server.dir versus org.apache.geronimo.home.dir in shell scripts
> ------------------------------------------------------------------------------------------------------
>
>                 Key: GERONIMO-6275
>                 URL: https://issues.apache.org/jira/browse/GERONIMO-6275
>             Project: Geronimo
>          Issue Type: Sub-task
>      Security Level: public(Regular issues) 
>          Components: startup/shutdown
>    Affects Versions: 3.0-beta-1
>         Environment: Linux x86, Red Hat Enterprise Linux Server release 5.4 (Tikanga); Java JDK1.6.0_25
>            Reporter: Russell E Glaue
>            Assignee: Russell E Glaue
>            Priority: Minor
>              Labels: geronimo
>         Attachments: geronimo-6275.patch
>
>
> Related: GERONIMO-6270, GERONIMO-6175, GERONIMO-6174, GERONIMO-5987, GERONIMO-4229
> It would be easier to support multiple server instances of Geronimo if there is one shell variable that is used to reference the path on disk to the instance, proposed as GERONIMO_SERVER as opposed to the GERONIMO_HOME installation path. This issue tracks the discussion and modification of such a change.
> GERONIMO_SERVER defines:
> - GERONIMO_SERVER defaults to GERONIMO_HOME if no instances are specified
> - GERONIMO_SERVER is expanded to GERONIMO_HOME/GERONIMO_SERVER if GERONIMO_SERVER is a relative path
> - GERONIMO_SERVER defines org.apache.geronimo.server.dir
> In the java code there are the following properties:
> # org.apache.geronimo.home.dir - equivelant to GERONIMO_HOME shell variable
> # org.apache.geronimo.server.dir - proposed to be equivelant to GERONIMO_SERVER 
> The words "BASE" versus "HOME" appear a few times in the source. Once example is "karaf.home" and "karaf.base" properties. According to the code usage, it is aparant that these terms are assumed to mean these things:
> # HOME - path location on disk of read-only binaries and configuration
> # BASE - path location on disk of read-write configuration and data storage
> The term BASE is intended to point at a Geronimo Server Instance Base path. However, this has not been clearly defined, and has appeared to cause some misusage. Thus this and other issues lead to the removal of GERONIMO_BASE shell variable and org.apache.geronimo.base.dir java property in GERONIMO-4229 .
> Currently, to start a Geronimo Instance, the org.apache.geronimo.server.dir java property must be defined in the GERONIMO_OPTS variable. However, this prevents the Shell scripts from being able to know and use the path location to the Geronimo Server Instance.
> In particular, there are a few issues affected by a variable like this not being available.
> # Reported in GERONIMO-6174 - GERONIMO_TMPDIR is set in the shell/bat scripts as GERONIMO_HOME/var/tmp. In turn, the java property "java.io.tmpdir" is set to GERONIMO_TMPDIR (this is GERONIMO_HOME/var/tmp). Shouldn't GERONIMO_TMPDIR instead be set to a value provided by GERONIMO_SERVER/var/tmp ?
> -- affected scripts: client, deploy, geronimo, internalLauncher, jaxws-tools
> -- This can be argued to whether or not all Geronimo Server Instance should share a common temp directory.
> # Reported in GERONIMO-6174 - The java properties karaf.home and karaf.base are both being set to GERONIMO_HOME. When instead karaf.base should be set to a value held by GERONIMO_SERVER.
> -- affected scripts: client, geronimo, internalLauncher
> -- see resulting errors and reasoning in GERONIMO-6174
> # Not Reported - The java property java.util.logging.config.file is being set to GERONIMO_HOME/etc/java.util.logging.properties . It is intended to be an empty configuration file. This only causes a problem when using instances if GERONIMO_HOME/etc does not exist (it would not exist if GERONIMO_SERVER/etc is intended to be used).
> -- affected scripts: client, geronimo, internalLauncher
> # Not Reported - Logging startup output to GERONIMO_HOME/var/log/geronimo.out - Obviously if multiple instances are being started, this should be GERONIMO_SERVER/var/log/geronimo.out . Any error is silent if var/log/geronimo.out does not exist.
> -- affected scripts: geronimo
> # Not Reported - The register-service script does a grep and awk on GERONIMO_HOME/var/config/config-substitutions.properties to discover the portOffset . Obviously this will not work for multiple instances
> -- The register-service script does not take multiple instances into consideration at all
> -- affected scripts: register-service
> Solution:
> - Create a new shell variable GERONIMO_SERVER to hold the path location to the run-time server configuration, and leave GERONIMO_HOME to hold the path location to the Geronimo Installation Path.
> Arguments:
> - If GERONIMO_SERVER defaults to GERONIMO_HOME, then any installation not having multiple instances configured will not be affected.
> - This will not resolve the multiple instance support issue in Geronimo, GERONIMO-6270, but having this support in the shell scripts will get Geronimo much closer.
> - About half of the currently known issues (listed above) can be resolved with the addition of GERONIMO_SERVER as proposed.
> The remaining currently known issues will be:
> # GERONIMO-6174: the proper use of karaf.home versus karaf.base
> # GERONIMO-6270 SnapshotConfigXMLBuilder using the org.apache.geronimo.server.dir/var directory
> # GERONIMO-5987 and GERONIMO-6270: ActiveMQ using org.apache.geronimo.server.dir as the base for var rather than the current working directory the run-time server is in at startup
> # GERONIMO-6175: The Geronimo Repository using org.apache.geronimo.server.dir instead of org.apache.geronimo.home.dir

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (GERONIMO-6275) Defining and Using org.apache.geronimo.server.dir versus org.apache.geronimo.home.dir in shell scripts

Posted by "Russell E Glaue (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/GERONIMO-6275?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Russell E Glaue updated GERONIMO-6275:
--------------------------------------

    Attachment: geronimo-6275-B-comments.patch

geronimo-6275-B-comments.patch
This patch file adds comments to the shell scripts explaining the purpose of setjavaenv.sh/bat and how GERONIMO_SERVER and GERONIMO_TMPDIR are set there.
Also, a few minor corrections to comments.
This patch includes changes for service_pr.bat
                
> Defining and Using org.apache.geronimo.server.dir versus org.apache.geronimo.home.dir in shell scripts
> ------------------------------------------------------------------------------------------------------
>
>                 Key: GERONIMO-6275
>                 URL: https://issues.apache.org/jira/browse/GERONIMO-6275
>             Project: Geronimo
>          Issue Type: Sub-task
>      Security Level: public(Regular issues) 
>          Components: startup/shutdown
>    Affects Versions: 3.0-beta-1
>         Environment: Linux x86, Red Hat Enterprise Linux Server release 5.4 (Tikanga); Java JDK1.6.0_25
>            Reporter: Russell E Glaue
>            Assignee: Russell E Glaue
>            Priority: Minor
>              Labels: geronimo
>         Attachments: geronimo-6275-B-comments.patch, geronimo-6275-procrun_service.patch, geronimo-6275.patch
>
>
> Related: GERONIMO-6270, GERONIMO-6175, GERONIMO-6174, GERONIMO-5987, GERONIMO-4229
> It would be easier to support multiple server instances of Geronimo if there is one shell variable that is used to reference the path on disk to the instance, proposed as GERONIMO_SERVER as opposed to the GERONIMO_HOME installation path. This issue tracks the discussion and modification of such a change.
> GERONIMO_SERVER defines:
> - GERONIMO_SERVER defaults to GERONIMO_HOME if no instances are specified
> - GERONIMO_SERVER is expanded to GERONIMO_HOME/GERONIMO_SERVER if GERONIMO_SERVER is a relative path
> - GERONIMO_SERVER defines org.apache.geronimo.server.dir
> In the java code there are the following properties:
> # org.apache.geronimo.home.dir - equivelant to GERONIMO_HOME shell variable
> # org.apache.geronimo.server.dir - proposed to be equivelant to GERONIMO_SERVER 
> The words "BASE" versus "HOME" appear a few times in the source. Once example is "karaf.home" and "karaf.base" properties. According to the code usage, it is aparant that these terms are assumed to mean these things:
> # HOME - path location on disk of read-only binaries and configuration
> # BASE - path location on disk of read-write configuration and data storage
> The term BASE is intended to point at a Geronimo Server Instance Base path. However, this has not been clearly defined, and has appeared to cause some misusage. Thus this and other issues lead to the removal of GERONIMO_BASE shell variable and org.apache.geronimo.base.dir java property in GERONIMO-4229 .
> Currently, to start a Geronimo Instance, the org.apache.geronimo.server.dir java property must be defined in the GERONIMO_OPTS variable. However, this prevents the Shell scripts from being able to know and use the path location to the Geronimo Server Instance.
> In particular, there are a few issues affected by a variable like this not being available.
> # Reported in GERONIMO-6174 - GERONIMO_TMPDIR is set in the shell/bat scripts as GERONIMO_HOME/var/tmp. In turn, the java property "java.io.tmpdir" is set to GERONIMO_TMPDIR (this is GERONIMO_HOME/var/tmp). Shouldn't GERONIMO_TMPDIR instead be set to a value provided by GERONIMO_SERVER/var/tmp ?
> -- affected scripts: client, deploy, geronimo, internalLauncher, jaxws-tools
> -- This can be argued to whether or not all Geronimo Server Instance should share a common temp directory.
> # Reported in GERONIMO-6174 - The java properties karaf.home and karaf.base are both being set to GERONIMO_HOME. When instead karaf.base should be set to a value held by GERONIMO_SERVER.
> -- affected scripts: client, geronimo, internalLauncher
> -- see resulting errors and reasoning in GERONIMO-6174
> # Not Reported - The java property java.util.logging.config.file is being set to GERONIMO_HOME/etc/java.util.logging.properties . It is intended to be an empty configuration file. This only causes a problem when using instances if GERONIMO_HOME/etc does not exist (it would not exist if GERONIMO_SERVER/etc is intended to be used).
> -- affected scripts: client, geronimo, internalLauncher
> # Not Reported - Logging startup output to GERONIMO_HOME/var/log/geronimo.out - Obviously if multiple instances are being started, this should be GERONIMO_SERVER/var/log/geronimo.out . Any error is silent if var/log/geronimo.out does not exist.
> -- affected scripts: geronimo
> # Not Reported - The register-service script does a grep and awk on GERONIMO_HOME/var/config/config-substitutions.properties to discover the portOffset . Obviously this will not work for multiple instances
> -- The register-service script does not take multiple instances into consideration at all
> -- affected scripts: register-service
> Solution:
> - Create a new shell variable GERONIMO_SERVER to hold the path location to the run-time server configuration, and leave GERONIMO_HOME to hold the path location to the Geronimo Installation Path.
> Arguments:
> - If GERONIMO_SERVER defaults to GERONIMO_HOME, then any installation not having multiple instances configured will not be affected.
> - This will not resolve the multiple instance support issue in Geronimo, GERONIMO-6270, but having this support in the shell scripts will get Geronimo much closer.
> - About half of the currently known issues (listed above) can be resolved with the addition of GERONIMO_SERVER as proposed.
> The remaining currently known issues will be:
> # GERONIMO-6174: the proper use of karaf.home versus karaf.base
> # GERONIMO-6270 SnapshotConfigXMLBuilder using the org.apache.geronimo.server.dir/var directory
> # GERONIMO-5987 and GERONIMO-6270: ActiveMQ using org.apache.geronimo.server.dir as the base for var rather than the current working directory the run-time server is in at startup
> # GERONIMO-6175: The Geronimo Repository using org.apache.geronimo.server.dir instead of org.apache.geronimo.home.dir

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (GERONIMO-6275) Defining and Using org.apache.geronimo.server.dir versus org.apache.geronimo.home.dir in shell scripts

Posted by "Russell E Glaue (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/GERONIMO-6275?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13211874#comment-13211874 ] 

Russell E Glaue commented on GERONIMO-6275:
-------------------------------------------

Yes, I agree with what you have determined. I will help you test, at least the unix scripts, once committed.

-RG
                
> Defining and Using org.apache.geronimo.server.dir versus org.apache.geronimo.home.dir in shell scripts
> ------------------------------------------------------------------------------------------------------
>
>                 Key: GERONIMO-6275
>                 URL: https://issues.apache.org/jira/browse/GERONIMO-6275
>             Project: Geronimo
>          Issue Type: Sub-task
>      Security Level: public(Regular issues) 
>          Components: startup/shutdown
>    Affects Versions: 3.0-beta-1
>         Environment: Linux x86, Red Hat Enterprise Linux Server release 5.4 (Tikanga); Java JDK1.6.0_25
>            Reporter: Russell E Glaue
>            Assignee: Russell E Glaue
>            Priority: Minor
>              Labels: geronimo
>         Attachments: geronimo-6275-procrun_service.patch, geronimo-6275.patch
>
>
> Related: GERONIMO-6270, GERONIMO-6175, GERONIMO-6174, GERONIMO-5987, GERONIMO-4229
> It would be easier to support multiple server instances of Geronimo if there is one shell variable that is used to reference the path on disk to the instance, proposed as GERONIMO_SERVER as opposed to the GERONIMO_HOME installation path. This issue tracks the discussion and modification of such a change.
> GERONIMO_SERVER defines:
> - GERONIMO_SERVER defaults to GERONIMO_HOME if no instances are specified
> - GERONIMO_SERVER is expanded to GERONIMO_HOME/GERONIMO_SERVER if GERONIMO_SERVER is a relative path
> - GERONIMO_SERVER defines org.apache.geronimo.server.dir
> In the java code there are the following properties:
> # org.apache.geronimo.home.dir - equivelant to GERONIMO_HOME shell variable
> # org.apache.geronimo.server.dir - proposed to be equivelant to GERONIMO_SERVER 
> The words "BASE" versus "HOME" appear a few times in the source. Once example is "karaf.home" and "karaf.base" properties. According to the code usage, it is aparant that these terms are assumed to mean these things:
> # HOME - path location on disk of read-only binaries and configuration
> # BASE - path location on disk of read-write configuration and data storage
> The term BASE is intended to point at a Geronimo Server Instance Base path. However, this has not been clearly defined, and has appeared to cause some misusage. Thus this and other issues lead to the removal of GERONIMO_BASE shell variable and org.apache.geronimo.base.dir java property in GERONIMO-4229 .
> Currently, to start a Geronimo Instance, the org.apache.geronimo.server.dir java property must be defined in the GERONIMO_OPTS variable. However, this prevents the Shell scripts from being able to know and use the path location to the Geronimo Server Instance.
> In particular, there are a few issues affected by a variable like this not being available.
> # Reported in GERONIMO-6174 - GERONIMO_TMPDIR is set in the shell/bat scripts as GERONIMO_HOME/var/tmp. In turn, the java property "java.io.tmpdir" is set to GERONIMO_TMPDIR (this is GERONIMO_HOME/var/tmp). Shouldn't GERONIMO_TMPDIR instead be set to a value provided by GERONIMO_SERVER/var/tmp ?
> -- affected scripts: client, deploy, geronimo, internalLauncher, jaxws-tools
> -- This can be argued to whether or not all Geronimo Server Instance should share a common temp directory.
> # Reported in GERONIMO-6174 - The java properties karaf.home and karaf.base are both being set to GERONIMO_HOME. When instead karaf.base should be set to a value held by GERONIMO_SERVER.
> -- affected scripts: client, geronimo, internalLauncher
> -- see resulting errors and reasoning in GERONIMO-6174
> # Not Reported - The java property java.util.logging.config.file is being set to GERONIMO_HOME/etc/java.util.logging.properties . It is intended to be an empty configuration file. This only causes a problem when using instances if GERONIMO_HOME/etc does not exist (it would not exist if GERONIMO_SERVER/etc is intended to be used).
> -- affected scripts: client, geronimo, internalLauncher
> # Not Reported - Logging startup output to GERONIMO_HOME/var/log/geronimo.out - Obviously if multiple instances are being started, this should be GERONIMO_SERVER/var/log/geronimo.out . Any error is silent if var/log/geronimo.out does not exist.
> -- affected scripts: geronimo
> # Not Reported - The register-service script does a grep and awk on GERONIMO_HOME/var/config/config-substitutions.properties to discover the portOffset . Obviously this will not work for multiple instances
> -- The register-service script does not take multiple instances into consideration at all
> -- affected scripts: register-service
> Solution:
> - Create a new shell variable GERONIMO_SERVER to hold the path location to the run-time server configuration, and leave GERONIMO_HOME to hold the path location to the Geronimo Installation Path.
> Arguments:
> - If GERONIMO_SERVER defaults to GERONIMO_HOME, then any installation not having multiple instances configured will not be affected.
> - This will not resolve the multiple instance support issue in Geronimo, GERONIMO-6270, but having this support in the shell scripts will get Geronimo much closer.
> - About half of the currently known issues (listed above) can be resolved with the addition of GERONIMO_SERVER as proposed.
> The remaining currently known issues will be:
> # GERONIMO-6174: the proper use of karaf.home versus karaf.base
> # GERONIMO-6270 SnapshotConfigXMLBuilder using the org.apache.geronimo.server.dir/var directory
> # GERONIMO-5987 and GERONIMO-6270: ActiveMQ using org.apache.geronimo.server.dir as the base for var rather than the current working directory the run-time server is in at startup
> # GERONIMO-6175: The Geronimo Repository using org.apache.geronimo.server.dir instead of org.apache.geronimo.home.dir

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Resolved] (GERONIMO-6275) Defining and Using org.apache.geronimo.server.dir versus org.apache.geronimo.home.dir in shell scripts

Posted by "Forrest Xia (Resolved) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/GERONIMO-6275?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Forrest Xia resolved GERONIMO-6275.
-----------------------------------

       Resolution: Fixed
    Fix Version/s: 3.0-beta-2
                   3.0

patch applied, so close this jira. 
                
> Defining and Using org.apache.geronimo.server.dir versus org.apache.geronimo.home.dir in shell scripts
> ------------------------------------------------------------------------------------------------------
>
>                 Key: GERONIMO-6275
>                 URL: https://issues.apache.org/jira/browse/GERONIMO-6275
>             Project: Geronimo
>          Issue Type: Sub-task
>      Security Level: public(Regular issues) 
>          Components: startup/shutdown
>    Affects Versions: 3.0-beta-1
>         Environment: Linux x86, Red Hat Enterprise Linux Server release 5.4 (Tikanga); Java JDK1.6.0_25
>            Reporter: Russell E Glaue
>            Assignee: Russell E Glaue
>            Priority: Minor
>              Labels: geronimo
>             Fix For: 3.0, 3.0-beta-2
>
>         Attachments: geronimo-6275-B-comments-cygwin-procrun.patch, geronimo-6275-B-comments.patch, geronimo-6275-procrun_service.patch, geronimo-6275.patch
>
>
> Related: GERONIMO-6270, GERONIMO-6175, GERONIMO-6174, GERONIMO-5987, GERONIMO-4229
> It would be easier to support multiple server instances of Geronimo if there is one shell variable that is used to reference the path on disk to the instance, proposed as GERONIMO_SERVER as opposed to the GERONIMO_HOME installation path. This issue tracks the discussion and modification of such a change.
> GERONIMO_SERVER defines:
> - GERONIMO_SERVER defaults to GERONIMO_HOME if no instances are specified
> - GERONIMO_SERVER is expanded to GERONIMO_HOME/GERONIMO_SERVER if GERONIMO_SERVER is a relative path
> - GERONIMO_SERVER defines org.apache.geronimo.server.dir
> In the java code there are the following properties:
> # org.apache.geronimo.home.dir - equivelant to GERONIMO_HOME shell variable
> # org.apache.geronimo.server.dir - proposed to be equivelant to GERONIMO_SERVER 
> The words "BASE" versus "HOME" appear a few times in the source. Once example is "karaf.home" and "karaf.base" properties. According to the code usage, it is aparant that these terms are assumed to mean these things:
> # HOME - path location on disk of read-only binaries and configuration
> # BASE - path location on disk of read-write configuration and data storage
> The term BASE is intended to point at a Geronimo Server Instance Base path. However, this has not been clearly defined, and has appeared to cause some misusage. Thus this and other issues lead to the removal of GERONIMO_BASE shell variable and org.apache.geronimo.base.dir java property in GERONIMO-4229 .
> Currently, to start a Geronimo Instance, the org.apache.geronimo.server.dir java property must be defined in the GERONIMO_OPTS variable. However, this prevents the Shell scripts from being able to know and use the path location to the Geronimo Server Instance.
> In particular, there are a few issues affected by a variable like this not being available.
> # Reported in GERONIMO-6174 - GERONIMO_TMPDIR is set in the shell/bat scripts as GERONIMO_HOME/var/tmp. In turn, the java property "java.io.tmpdir" is set to GERONIMO_TMPDIR (this is GERONIMO_HOME/var/tmp). Shouldn't GERONIMO_TMPDIR instead be set to a value provided by GERONIMO_SERVER/var/tmp ?
> -- affected scripts: client, deploy, geronimo, internalLauncher, jaxws-tools
> -- This can be argued to whether or not all Geronimo Server Instance should share a common temp directory.
> # Reported in GERONIMO-6174 - The java properties karaf.home and karaf.base are both being set to GERONIMO_HOME. When instead karaf.base should be set to a value held by GERONIMO_SERVER.
> -- affected scripts: client, geronimo, internalLauncher
> -- see resulting errors and reasoning in GERONIMO-6174
> # Not Reported - The java property java.util.logging.config.file is being set to GERONIMO_HOME/etc/java.util.logging.properties . It is intended to be an empty configuration file. This only causes a problem when using instances if GERONIMO_HOME/etc does not exist (it would not exist if GERONIMO_SERVER/etc is intended to be used).
> -- affected scripts: client, geronimo, internalLauncher
> # Not Reported - Logging startup output to GERONIMO_HOME/var/log/geronimo.out - Obviously if multiple instances are being started, this should be GERONIMO_SERVER/var/log/geronimo.out . Any error is silent if var/log/geronimo.out does not exist.
> -- affected scripts: geronimo
> # Not Reported - The register-service script does a grep and awk on GERONIMO_HOME/var/config/config-substitutions.properties to discover the portOffset . Obviously this will not work for multiple instances
> -- The register-service script does not take multiple instances into consideration at all
> -- affected scripts: register-service
> Solution:
> - Create a new shell variable GERONIMO_SERVER to hold the path location to the run-time server configuration, and leave GERONIMO_HOME to hold the path location to the Geronimo Installation Path.
> Arguments:
> - If GERONIMO_SERVER defaults to GERONIMO_HOME, then any installation not having multiple instances configured will not be affected.
> - This will not resolve the multiple instance support issue in Geronimo, GERONIMO-6270, but having this support in the shell scripts will get Geronimo much closer.
> - About half of the currently known issues (listed above) can be resolved with the addition of GERONIMO_SERVER as proposed.
> The remaining currently known issues will be:
> # GERONIMO-6174: the proper use of karaf.home versus karaf.base
> # GERONIMO-6270 SnapshotConfigXMLBuilder using the org.apache.geronimo.server.dir/var directory
> # GERONIMO-5987 and GERONIMO-6270: ActiveMQ using org.apache.geronimo.server.dir as the base for var rather than the current working directory the run-time server is in at startup
> # GERONIMO-6175: The Geronimo Repository using org.apache.geronimo.server.dir instead of org.apache.geronimo.home.dir

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (GERONIMO-6275) Defining and Using org.apache.geronimo.server.dir versus org.apache.geronimo.home.dir in shell scripts

Posted by "Russell E Glaue (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/GERONIMO-6275?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13211930#comment-13211930 ] 

Russell E Glaue commented on GERONIMO-6275:
-------------------------------------------

If we are going to put the resolution logic for GERONIMO_SERVER and GERONIMO_TMPDIR in setjavaenv script, I recommend we put in comments in the geronimo deploy client and setjavaenv scripts to note this and hopefully lower the possibility of misunderstanding - because the current comments say otherwise.

I will first test the changes you committed, and then submit a patch to suggest the comments that could be added.

                
> Defining and Using org.apache.geronimo.server.dir versus org.apache.geronimo.home.dir in shell scripts
> ------------------------------------------------------------------------------------------------------
>
>                 Key: GERONIMO-6275
>                 URL: https://issues.apache.org/jira/browse/GERONIMO-6275
>             Project: Geronimo
>          Issue Type: Sub-task
>      Security Level: public(Regular issues) 
>          Components: startup/shutdown
>    Affects Versions: 3.0-beta-1
>         Environment: Linux x86, Red Hat Enterprise Linux Server release 5.4 (Tikanga); Java JDK1.6.0_25
>            Reporter: Russell E Glaue
>            Assignee: Russell E Glaue
>            Priority: Minor
>              Labels: geronimo
>         Attachments: geronimo-6275-procrun_service.patch, geronimo-6275.patch
>
>
> Related: GERONIMO-6270, GERONIMO-6175, GERONIMO-6174, GERONIMO-5987, GERONIMO-4229
> It would be easier to support multiple server instances of Geronimo if there is one shell variable that is used to reference the path on disk to the instance, proposed as GERONIMO_SERVER as opposed to the GERONIMO_HOME installation path. This issue tracks the discussion and modification of such a change.
> GERONIMO_SERVER defines:
> - GERONIMO_SERVER defaults to GERONIMO_HOME if no instances are specified
> - GERONIMO_SERVER is expanded to GERONIMO_HOME/GERONIMO_SERVER if GERONIMO_SERVER is a relative path
> - GERONIMO_SERVER defines org.apache.geronimo.server.dir
> In the java code there are the following properties:
> # org.apache.geronimo.home.dir - equivelant to GERONIMO_HOME shell variable
> # org.apache.geronimo.server.dir - proposed to be equivelant to GERONIMO_SERVER 
> The words "BASE" versus "HOME" appear a few times in the source. Once example is "karaf.home" and "karaf.base" properties. According to the code usage, it is aparant that these terms are assumed to mean these things:
> # HOME - path location on disk of read-only binaries and configuration
> # BASE - path location on disk of read-write configuration and data storage
> The term BASE is intended to point at a Geronimo Server Instance Base path. However, this has not been clearly defined, and has appeared to cause some misusage. Thus this and other issues lead to the removal of GERONIMO_BASE shell variable and org.apache.geronimo.base.dir java property in GERONIMO-4229 .
> Currently, to start a Geronimo Instance, the org.apache.geronimo.server.dir java property must be defined in the GERONIMO_OPTS variable. However, this prevents the Shell scripts from being able to know and use the path location to the Geronimo Server Instance.
> In particular, there are a few issues affected by a variable like this not being available.
> # Reported in GERONIMO-6174 - GERONIMO_TMPDIR is set in the shell/bat scripts as GERONIMO_HOME/var/tmp. In turn, the java property "java.io.tmpdir" is set to GERONIMO_TMPDIR (this is GERONIMO_HOME/var/tmp). Shouldn't GERONIMO_TMPDIR instead be set to a value provided by GERONIMO_SERVER/var/tmp ?
> -- affected scripts: client, deploy, geronimo, internalLauncher, jaxws-tools
> -- This can be argued to whether or not all Geronimo Server Instance should share a common temp directory.
> # Reported in GERONIMO-6174 - The java properties karaf.home and karaf.base are both being set to GERONIMO_HOME. When instead karaf.base should be set to a value held by GERONIMO_SERVER.
> -- affected scripts: client, geronimo, internalLauncher
> -- see resulting errors and reasoning in GERONIMO-6174
> # Not Reported - The java property java.util.logging.config.file is being set to GERONIMO_HOME/etc/java.util.logging.properties . It is intended to be an empty configuration file. This only causes a problem when using instances if GERONIMO_HOME/etc does not exist (it would not exist if GERONIMO_SERVER/etc is intended to be used).
> -- affected scripts: client, geronimo, internalLauncher
> # Not Reported - Logging startup output to GERONIMO_HOME/var/log/geronimo.out - Obviously if multiple instances are being started, this should be GERONIMO_SERVER/var/log/geronimo.out . Any error is silent if var/log/geronimo.out does not exist.
> -- affected scripts: geronimo
> # Not Reported - The register-service script does a grep and awk on GERONIMO_HOME/var/config/config-substitutions.properties to discover the portOffset . Obviously this will not work for multiple instances
> -- The register-service script does not take multiple instances into consideration at all
> -- affected scripts: register-service
> Solution:
> - Create a new shell variable GERONIMO_SERVER to hold the path location to the run-time server configuration, and leave GERONIMO_HOME to hold the path location to the Geronimo Installation Path.
> Arguments:
> - If GERONIMO_SERVER defaults to GERONIMO_HOME, then any installation not having multiple instances configured will not be affected.
> - This will not resolve the multiple instance support issue in Geronimo, GERONIMO-6270, but having this support in the shell scripts will get Geronimo much closer.
> - About half of the currently known issues (listed above) can be resolved with the addition of GERONIMO_SERVER as proposed.
> The remaining currently known issues will be:
> # GERONIMO-6174: the proper use of karaf.home versus karaf.base
> # GERONIMO-6270 SnapshotConfigXMLBuilder using the org.apache.geronimo.server.dir/var directory
> # GERONIMO-5987 and GERONIMO-6270: ActiveMQ using org.apache.geronimo.server.dir as the base for var rather than the current working directory the run-time server is in at startup
> # GERONIMO-6175: The Geronimo Repository using org.apache.geronimo.server.dir instead of org.apache.geronimo.home.dir

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Issue Comment Edited] (GERONIMO-6275) Defining and Using org.apache.geronimo.server.dir versus org.apache.geronimo.home.dir in shell scripts

Posted by "Russell E Glaue (Issue Comment Edited) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/GERONIMO-6275?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13211683#comment-13211683 ] 

Russell E Glaue edited comment on GERONIMO-6275 at 2/20/12 6:00 AM:
--------------------------------------------------------------------

The "# Resolve the full path to GERONIMO_SERVER" section is copied from the $PRG resolution logic just a dozen lines prior in the section titled "# resolve links - $0 may be a softlink".

I have concern that putting path resolution code in a file identified/named for java environment purposes (setjavaenv) could lead to confusion. Also, we would still be duplicating the "resolution" code since it is identical to the existing duplicated code that resolves GERONIMO_HOME in each of those same shell files (because I just copied it).

I hesitated in modifying existing code lines, so I went for the copy-and-paste. The ideal resolution is probably to move the $PRG/$GERONIMO_HOME resolution code into a function.

{noformat:borderStyle=solid}
RESOLVE_PATH=  # Global return variable for resolvePath()
resolvePath () {
  RESOLVE_PATH=""
  LPRG=$1
  [ ! -d $LPRG ] && return 1
  while [ -h "$LPRG" ]; do
    ls=`ls -ld "$LPRG"`
    link=`expr "$ls" : '.*-> \(.*\)$'`
    if expr "$link" : '/.*' > /dev/null; then
      LPRG="$link"
    else
      LPRG=`dirname "$LPRG"`/"$link"
    fi
  done
  RESOLVE_PATH="$LPRG"
  return 0
}

# resolve links - $0 may be a softlink
resolvePath "$0" && PRG="$RESOLVE_PATH"

# Get standard environment variables
PRGDIR=`dirname "$PRG"`

# Only set GERONIMO_HOME if not already set
[ -z "$GERONIMO_HOME" ] && GERONIMO_HOME=`cd "$PRGDIR/.." ; pwd`

# Set GERONIMO_SERVER if not already set, otherwise resolve the full path
if [ -z "$GERONIMO_SERVER" ] ; then
  GERONIMO_SERVER="$GERONIMO_HOME"
else
  ATTEMPTED_SERVER="$GERONIMO_SERVER"
  resolvePath `cd "$GERONIMO_HOME"; cd "$GERONIMO_SERVER" 2>/dev/null && pwd` && GERONIMO_SERVER="$RESOLVE_PATH"
  [ -z "$GERONIMO_SERVER" ] && echo "ERROR: GERONIMO_SERVER: $ATTEMPTED_SERVER not found!" && exit 1
fi
{noformat}

Unfortunately, bash functions cannot return strings, only an exit/return status in $?. So we would have to use a global variable. Anyone have a more efficient idea for doing this?

                
      was (Author: rglaue):
    The "# Resolve the full path to GERONIMO_SERVER" section is copied from the $PRG resolution logic just a dozen lines prior in the section titled "# resolve links - $0 may be a softlink".

I have concern that putting path resolution code in a file identified/named for java environment purposes (setjavaenv) could lead to confusion. Also, we would still be duplicating the "resolution" code since it is identical to the existing duplicated code that resolves GERONIMO_HOME in each of those same shell files (because I just copied it).

I hesitated in modifying existing code lines, so I went for the copy-and-paste. The ideal resolution is probably to move the $PRG/$GERONIMO_HOME resolution code into a function.

{noformat:borderStyle=solid}
RESOLVE_PATH=  # Global return variable for resolvePath()
resolvePath () {
  RESOLVE_PATH=""
  LPRG=$1
  [ ! -d $LPRG ] && return 1
  while [ -h "$LPRG" ]; do
    ls=`ls -ld "$LPRG"`
    link=`expr "$ls" : '.*-> \(.*\)$'`
    if expr "$link" : '/.*' > /dev/null; then
      LPRG="$link"
    else
      LPRG=`dirname "$LPRG"`/"$link"
    fi
  done
  RESOLVE_PATH="$LPRG"
  return 0
}

# resolve links - $0 may be a softlink
resolvePath "$0" && PRG="$RESOLVE_PATH"

# Get standard environment variables
PRGDIR=`dirname "$PRG"`

# Only set GERONIMO_HOME if not already set
[ -z "$GERONIMO_HOME" ] && GERONIMO_HOME=`cd "$PRGDIR/.." ; pwd`

# Set GERONIMO_SERVER if not already set, otherwise resolve the full path
if [ -z "$GERONIMO_SERVER" ] ; then
  GERONIMO_SERVER="$GERONIMO_HOME"
else
  ATTEMPTED_SERVER="$GERONIMO_SERVER"
  resolvePath `cd "$GERONIMO_HOME"; cd $GERONIMO_SERVER 2>/dev/null && pwd` && GERONIMO_SERVER="$RESOLVE_PATH"
  [ -z "$GERONIMO_SERVER" ] && echo "ERROR: GERONIMO_SERVER: $ATTEMPTED_SERVER not found!" && exit 1
fi
{noformat}

Unfortunately, bash functions cannot return strings, only an exit/return status in $?. So we would have to use a global variable. Anyone have a more efficient idea for doing this?

                  
> Defining and Using org.apache.geronimo.server.dir versus org.apache.geronimo.home.dir in shell scripts
> ------------------------------------------------------------------------------------------------------
>
>                 Key: GERONIMO-6275
>                 URL: https://issues.apache.org/jira/browse/GERONIMO-6275
>             Project: Geronimo
>          Issue Type: Sub-task
>      Security Level: public(Regular issues) 
>          Components: startup/shutdown
>    Affects Versions: 3.0-beta-1
>         Environment: Linux x86, Red Hat Enterprise Linux Server release 5.4 (Tikanga); Java JDK1.6.0_25
>            Reporter: Russell E Glaue
>            Assignee: Russell E Glaue
>            Priority: Minor
>              Labels: geronimo
>         Attachments: geronimo-6275-procrun_service.patch, geronimo-6275.patch
>
>
> Related: GERONIMO-6270, GERONIMO-6175, GERONIMO-6174, GERONIMO-5987, GERONIMO-4229
> It would be easier to support multiple server instances of Geronimo if there is one shell variable that is used to reference the path on disk to the instance, proposed as GERONIMO_SERVER as opposed to the GERONIMO_HOME installation path. This issue tracks the discussion and modification of such a change.
> GERONIMO_SERVER defines:
> - GERONIMO_SERVER defaults to GERONIMO_HOME if no instances are specified
> - GERONIMO_SERVER is expanded to GERONIMO_HOME/GERONIMO_SERVER if GERONIMO_SERVER is a relative path
> - GERONIMO_SERVER defines org.apache.geronimo.server.dir
> In the java code there are the following properties:
> # org.apache.geronimo.home.dir - equivelant to GERONIMO_HOME shell variable
> # org.apache.geronimo.server.dir - proposed to be equivelant to GERONIMO_SERVER 
> The words "BASE" versus "HOME" appear a few times in the source. Once example is "karaf.home" and "karaf.base" properties. According to the code usage, it is aparant that these terms are assumed to mean these things:
> # HOME - path location on disk of read-only binaries and configuration
> # BASE - path location on disk of read-write configuration and data storage
> The term BASE is intended to point at a Geronimo Server Instance Base path. However, this has not been clearly defined, and has appeared to cause some misusage. Thus this and other issues lead to the removal of GERONIMO_BASE shell variable and org.apache.geronimo.base.dir java property in GERONIMO-4229 .
> Currently, to start a Geronimo Instance, the org.apache.geronimo.server.dir java property must be defined in the GERONIMO_OPTS variable. However, this prevents the Shell scripts from being able to know and use the path location to the Geronimo Server Instance.
> In particular, there are a few issues affected by a variable like this not being available.
> # Reported in GERONIMO-6174 - GERONIMO_TMPDIR is set in the shell/bat scripts as GERONIMO_HOME/var/tmp. In turn, the java property "java.io.tmpdir" is set to GERONIMO_TMPDIR (this is GERONIMO_HOME/var/tmp). Shouldn't GERONIMO_TMPDIR instead be set to a value provided by GERONIMO_SERVER/var/tmp ?
> -- affected scripts: client, deploy, geronimo, internalLauncher, jaxws-tools
> -- This can be argued to whether or not all Geronimo Server Instance should share a common temp directory.
> # Reported in GERONIMO-6174 - The java properties karaf.home and karaf.base are both being set to GERONIMO_HOME. When instead karaf.base should be set to a value held by GERONIMO_SERVER.
> -- affected scripts: client, geronimo, internalLauncher
> -- see resulting errors and reasoning in GERONIMO-6174
> # Not Reported - The java property java.util.logging.config.file is being set to GERONIMO_HOME/etc/java.util.logging.properties . It is intended to be an empty configuration file. This only causes a problem when using instances if GERONIMO_HOME/etc does not exist (it would not exist if GERONIMO_SERVER/etc is intended to be used).
> -- affected scripts: client, geronimo, internalLauncher
> # Not Reported - Logging startup output to GERONIMO_HOME/var/log/geronimo.out - Obviously if multiple instances are being started, this should be GERONIMO_SERVER/var/log/geronimo.out . Any error is silent if var/log/geronimo.out does not exist.
> -- affected scripts: geronimo
> # Not Reported - The register-service script does a grep and awk on GERONIMO_HOME/var/config/config-substitutions.properties to discover the portOffset . Obviously this will not work for multiple instances
> -- The register-service script does not take multiple instances into consideration at all
> -- affected scripts: register-service
> Solution:
> - Create a new shell variable GERONIMO_SERVER to hold the path location to the run-time server configuration, and leave GERONIMO_HOME to hold the path location to the Geronimo Installation Path.
> Arguments:
> - If GERONIMO_SERVER defaults to GERONIMO_HOME, then any installation not having multiple instances configured will not be affected.
> - This will not resolve the multiple instance support issue in Geronimo, GERONIMO-6270, but having this support in the shell scripts will get Geronimo much closer.
> - About half of the currently known issues (listed above) can be resolved with the addition of GERONIMO_SERVER as proposed.
> The remaining currently known issues will be:
> # GERONIMO-6174: the proper use of karaf.home versus karaf.base
> # GERONIMO-6270 SnapshotConfigXMLBuilder using the org.apache.geronimo.server.dir/var directory
> # GERONIMO-5987 and GERONIMO-6270: ActiveMQ using org.apache.geronimo.server.dir as the base for var rather than the current working directory the run-time server is in at startup
> # GERONIMO-6175: The Geronimo Repository using org.apache.geronimo.server.dir instead of org.apache.geronimo.home.dir

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Issue Comment Edited] (GERONIMO-6275) Defining and Using org.apache.geronimo.server.dir versus org.apache.geronimo.home.dir in shell scripts

Posted by "Russell E Glaue (Issue Comment Edited) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/GERONIMO-6275?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13211983#comment-13211983 ] 

Russell E Glaue edited comment on GERONIMO-6275 at 2/20/12 5:15 PM:
--------------------------------------------------------------------

Since were now setting GERONIMO_TMPDIR in setjavaenv.sh, we also need to make sure that is checked in the "# For Cygwin, ensure paths are in UNIX format before anything is touched" section - in the four scripts: geronimo, client, deploy and jaxws-tools.sh. Batch files are okay since they do not account for Cygwin.

Otherwise, all of my testing is successful with the new changes you committed.

Change...
{noformat:borderStyle=solid}
# For Cygwin, ensure paths are in UNIX format before anything is touched
if $cygwin; then
  [ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
  [ -n "$JRE_HOME" ] && JRE_HOME=`cygpath --unix "$JRE_HOME"`
  [ -n "$JDB_SRCPATH" ] && JDB_SRCPATH=`cygpath --unix "$JDB_SRCPATH"`
  [ -n "$GERONIMO_HOME" ] && GERONIMO_HOME=`cygpath --unix "$GERONIMO_HOME"`
  [ -n "$GERONIMO_SERVER" ] && GERONIMO_SERVER=`cygpath --unix "$GERONIMO_SERVER"`
fi
{noformat}

To...
{noformat:borderStyle=solid}
# For Cygwin, ensure paths are in UNIX format before anything is touched
if $cygwin; then
  [ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
  [ -n "$JRE_HOME" ] && JRE_HOME=`cygpath --unix "$JRE_HOME"`
  [ -n "$JDB_SRCPATH" ] && JDB_SRCPATH=`cygpath --unix "$JDB_SRCPATH"`
  [ -n "$GERONIMO_HOME" ] && GERONIMO_HOME=`cygpath --unix "$GERONIMO_HOME"`
  [ -n "$GERONIMO_SERVER" ] && GERONIMO_SERVER=`cygpath --unix "$GERONIMO_SERVER"`
  [ -n "$GERONIMO_TMPDIR" ] && GERONIMO_TMPDIR=`cygpath --unix "$GERONIMO_TMPDIR"`
fi
{noformat}

                
      was (Author: rglaue):
    Since were now setting GERONIMO_TMPDIR in setjavaenv.sh, we also need to make sure that is checked in the "# For Cygwin, ensure paths are in UNIX format before anything is touched" section - in the scripts geronimo, client and deploy. Batch files are okay since they do not account for Cygwin.

Otherwise, all of my testing is successful with the new changes you committed.

Change...
{noformat:borderStyle=solid}
# For Cygwin, ensure paths are in UNIX format before anything is touched
if $cygwin; then
  [ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
  [ -n "$JRE_HOME" ] && JRE_HOME=`cygpath --unix "$JRE_HOME"`
  [ -n "$JDB_SRCPATH" ] && JDB_SRCPATH=`cygpath --unix "$JDB_SRCPATH"`
  [ -n "$GERONIMO_HOME" ] && GERONIMO_HOME=`cygpath --unix "$GERONIMO_HOME"`
  [ -n "$GERONIMO_SERVER" ] && GERONIMO_SERVER=`cygpath --unix "$GERONIMO_SERVER"`
fi
{noformat}

To...
{noformat:borderStyle=solid}
# For Cygwin, ensure paths are in UNIX format before anything is touched
if $cygwin; then
  [ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
  [ -n "$JRE_HOME" ] && JRE_HOME=`cygpath --unix "$JRE_HOME"`
  [ -n "$JDB_SRCPATH" ] && JDB_SRCPATH=`cygpath --unix "$JDB_SRCPATH"`
  [ -n "$GERONIMO_HOME" ] && GERONIMO_HOME=`cygpath --unix "$GERONIMO_HOME"`
  [ -n "$GERONIMO_SERVER" ] && GERONIMO_SERVER=`cygpath --unix "$GERONIMO_SERVER"`
  [ -n "$GERONIMO_TMPDIR" ] && GERONIMO_TMPDIR=`cygpath --unix "$GERONIMO_TMPDIR"`
fi
{noformat}

                  
> Defining and Using org.apache.geronimo.server.dir versus org.apache.geronimo.home.dir in shell scripts
> ------------------------------------------------------------------------------------------------------
>
>                 Key: GERONIMO-6275
>                 URL: https://issues.apache.org/jira/browse/GERONIMO-6275
>             Project: Geronimo
>          Issue Type: Sub-task
>      Security Level: public(Regular issues) 
>          Components: startup/shutdown
>    Affects Versions: 3.0-beta-1
>         Environment: Linux x86, Red Hat Enterprise Linux Server release 5.4 (Tikanga); Java JDK1.6.0_25
>            Reporter: Russell E Glaue
>            Assignee: Russell E Glaue
>            Priority: Minor
>              Labels: geronimo
>         Attachments: geronimo-6275-B-comments.patch, geronimo-6275-procrun_service.patch, geronimo-6275.patch
>
>
> Related: GERONIMO-6270, GERONIMO-6175, GERONIMO-6174, GERONIMO-5987, GERONIMO-4229
> It would be easier to support multiple server instances of Geronimo if there is one shell variable that is used to reference the path on disk to the instance, proposed as GERONIMO_SERVER as opposed to the GERONIMO_HOME installation path. This issue tracks the discussion and modification of such a change.
> GERONIMO_SERVER defines:
> - GERONIMO_SERVER defaults to GERONIMO_HOME if no instances are specified
> - GERONIMO_SERVER is expanded to GERONIMO_HOME/GERONIMO_SERVER if GERONIMO_SERVER is a relative path
> - GERONIMO_SERVER defines org.apache.geronimo.server.dir
> In the java code there are the following properties:
> # org.apache.geronimo.home.dir - equivelant to GERONIMO_HOME shell variable
> # org.apache.geronimo.server.dir - proposed to be equivelant to GERONIMO_SERVER 
> The words "BASE" versus "HOME" appear a few times in the source. Once example is "karaf.home" and "karaf.base" properties. According to the code usage, it is aparant that these terms are assumed to mean these things:
> # HOME - path location on disk of read-only binaries and configuration
> # BASE - path location on disk of read-write configuration and data storage
> The term BASE is intended to point at a Geronimo Server Instance Base path. However, this has not been clearly defined, and has appeared to cause some misusage. Thus this and other issues lead to the removal of GERONIMO_BASE shell variable and org.apache.geronimo.base.dir java property in GERONIMO-4229 .
> Currently, to start a Geronimo Instance, the org.apache.geronimo.server.dir java property must be defined in the GERONIMO_OPTS variable. However, this prevents the Shell scripts from being able to know and use the path location to the Geronimo Server Instance.
> In particular, there are a few issues affected by a variable like this not being available.
> # Reported in GERONIMO-6174 - GERONIMO_TMPDIR is set in the shell/bat scripts as GERONIMO_HOME/var/tmp. In turn, the java property "java.io.tmpdir" is set to GERONIMO_TMPDIR (this is GERONIMO_HOME/var/tmp). Shouldn't GERONIMO_TMPDIR instead be set to a value provided by GERONIMO_SERVER/var/tmp ?
> -- affected scripts: client, deploy, geronimo, internalLauncher, jaxws-tools
> -- This can be argued to whether or not all Geronimo Server Instance should share a common temp directory.
> # Reported in GERONIMO-6174 - The java properties karaf.home and karaf.base are both being set to GERONIMO_HOME. When instead karaf.base should be set to a value held by GERONIMO_SERVER.
> -- affected scripts: client, geronimo, internalLauncher
> -- see resulting errors and reasoning in GERONIMO-6174
> # Not Reported - The java property java.util.logging.config.file is being set to GERONIMO_HOME/etc/java.util.logging.properties . It is intended to be an empty configuration file. This only causes a problem when using instances if GERONIMO_HOME/etc does not exist (it would not exist if GERONIMO_SERVER/etc is intended to be used).
> -- affected scripts: client, geronimo, internalLauncher
> # Not Reported - Logging startup output to GERONIMO_HOME/var/log/geronimo.out - Obviously if multiple instances are being started, this should be GERONIMO_SERVER/var/log/geronimo.out . Any error is silent if var/log/geronimo.out does not exist.
> -- affected scripts: geronimo
> # Not Reported - The register-service script does a grep and awk on GERONIMO_HOME/var/config/config-substitutions.properties to discover the portOffset . Obviously this will not work for multiple instances
> -- The register-service script does not take multiple instances into consideration at all
> -- affected scripts: register-service
> Solution:
> - Create a new shell variable GERONIMO_SERVER to hold the path location to the run-time server configuration, and leave GERONIMO_HOME to hold the path location to the Geronimo Installation Path.
> Arguments:
> - If GERONIMO_SERVER defaults to GERONIMO_HOME, then any installation not having multiple instances configured will not be affected.
> - This will not resolve the multiple instance support issue in Geronimo, GERONIMO-6270, but having this support in the shell scripts will get Geronimo much closer.
> - About half of the currently known issues (listed above) can be resolved with the addition of GERONIMO_SERVER as proposed.
> The remaining currently known issues will be:
> # GERONIMO-6174: the proper use of karaf.home versus karaf.base
> # GERONIMO-6270 SnapshotConfigXMLBuilder using the org.apache.geronimo.server.dir/var directory
> # GERONIMO-5987 and GERONIMO-6270: ActiveMQ using org.apache.geronimo.server.dir as the base for var rather than the current working directory the run-time server is in at startup
> # GERONIMO-6175: The Geronimo Repository using org.apache.geronimo.server.dir instead of org.apache.geronimo.home.dir

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (GERONIMO-6275) Defining and Using org.apache.geronimo.server.dir versus org.apache.geronimo.home.dir in shell scripts

Posted by "Forrest Xia (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/GERONIMO-6275?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13211645#comment-13211645 ] 

Forrest Xia commented on GERONIMO-6275:
---------------------------------------

Hi Russell,

Your proposal sounds reasonable, and we will include it into Geronimo. Thanks a lot for your great contribution!

After reviewing the patches, I think we need to consolidate the scripts so that not to duplicate the GERONIMO_SERVER resolution logic in several scripts(geronimo, deploy, client), and I will make that consolidate to setjavaenv scripts.

Any more concerns, feel free to comment here. thanks again!

Best Regards, Forrest
                
> Defining and Using org.apache.geronimo.server.dir versus org.apache.geronimo.home.dir in shell scripts
> ------------------------------------------------------------------------------------------------------
>
>                 Key: GERONIMO-6275
>                 URL: https://issues.apache.org/jira/browse/GERONIMO-6275
>             Project: Geronimo
>          Issue Type: Sub-task
>      Security Level: public(Regular issues) 
>          Components: startup/shutdown
>    Affects Versions: 3.0-beta-1
>         Environment: Linux x86, Red Hat Enterprise Linux Server release 5.4 (Tikanga); Java JDK1.6.0_25
>            Reporter: Russell E Glaue
>            Assignee: Russell E Glaue
>            Priority: Minor
>              Labels: geronimo
>         Attachments: geronimo-6275-procrun_service.patch, geronimo-6275.patch
>
>
> Related: GERONIMO-6270, GERONIMO-6175, GERONIMO-6174, GERONIMO-5987, GERONIMO-4229
> It would be easier to support multiple server instances of Geronimo if there is one shell variable that is used to reference the path on disk to the instance, proposed as GERONIMO_SERVER as opposed to the GERONIMO_HOME installation path. This issue tracks the discussion and modification of such a change.
> GERONIMO_SERVER defines:
> - GERONIMO_SERVER defaults to GERONIMO_HOME if no instances are specified
> - GERONIMO_SERVER is expanded to GERONIMO_HOME/GERONIMO_SERVER if GERONIMO_SERVER is a relative path
> - GERONIMO_SERVER defines org.apache.geronimo.server.dir
> In the java code there are the following properties:
> # org.apache.geronimo.home.dir - equivelant to GERONIMO_HOME shell variable
> # org.apache.geronimo.server.dir - proposed to be equivelant to GERONIMO_SERVER 
> The words "BASE" versus "HOME" appear a few times in the source. Once example is "karaf.home" and "karaf.base" properties. According to the code usage, it is aparant that these terms are assumed to mean these things:
> # HOME - path location on disk of read-only binaries and configuration
> # BASE - path location on disk of read-write configuration and data storage
> The term BASE is intended to point at a Geronimo Server Instance Base path. However, this has not been clearly defined, and has appeared to cause some misusage. Thus this and other issues lead to the removal of GERONIMO_BASE shell variable and org.apache.geronimo.base.dir java property in GERONIMO-4229 .
> Currently, to start a Geronimo Instance, the org.apache.geronimo.server.dir java property must be defined in the GERONIMO_OPTS variable. However, this prevents the Shell scripts from being able to know and use the path location to the Geronimo Server Instance.
> In particular, there are a few issues affected by a variable like this not being available.
> # Reported in GERONIMO-6174 - GERONIMO_TMPDIR is set in the shell/bat scripts as GERONIMO_HOME/var/tmp. In turn, the java property "java.io.tmpdir" is set to GERONIMO_TMPDIR (this is GERONIMO_HOME/var/tmp). Shouldn't GERONIMO_TMPDIR instead be set to a value provided by GERONIMO_SERVER/var/tmp ?
> -- affected scripts: client, deploy, geronimo, internalLauncher, jaxws-tools
> -- This can be argued to whether or not all Geronimo Server Instance should share a common temp directory.
> # Reported in GERONIMO-6174 - The java properties karaf.home and karaf.base are both being set to GERONIMO_HOME. When instead karaf.base should be set to a value held by GERONIMO_SERVER.
> -- affected scripts: client, geronimo, internalLauncher
> -- see resulting errors and reasoning in GERONIMO-6174
> # Not Reported - The java property java.util.logging.config.file is being set to GERONIMO_HOME/etc/java.util.logging.properties . It is intended to be an empty configuration file. This only causes a problem when using instances if GERONIMO_HOME/etc does not exist (it would not exist if GERONIMO_SERVER/etc is intended to be used).
> -- affected scripts: client, geronimo, internalLauncher
> # Not Reported - Logging startup output to GERONIMO_HOME/var/log/geronimo.out - Obviously if multiple instances are being started, this should be GERONIMO_SERVER/var/log/geronimo.out . Any error is silent if var/log/geronimo.out does not exist.
> -- affected scripts: geronimo
> # Not Reported - The register-service script does a grep and awk on GERONIMO_HOME/var/config/config-substitutions.properties to discover the portOffset . Obviously this will not work for multiple instances
> -- The register-service script does not take multiple instances into consideration at all
> -- affected scripts: register-service
> Solution:
> - Create a new shell variable GERONIMO_SERVER to hold the path location to the run-time server configuration, and leave GERONIMO_HOME to hold the path location to the Geronimo Installation Path.
> Arguments:
> - If GERONIMO_SERVER defaults to GERONIMO_HOME, then any installation not having multiple instances configured will not be affected.
> - This will not resolve the multiple instance support issue in Geronimo, GERONIMO-6270, but having this support in the shell scripts will get Geronimo much closer.
> - About half of the currently known issues (listed above) can be resolved with the addition of GERONIMO_SERVER as proposed.
> The remaining currently known issues will be:
> # GERONIMO-6174: the proper use of karaf.home versus karaf.base
> # GERONIMO-6270 SnapshotConfigXMLBuilder using the org.apache.geronimo.server.dir/var directory
> # GERONIMO-5987 and GERONIMO-6270: ActiveMQ using org.apache.geronimo.server.dir as the base for var rather than the current working directory the run-time server is in at startup
> # GERONIMO-6175: The Geronimo Repository using org.apache.geronimo.server.dir instead of org.apache.geronimo.home.dir

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (GERONIMO-6275) Defining and Using org.apache.geronimo.server.dir versus org.apache.geronimo.home.dir in shell scripts

Posted by "Russell E Glaue (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/GERONIMO-6275?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13209853#comment-13209853 ] 

Russell E Glaue commented on GERONIMO-6275:
-------------------------------------------

Reference to documentation in the code implying the meaning and usage of "home" versus "base":
{noformat:borderStyle=solid}
src: trunk/framework/modules/geronimo-main/src/main/java/org/apache/geronimo/main/FrameworkLauncher.java
...
    /**
     * The system property for specifying the Karaf home directory.  The home directory
     * hold the binary install of Karaf.
     */
    private static final String PROP_KARAF_HOME = "karaf.home";

    /**
     * The system property for specifying the Karaf base directory.  The base directory
     * holds the configuration and data for a Karaf instance.
     */
    private static final String PROP_KARAF_BASE = "karaf.base";
...
{noformat}

                
> Defining and Using org.apache.geronimo.server.dir versus org.apache.geronimo.home.dir in shell scripts
> ------------------------------------------------------------------------------------------------------
>
>                 Key: GERONIMO-6275
>                 URL: https://issues.apache.org/jira/browse/GERONIMO-6275
>             Project: Geronimo
>          Issue Type: Sub-task
>      Security Level: public(Regular issues) 
>          Components: startup/shutdown
>    Affects Versions: 3.0-beta-1
>         Environment: Linux x86, Red Hat Enterprise Linux Server release 5.4 (Tikanga); Java JDK1.6.0_25
>            Reporter: Russell E Glaue
>            Priority: Minor
>              Labels: geronimo
>
> Related: GERONIMO-6270, GERONIMO-6175, GERONIMO-6174, GERONIMO-5987, GERONIMO-4229
> It would be easier to support multiple server instances of Geronimo if there is one shell variable that is used to reference the path on disk to the instance, proposed as GERONIMO_SERVER as opposed to the GERONIMO_HOME installation path. This issue tracks the discussion and modification of such a change.
> GERONIMO_SERVER defines:
> - GERONIMO_SERVER defaults to GERONIMO_HOME if no instances are specified
> - GERONIMO_SERVER is expanded to GERONIMO_HOME/GERONIMO_SERVER if GERONIMO_SERVER is a relative path
> - GERONIMO_SERVER defines org.apache.geronimo.server.dir
> In the java code there are the following properties:
> # org.apache.geronimo.home.dir - equivelant to GERONIMO_HOME shell variable
> # org.apache.geronimo.server.dir - proposed to be equivelant to GERONIMO_SERVER 
> The words "BASE" versus "HOME" appear a few times in the source. Once example is "karaf.home" and "karaf.base" properties. According to the code usage, it is aparant that these terms are assumed to mean these things:
> # HOME - path location on disk of read-only binaries and configuration
> # BASE - path location on disk of read-write configuration and data storage
> The term BASE is intended to point at a Geronimo Server Instance Base path. However, this has not been clearly defined, and has appeared to cause some misusage. Thus this and other issues lead to the removal of GERONIMO_BASE shell variable and org.apache.geronimo.base.dir java property in GERONIMO-4229 .
> Currently, to start a Geronimo Instance, the org.apache.geronimo.server.dir java property must be defined in the GERONIMO_OPTS variable. However, this prevents the Shell scripts from being able to know and use the path location to the Geronimo Server Instance.
> In particular, there are a few issues affected by a variable like this not being available.
> # Reported in GERONIMO-6174 - GERONIMO_TMPDIR is set in the shell/bat scripts as GERONIMO_HOME/var/tmp. In turn, the java property "java.io.tmpdir" is set to GERONIMO_TMPDIR (this is GERONIMO_HOME/var/tmp). Shouldn't GERONIMO_TMPDIR instead be set to a value provided by GERONIMO_SERVER/var/tmp ?
> -- affected scripts: client, deploy, geronimo, internalLauncher, jaxws-tools
> -- This can be argued to whether or not all Geronimo Server Instance should share a common temp directory.
> # Reported in GERONIMO-6174 - The java properties karaf.home and karaf.base are both being set to GERONIMO_HOME. When instead karaf.base should be set to a value held by GERONIMO_SERVER.
> -- affected scripts: client, geronimo, internalLauncher
> -- see resulting errors and reasoning in GERONIMO-6174
> # Not Reported - The java property java.util.logging.config.file is being set to GERONIMO_HOME/etc/java.util.logging.properties . It is intended to be an empty configuration file. This only causes a problem when using instances if GERONIMO_HOME/etc does not exist (it would not exist if GERONIMO_SERVER/etc is intended to be used).
> -- affected scripts: client, geronimo, internalLauncher
> # Not Reported - Logging startup output to GERONIMO_HOME/var/log/geronimo.out - Obviously if multiple instances are being started, this should be GERONIMO_SERVER/var/log/geronimo.out . Any error is silent if var/log/geronimo.out does not exist.
> -- affected scripts: geronimo
> # Not Reported - The register-service script does a grep and awk on GERONIMO_HOME/var/config/config-substitutions.properties to discover the portOffset . Obviously this will not work for multiple instances
> -- The register-service script does not take multiple instances into consideration at all
> -- affected scripts: register-service
> Solution:
> - Create a new shell variable GERONIMO_SERVER to hold the path location to the run-time server configuration, and leave GERONIMO_HOME to hold the path location to the Geronimo Installation Path.
> Arguments:
> - If GERONIMO_SERVER defaults to GERONIMO_HOME, then any installation not having multiple instances configured will not be affected.
> - This will not resolve the multiple instance support issue in Geronimo, GERONIMO-6270, but having this support in the shell scripts will get Geronimo much closer.
> - About half of the currently known issues (listed above) can be resolved with the addition of GERONIMO_SERVER as proposed.
> The remaining currently known issues will be:
> # GERONIMO-6174: the proper use of karaf.home versus karaf.base
> # GERONIMO-6270 SnapshotConfigXMLBuilder using the org.apache.geronimo.server.dir/var directory
> # GERONIMO-5987 and GERONIMO-6270: ActiveMQ using org.apache.geronimo.server.dir as the base for var rather than the current working directory the run-time server is in at startup
> # GERONIMO-6175: The Geronimo Repository using org.apache.geronimo.server.dir instead of org.apache.geronimo.home.dir

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (GERONIMO-6275) Defining and Using org.apache.geronimo.server.dir versus org.apache.geronimo.home.dir in shell scripts

Posted by "Forrest Xia (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/GERONIMO-6275?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13211818#comment-13211818 ] 

Forrest Xia commented on GERONIMO-6275:
---------------------------------------

Yes, I agreed that using setjavaenv to contain the logic might lead confusion, I ever thought renaming it into setgeronimoenv or something more geronimo specific, but as you know, changing an existing scripts file name might lead to unexpected incompatible issue in the user side(saying in case users relies on setjavaenv scripts in their environment), and I don't want to introduce a new scripts into the code to maintain, so I choose to use setjavaenv to contain that logic.

As to GERONIMO_HOME variable resolution logic, it's reasonable to have it duplicated in each command line interface scripts(geronimo, deploy, client, and jaxws-tools), since we need to know it first to call setjavaenv scripts.

I would commit the changes soon, and appreciate if you could help do some testing, thanks again!
                
> Defining and Using org.apache.geronimo.server.dir versus org.apache.geronimo.home.dir in shell scripts
> ------------------------------------------------------------------------------------------------------
>
>                 Key: GERONIMO-6275
>                 URL: https://issues.apache.org/jira/browse/GERONIMO-6275
>             Project: Geronimo
>          Issue Type: Sub-task
>      Security Level: public(Regular issues) 
>          Components: startup/shutdown
>    Affects Versions: 3.0-beta-1
>         Environment: Linux x86, Red Hat Enterprise Linux Server release 5.4 (Tikanga); Java JDK1.6.0_25
>            Reporter: Russell E Glaue
>            Assignee: Russell E Glaue
>            Priority: Minor
>              Labels: geronimo
>         Attachments: geronimo-6275-procrun_service.patch, geronimo-6275.patch
>
>
> Related: GERONIMO-6270, GERONIMO-6175, GERONIMO-6174, GERONIMO-5987, GERONIMO-4229
> It would be easier to support multiple server instances of Geronimo if there is one shell variable that is used to reference the path on disk to the instance, proposed as GERONIMO_SERVER as opposed to the GERONIMO_HOME installation path. This issue tracks the discussion and modification of such a change.
> GERONIMO_SERVER defines:
> - GERONIMO_SERVER defaults to GERONIMO_HOME if no instances are specified
> - GERONIMO_SERVER is expanded to GERONIMO_HOME/GERONIMO_SERVER if GERONIMO_SERVER is a relative path
> - GERONIMO_SERVER defines org.apache.geronimo.server.dir
> In the java code there are the following properties:
> # org.apache.geronimo.home.dir - equivelant to GERONIMO_HOME shell variable
> # org.apache.geronimo.server.dir - proposed to be equivelant to GERONIMO_SERVER 
> The words "BASE" versus "HOME" appear a few times in the source. Once example is "karaf.home" and "karaf.base" properties. According to the code usage, it is aparant that these terms are assumed to mean these things:
> # HOME - path location on disk of read-only binaries and configuration
> # BASE - path location on disk of read-write configuration and data storage
> The term BASE is intended to point at a Geronimo Server Instance Base path. However, this has not been clearly defined, and has appeared to cause some misusage. Thus this and other issues lead to the removal of GERONIMO_BASE shell variable and org.apache.geronimo.base.dir java property in GERONIMO-4229 .
> Currently, to start a Geronimo Instance, the org.apache.geronimo.server.dir java property must be defined in the GERONIMO_OPTS variable. However, this prevents the Shell scripts from being able to know and use the path location to the Geronimo Server Instance.
> In particular, there are a few issues affected by a variable like this not being available.
> # Reported in GERONIMO-6174 - GERONIMO_TMPDIR is set in the shell/bat scripts as GERONIMO_HOME/var/tmp. In turn, the java property "java.io.tmpdir" is set to GERONIMO_TMPDIR (this is GERONIMO_HOME/var/tmp). Shouldn't GERONIMO_TMPDIR instead be set to a value provided by GERONIMO_SERVER/var/tmp ?
> -- affected scripts: client, deploy, geronimo, internalLauncher, jaxws-tools
> -- This can be argued to whether or not all Geronimo Server Instance should share a common temp directory.
> # Reported in GERONIMO-6174 - The java properties karaf.home and karaf.base are both being set to GERONIMO_HOME. When instead karaf.base should be set to a value held by GERONIMO_SERVER.
> -- affected scripts: client, geronimo, internalLauncher
> -- see resulting errors and reasoning in GERONIMO-6174
> # Not Reported - The java property java.util.logging.config.file is being set to GERONIMO_HOME/etc/java.util.logging.properties . It is intended to be an empty configuration file. This only causes a problem when using instances if GERONIMO_HOME/etc does not exist (it would not exist if GERONIMO_SERVER/etc is intended to be used).
> -- affected scripts: client, geronimo, internalLauncher
> # Not Reported - Logging startup output to GERONIMO_HOME/var/log/geronimo.out - Obviously if multiple instances are being started, this should be GERONIMO_SERVER/var/log/geronimo.out . Any error is silent if var/log/geronimo.out does not exist.
> -- affected scripts: geronimo
> # Not Reported - The register-service script does a grep and awk on GERONIMO_HOME/var/config/config-substitutions.properties to discover the portOffset . Obviously this will not work for multiple instances
> -- The register-service script does not take multiple instances into consideration at all
> -- affected scripts: register-service
> Solution:
> - Create a new shell variable GERONIMO_SERVER to hold the path location to the run-time server configuration, and leave GERONIMO_HOME to hold the path location to the Geronimo Installation Path.
> Arguments:
> - If GERONIMO_SERVER defaults to GERONIMO_HOME, then any installation not having multiple instances configured will not be affected.
> - This will not resolve the multiple instance support issue in Geronimo, GERONIMO-6270, but having this support in the shell scripts will get Geronimo much closer.
> - About half of the currently known issues (listed above) can be resolved with the addition of GERONIMO_SERVER as proposed.
> The remaining currently known issues will be:
> # GERONIMO-6174: the proper use of karaf.home versus karaf.base
> # GERONIMO-6270 SnapshotConfigXMLBuilder using the org.apache.geronimo.server.dir/var directory
> # GERONIMO-5987 and GERONIMO-6270: ActiveMQ using org.apache.geronimo.server.dir as the base for var rather than the current working directory the run-time server is in at startup
> # GERONIMO-6175: The Geronimo Repository using org.apache.geronimo.server.dir instead of org.apache.geronimo.home.dir

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Assigned] (GERONIMO-6275) Defining and Using org.apache.geronimo.server.dir versus org.apache.geronimo.home.dir in shell scripts

Posted by "Russell E Glaue (Assigned) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/GERONIMO-6275?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Russell E Glaue reassigned GERONIMO-6275:
-----------------------------------------

    Assignee: Russell E Glaue
    
> Defining and Using org.apache.geronimo.server.dir versus org.apache.geronimo.home.dir in shell scripts
> ------------------------------------------------------------------------------------------------------
>
>                 Key: GERONIMO-6275
>                 URL: https://issues.apache.org/jira/browse/GERONIMO-6275
>             Project: Geronimo
>          Issue Type: Sub-task
>      Security Level: public(Regular issues) 
>          Components: startup/shutdown
>    Affects Versions: 3.0-beta-1
>         Environment: Linux x86, Red Hat Enterprise Linux Server release 5.4 (Tikanga); Java JDK1.6.0_25
>            Reporter: Russell E Glaue
>            Assignee: Russell E Glaue
>            Priority: Minor
>              Labels: geronimo
>
> Related: GERONIMO-6270, GERONIMO-6175, GERONIMO-6174, GERONIMO-5987, GERONIMO-4229
> It would be easier to support multiple server instances of Geronimo if there is one shell variable that is used to reference the path on disk to the instance, proposed as GERONIMO_SERVER as opposed to the GERONIMO_HOME installation path. This issue tracks the discussion and modification of such a change.
> GERONIMO_SERVER defines:
> - GERONIMO_SERVER defaults to GERONIMO_HOME if no instances are specified
> - GERONIMO_SERVER is expanded to GERONIMO_HOME/GERONIMO_SERVER if GERONIMO_SERVER is a relative path
> - GERONIMO_SERVER defines org.apache.geronimo.server.dir
> In the java code there are the following properties:
> # org.apache.geronimo.home.dir - equivelant to GERONIMO_HOME shell variable
> # org.apache.geronimo.server.dir - proposed to be equivelant to GERONIMO_SERVER 
> The words "BASE" versus "HOME" appear a few times in the source. Once example is "karaf.home" and "karaf.base" properties. According to the code usage, it is aparant that these terms are assumed to mean these things:
> # HOME - path location on disk of read-only binaries and configuration
> # BASE - path location on disk of read-write configuration and data storage
> The term BASE is intended to point at a Geronimo Server Instance Base path. However, this has not been clearly defined, and has appeared to cause some misusage. Thus this and other issues lead to the removal of GERONIMO_BASE shell variable and org.apache.geronimo.base.dir java property in GERONIMO-4229 .
> Currently, to start a Geronimo Instance, the org.apache.geronimo.server.dir java property must be defined in the GERONIMO_OPTS variable. However, this prevents the Shell scripts from being able to know and use the path location to the Geronimo Server Instance.
> In particular, there are a few issues affected by a variable like this not being available.
> # Reported in GERONIMO-6174 - GERONIMO_TMPDIR is set in the shell/bat scripts as GERONIMO_HOME/var/tmp. In turn, the java property "java.io.tmpdir" is set to GERONIMO_TMPDIR (this is GERONIMO_HOME/var/tmp). Shouldn't GERONIMO_TMPDIR instead be set to a value provided by GERONIMO_SERVER/var/tmp ?
> -- affected scripts: client, deploy, geronimo, internalLauncher, jaxws-tools
> -- This can be argued to whether or not all Geronimo Server Instance should share a common temp directory.
> # Reported in GERONIMO-6174 - The java properties karaf.home and karaf.base are both being set to GERONIMO_HOME. When instead karaf.base should be set to a value held by GERONIMO_SERVER.
> -- affected scripts: client, geronimo, internalLauncher
> -- see resulting errors and reasoning in GERONIMO-6174
> # Not Reported - The java property java.util.logging.config.file is being set to GERONIMO_HOME/etc/java.util.logging.properties . It is intended to be an empty configuration file. This only causes a problem when using instances if GERONIMO_HOME/etc does not exist (it would not exist if GERONIMO_SERVER/etc is intended to be used).
> -- affected scripts: client, geronimo, internalLauncher
> # Not Reported - Logging startup output to GERONIMO_HOME/var/log/geronimo.out - Obviously if multiple instances are being started, this should be GERONIMO_SERVER/var/log/geronimo.out . Any error is silent if var/log/geronimo.out does not exist.
> -- affected scripts: geronimo
> # Not Reported - The register-service script does a grep and awk on GERONIMO_HOME/var/config/config-substitutions.properties to discover the portOffset . Obviously this will not work for multiple instances
> -- The register-service script does not take multiple instances into consideration at all
> -- affected scripts: register-service
> Solution:
> - Create a new shell variable GERONIMO_SERVER to hold the path location to the run-time server configuration, and leave GERONIMO_HOME to hold the path location to the Geronimo Installation Path.
> Arguments:
> - If GERONIMO_SERVER defaults to GERONIMO_HOME, then any installation not having multiple instances configured will not be affected.
> - This will not resolve the multiple instance support issue in Geronimo, GERONIMO-6270, but having this support in the shell scripts will get Geronimo much closer.
> - About half of the currently known issues (listed above) can be resolved with the addition of GERONIMO_SERVER as proposed.
> The remaining currently known issues will be:
> # GERONIMO-6174: the proper use of karaf.home versus karaf.base
> # GERONIMO-6270 SnapshotConfigXMLBuilder using the org.apache.geronimo.server.dir/var directory
> # GERONIMO-5987 and GERONIMO-6270: ActiveMQ using org.apache.geronimo.server.dir as the base for var rather than the current working directory the run-time server is in at startup
> # GERONIMO-6175: The Geronimo Repository using org.apache.geronimo.server.dir instead of org.apache.geronimo.home.dir

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (GERONIMO-6275) Defining and Using org.apache.geronimo.server.dir versus org.apache.geronimo.home.dir in shell scripts

Posted by "Russell E Glaue (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/GERONIMO-6275?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13210512#comment-13210512 ] 

Russell E Glaue commented on GERONIMO-6275:
-------------------------------------------

Note that the use of GERONIMO_HOME versus GERONIMO_SERVER is explained in each shell script in which the variables are used, particularly the meaning of "HOME" vs. "SERVER".

{noformat:borderStyle=solid}
#
#   GERONIMO_HOME   (Optional) May point at your Geronimo top-level directory.
#                   If not specified, it will default to the parent directory
#                   of the location of this script.
#                   The HOME directory holds the binary install of Geronimo.
#
#   GERONIMO_SERVER (Optional) May point at your Geronimo Server Instance
#                   top-level directory. If not specified, it will default to
#                   $GERONIMO_HOME.
#                   The SERVER directory holds the configuration and data for
#                   a Geronimo instance.
#
{noformat}

                
> Defining and Using org.apache.geronimo.server.dir versus org.apache.geronimo.home.dir in shell scripts
> ------------------------------------------------------------------------------------------------------
>
>                 Key: GERONIMO-6275
>                 URL: https://issues.apache.org/jira/browse/GERONIMO-6275
>             Project: Geronimo
>          Issue Type: Sub-task
>      Security Level: public(Regular issues) 
>          Components: startup/shutdown
>    Affects Versions: 3.0-beta-1
>         Environment: Linux x86, Red Hat Enterprise Linux Server release 5.4 (Tikanga); Java JDK1.6.0_25
>            Reporter: Russell E Glaue
>            Assignee: Russell E Glaue
>            Priority: Minor
>              Labels: geronimo
>         Attachments: geronimo-6275.patch
>
>
> Related: GERONIMO-6270, GERONIMO-6175, GERONIMO-6174, GERONIMO-5987, GERONIMO-4229
> It would be easier to support multiple server instances of Geronimo if there is one shell variable that is used to reference the path on disk to the instance, proposed as GERONIMO_SERVER as opposed to the GERONIMO_HOME installation path. This issue tracks the discussion and modification of such a change.
> GERONIMO_SERVER defines:
> - GERONIMO_SERVER defaults to GERONIMO_HOME if no instances are specified
> - GERONIMO_SERVER is expanded to GERONIMO_HOME/GERONIMO_SERVER if GERONIMO_SERVER is a relative path
> - GERONIMO_SERVER defines org.apache.geronimo.server.dir
> In the java code there are the following properties:
> # org.apache.geronimo.home.dir - equivelant to GERONIMO_HOME shell variable
> # org.apache.geronimo.server.dir - proposed to be equivelant to GERONIMO_SERVER 
> The words "BASE" versus "HOME" appear a few times in the source. Once example is "karaf.home" and "karaf.base" properties. According to the code usage, it is aparant that these terms are assumed to mean these things:
> # HOME - path location on disk of read-only binaries and configuration
> # BASE - path location on disk of read-write configuration and data storage
> The term BASE is intended to point at a Geronimo Server Instance Base path. However, this has not been clearly defined, and has appeared to cause some misusage. Thus this and other issues lead to the removal of GERONIMO_BASE shell variable and org.apache.geronimo.base.dir java property in GERONIMO-4229 .
> Currently, to start a Geronimo Instance, the org.apache.geronimo.server.dir java property must be defined in the GERONIMO_OPTS variable. However, this prevents the Shell scripts from being able to know and use the path location to the Geronimo Server Instance.
> In particular, there are a few issues affected by a variable like this not being available.
> # Reported in GERONIMO-6174 - GERONIMO_TMPDIR is set in the shell/bat scripts as GERONIMO_HOME/var/tmp. In turn, the java property "java.io.tmpdir" is set to GERONIMO_TMPDIR (this is GERONIMO_HOME/var/tmp). Shouldn't GERONIMO_TMPDIR instead be set to a value provided by GERONIMO_SERVER/var/tmp ?
> -- affected scripts: client, deploy, geronimo, internalLauncher, jaxws-tools
> -- This can be argued to whether or not all Geronimo Server Instance should share a common temp directory.
> # Reported in GERONIMO-6174 - The java properties karaf.home and karaf.base are both being set to GERONIMO_HOME. When instead karaf.base should be set to a value held by GERONIMO_SERVER.
> -- affected scripts: client, geronimo, internalLauncher
> -- see resulting errors and reasoning in GERONIMO-6174
> # Not Reported - The java property java.util.logging.config.file is being set to GERONIMO_HOME/etc/java.util.logging.properties . It is intended to be an empty configuration file. This only causes a problem when using instances if GERONIMO_HOME/etc does not exist (it would not exist if GERONIMO_SERVER/etc is intended to be used).
> -- affected scripts: client, geronimo, internalLauncher
> # Not Reported - Logging startup output to GERONIMO_HOME/var/log/geronimo.out - Obviously if multiple instances are being started, this should be GERONIMO_SERVER/var/log/geronimo.out . Any error is silent if var/log/geronimo.out does not exist.
> -- affected scripts: geronimo
> # Not Reported - The register-service script does a grep and awk on GERONIMO_HOME/var/config/config-substitutions.properties to discover the portOffset . Obviously this will not work for multiple instances
> -- The register-service script does not take multiple instances into consideration at all
> -- affected scripts: register-service
> Solution:
> - Create a new shell variable GERONIMO_SERVER to hold the path location to the run-time server configuration, and leave GERONIMO_HOME to hold the path location to the Geronimo Installation Path.
> Arguments:
> - If GERONIMO_SERVER defaults to GERONIMO_HOME, then any installation not having multiple instances configured will not be affected.
> - This will not resolve the multiple instance support issue in Geronimo, GERONIMO-6270, but having this support in the shell scripts will get Geronimo much closer.
> - About half of the currently known issues (listed above) can be resolved with the addition of GERONIMO_SERVER as proposed.
> The remaining currently known issues will be:
> # GERONIMO-6174: the proper use of karaf.home versus karaf.base
> # GERONIMO-6270 SnapshotConfigXMLBuilder using the org.apache.geronimo.server.dir/var directory
> # GERONIMO-5987 and GERONIMO-6270: ActiveMQ using org.apache.geronimo.server.dir as the base for var rather than the current working directory the run-time server is in at startup
> # GERONIMO-6175: The Geronimo Repository using org.apache.geronimo.server.dir instead of org.apache.geronimo.home.dir

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (GERONIMO-6275) Defining and Using org.apache.geronimo.server.dir versus org.apache.geronimo.home.dir in shell scripts

Posted by "Russell E Glaue (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/GERONIMO-6275?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Russell E Glaue updated GERONIMO-6275:
--------------------------------------

    Attachment: geronimo-6275-B-comments-cygwin-procrun.patch

geronimo-6275-B-comments-cygwin-procrun.patch
This patch includes:
- changes for the comments from patch geronimo-6275-B-comments.patch (Thus  geronimo-6275-B-comments-cygwin-procrun.patch supersedes geronimo-6275-B-comments.patch).
- changes to filter GERONIMO_TMPDIR through the Cygwin UNIX format section, as specified in a previous comment.
- changes to the procrun service_pr.bat to (1) prepend GERONIMO_SERVER in the log file geronimo.out (I missed that one), and (2) to print the GERONIMO_SERVER path when Geronimo is printing GERONIMO_INV_INFO
                
> Defining and Using org.apache.geronimo.server.dir versus org.apache.geronimo.home.dir in shell scripts
> ------------------------------------------------------------------------------------------------------
>
>                 Key: GERONIMO-6275
>                 URL: https://issues.apache.org/jira/browse/GERONIMO-6275
>             Project: Geronimo
>          Issue Type: Sub-task
>      Security Level: public(Regular issues) 
>          Components: startup/shutdown
>    Affects Versions: 3.0-beta-1
>         Environment: Linux x86, Red Hat Enterprise Linux Server release 5.4 (Tikanga); Java JDK1.6.0_25
>            Reporter: Russell E Glaue
>            Assignee: Russell E Glaue
>            Priority: Minor
>              Labels: geronimo
>         Attachments: geronimo-6275-B-comments-cygwin-procrun.patch, geronimo-6275-B-comments.patch, geronimo-6275-procrun_service.patch, geronimo-6275.patch
>
>
> Related: GERONIMO-6270, GERONIMO-6175, GERONIMO-6174, GERONIMO-5987, GERONIMO-4229
> It would be easier to support multiple server instances of Geronimo if there is one shell variable that is used to reference the path on disk to the instance, proposed as GERONIMO_SERVER as opposed to the GERONIMO_HOME installation path. This issue tracks the discussion and modification of such a change.
> GERONIMO_SERVER defines:
> - GERONIMO_SERVER defaults to GERONIMO_HOME if no instances are specified
> - GERONIMO_SERVER is expanded to GERONIMO_HOME/GERONIMO_SERVER if GERONIMO_SERVER is a relative path
> - GERONIMO_SERVER defines org.apache.geronimo.server.dir
> In the java code there are the following properties:
> # org.apache.geronimo.home.dir - equivelant to GERONIMO_HOME shell variable
> # org.apache.geronimo.server.dir - proposed to be equivelant to GERONIMO_SERVER 
> The words "BASE" versus "HOME" appear a few times in the source. Once example is "karaf.home" and "karaf.base" properties. According to the code usage, it is aparant that these terms are assumed to mean these things:
> # HOME - path location on disk of read-only binaries and configuration
> # BASE - path location on disk of read-write configuration and data storage
> The term BASE is intended to point at a Geronimo Server Instance Base path. However, this has not been clearly defined, and has appeared to cause some misusage. Thus this and other issues lead to the removal of GERONIMO_BASE shell variable and org.apache.geronimo.base.dir java property in GERONIMO-4229 .
> Currently, to start a Geronimo Instance, the org.apache.geronimo.server.dir java property must be defined in the GERONIMO_OPTS variable. However, this prevents the Shell scripts from being able to know and use the path location to the Geronimo Server Instance.
> In particular, there are a few issues affected by a variable like this not being available.
> # Reported in GERONIMO-6174 - GERONIMO_TMPDIR is set in the shell/bat scripts as GERONIMO_HOME/var/tmp. In turn, the java property "java.io.tmpdir" is set to GERONIMO_TMPDIR (this is GERONIMO_HOME/var/tmp). Shouldn't GERONIMO_TMPDIR instead be set to a value provided by GERONIMO_SERVER/var/tmp ?
> -- affected scripts: client, deploy, geronimo, internalLauncher, jaxws-tools
> -- This can be argued to whether or not all Geronimo Server Instance should share a common temp directory.
> # Reported in GERONIMO-6174 - The java properties karaf.home and karaf.base are both being set to GERONIMO_HOME. When instead karaf.base should be set to a value held by GERONIMO_SERVER.
> -- affected scripts: client, geronimo, internalLauncher
> -- see resulting errors and reasoning in GERONIMO-6174
> # Not Reported - The java property java.util.logging.config.file is being set to GERONIMO_HOME/etc/java.util.logging.properties . It is intended to be an empty configuration file. This only causes a problem when using instances if GERONIMO_HOME/etc does not exist (it would not exist if GERONIMO_SERVER/etc is intended to be used).
> -- affected scripts: client, geronimo, internalLauncher
> # Not Reported - Logging startup output to GERONIMO_HOME/var/log/geronimo.out - Obviously if multiple instances are being started, this should be GERONIMO_SERVER/var/log/geronimo.out . Any error is silent if var/log/geronimo.out does not exist.
> -- affected scripts: geronimo
> # Not Reported - The register-service script does a grep and awk on GERONIMO_HOME/var/config/config-substitutions.properties to discover the portOffset . Obviously this will not work for multiple instances
> -- The register-service script does not take multiple instances into consideration at all
> -- affected scripts: register-service
> Solution:
> - Create a new shell variable GERONIMO_SERVER to hold the path location to the run-time server configuration, and leave GERONIMO_HOME to hold the path location to the Geronimo Installation Path.
> Arguments:
> - If GERONIMO_SERVER defaults to GERONIMO_HOME, then any installation not having multiple instances configured will not be affected.
> - This will not resolve the multiple instance support issue in Geronimo, GERONIMO-6270, but having this support in the shell scripts will get Geronimo much closer.
> - About half of the currently known issues (listed above) can be resolved with the addition of GERONIMO_SERVER as proposed.
> The remaining currently known issues will be:
> # GERONIMO-6174: the proper use of karaf.home versus karaf.base
> # GERONIMO-6270 SnapshotConfigXMLBuilder using the org.apache.geronimo.server.dir/var directory
> # GERONIMO-5987 and GERONIMO-6270: ActiveMQ using org.apache.geronimo.server.dir as the base for var rather than the current working directory the run-time server is in at startup
> # GERONIMO-6175: The Geronimo Repository using org.apache.geronimo.server.dir instead of org.apache.geronimo.home.dir

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (GERONIMO-6275) Defining and Using org.apache.geronimo.server.dir versus org.apache.geronimo.home.dir in shell scripts

Posted by "Russell E Glaue (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/GERONIMO-6275?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13210508#comment-13210508 ] 

Russell E Glaue commented on GERONIMO-6275:
-------------------------------------------

The patch geronimo-6275.patch modifies the shell scripts such that the following commands can now be used to start up a single Geronimo server instance, or Geronimo without an instance configuration. Run-time output follows to demonstrate start-up ability after modifications are applied from the patch.

- Tested with geronimo-tomcat7-javaee6-3.0-SNAPSHOT-20111220
- Windows batch files are also patched, and partially tested for syntax. But they need full testing on a Windows Geronimo Deployment.
- Geronimo server instance is setup as documented in https://cwiki.apache.org/confluence/display/GMOxDOC30/Running+multiple+Geronimo+instances
- Note the error message "Error in initialization script: /data/geronimo3/etc/shell.init.script (No such file or directory)" is caused because the Java code for Karaf looks for {karaf.home}/etc/shell.init.script instead of {karaf.base}/etc/shell.init.script.


Startup Geronimo server instance gserv1
{noformat:borderStyle=solid}
[ger@server /opt/geronimo3/gserv1]# env JAVA_HOME=/usr/jdk1.6.0 GERONIMO_SERVER=gserv1 ../bin/geronimo run
Using GERONIMO_HOME:   /opt/geronimo3
Using GERONIMO_SERVER: /opt/geronimo3/gserv1
Using GERONIMO_TMPDIR: /opt/geronimo3/gserv1/var/temp
Using JRE_HOME:        /usr/jdk1.6.0_25/jre
                                                          
     ______                       _                       
    / ____/___  _________  ____  (_)____ ___  ____        
   / / __ / _ \/ ___/ __ \/ __ \/ // __ `__ \/ __ \  
  / /_/ //  __/ /  / /_/ / / / / // / / / / / /_/ /       
  \____/ \___/_/   \____/_/ /_/_//_/ /_/ /_/\____/    

  Apache Geronimo (3.0-SNAPSHOT)

Hit '<tab>' for a list of available commands
and '[cmd] --help' for help on a specific command.
Hit '<ctrl-d>' or 'osgi:shutdown' to shutdown Geronimo.

Error in initialization script: /data/geronimo3/etc/shell.init.script (No such file or directory)
geronimo> Booting Geronimo Kernel (in Java 1.6.0_25)...
Starting Geronimo Application Server v3.0-SNAPSHOT
[****************************************] 100%  47s Startup complete                                         
  Listening on Ports:
    1150 0.0.0.0 CORBA Naming Service
    1199 0.0.0.0 RMI Naming
    1627 0.0.0.0 Derby Connector
    2101 0.0.0.0 OpenEJB SSL ORB Adapter
    4301 0.0.0.0 OpenEJB Daemon
    6982 0.0.0.0 OpenEJB ORB Adapter
    8109 0.0.0.0 Tomcat Connector AJP TomcatAJPConnector
    8180 0.0.0.0 Tomcat Connector HTTP BIO TomcatWebConnector
    8543 0.0.0.0 Tomcat Connector HTTPS BIO TomcatWebSSLConnector
   10099 0.0.0.0 JMX Remoting Connector
   61716 0.0.0.0 ActiveMQ Transport Connector

  Started Application Modules:
    EAR: org.apache.geronimo.plugins/console-tomcat/3.0-SNAPSHOT/car
    JAR: org.apache.geronimo.configs/mejb/3.0-SNAPSHOT/car
    RAR: org.apache.geronimo.configs/activemq-ra/3.0-SNAPSHOT/car
    RAR: org.apache.geronimo.configs/system-database/3.0-SNAPSHOT/car
    RAR: org.apache.geronimo.plugins.monitoring/agent-ds/3.0-SNAPSHOT/car
    RAR: org.apache.geronimo.plugins.monitoring/mconsole-ds/3.0-SNAPSHOT/car
    RAR: org.apache.geronimo.plugins/uddi-db/3.0-SNAPSHOT/car
    WAR: org.apache.geronimo.configs/remote-deploy-tomcat/3.0-SNAPSHOT/car
    WAR: org.apache.geronimo.configs/uddi-tomcat/3.0-SNAPSHOT/car
    WAR: org.apache.geronimo.configs/welcome-tomcat/3.0-SNAPSHOT/car
    WAR: org.apache.geronimo.plugins.monitoring/mconsole-tomcat/3.0-SNAPSHOT/car
    WAR: org.apache.geronimo.plugins/activemq-console-tomcat/3.0-SNAPSHOT/car
    WAR: org.apache.geronimo.plugins/debugviews-console-tomcat/3.0-SNAPSHOT/car
    WAR: org.apache.geronimo.plugins/openejb-console-tomcat/3.0-SNAPSHOT/car
    WAR: org.apache.geronimo.plugins/plancreator-console-tomcat/3.0-SNAPSHOT/car
    WAR: org.apache.geronimo.plugins/plugin-console-tomcat/3.0-SNAPSHOT/car
    WAR: org.apache.geronimo.plugins/sysdb-console-tomcat/3.0-SNAPSHOT/car

  Web Applications:
    /
    /activemq
    /console
    /console-base
    /debug-views
    /juddi
    /monitoring
    /openejb-server
    /plan-creator
    /plugin
    /remote-deploy
    /system-database

Geronimo Application Server started
{noformat}


Startup Geronimo server without a configured instance
{noformat:borderStyle=solid}
[ger@server /opt/geronimo3]# env JAVA_HOME=/usr/jdk1.6.0 bin/geronimo run
Using GERONIMO_HOME:   /opt/geronimo3
Using GERONIMO_SERVER: /opt/geronimo3
Using GERONIMO_TMPDIR: /opt/geronimo3/var/temp
Using JRE_HOME:        /usr/jdk1.6.0/jre
                                                          
     ______                       _                       
    / ____/___  _________  ____  (_)____ ___  ____        
   / / __ / _ \/ ___/ __ \/ __ \/ // __ `__ \/ __ \  
  / /_/ //  __/ /  / /_/ / / / / // / / / / / /_/ /       
  \____/ \___/_/   \____/_/ /_/_//_/ /_/ /_/\____/    

  Apache Geronimo (3.0-SNAPSHOT)

Hit '<tab>' for a list of available commands
and '[cmd] --help' for help on a specific command.
Hit '<ctrl-d>' or 'osgi:shutdown' to shutdown Geronimo.

geronimo> Booting Geronimo Kernel (in Java 1.6.0_25)...
Starting Geronimo Application Server v3.0-SNAPSHOT
[****************************************] 100%  67s Startup complete                                         
  Listening on Ports:
    1050 0.0.0.0 CORBA Naming Service
    1099 0.0.0.0 RMI Naming
    1527 0.0.0.0 Derby Connector
    2001 0.0.0.0 OpenEJB SSL ORB Adapter
    4201 0.0.0.0 OpenEJB Daemon
    6882 0.0.0.0 OpenEJB ORB Adapter
    8009 0.0.0.0 Tomcat Connector AJP TomcatAJPConnector
    8080 0.0.0.0 Tomcat Connector HTTP BIO TomcatWebConnector
    8443 0.0.0.0 Tomcat Connector HTTPS BIO TomcatWebSSLConnector
    9999 0.0.0.0 JMX Remoting Connector
   61616 0.0.0.0 ActiveMQ Transport Connector

  Started Application Modules:
    EAR: org.apache.geronimo.plugins/console-tomcat/3.0-SNAPSHOT/car
    JAR: org.apache.geronimo.configs/mejb/3.0-SNAPSHOT/car
    RAR: org.apache.geronimo.configs/activemq-ra/3.0-SNAPSHOT/car
    RAR: org.apache.geronimo.configs/system-database/3.0-SNAPSHOT/car
    RAR: org.apache.geronimo.plugins.monitoring/agent-ds/3.0-SNAPSHOT/car
    RAR: org.apache.geronimo.plugins.monitoring/mconsole-ds/3.0-SNAPSHOT/car
    RAR: org.apache.geronimo.plugins/uddi-db/3.0-SNAPSHOT/car
    WAR: org.apache.geronimo.configs/remote-deploy-tomcat/3.0-SNAPSHOT/car
    WAR: org.apache.geronimo.configs/uddi-tomcat/3.0-SNAPSHOT/car
    WAR: org.apache.geronimo.configs/welcome-tomcat/3.0-SNAPSHOT/car
    WAR: org.apache.geronimo.plugins.monitoring/mconsole-tomcat/3.0-SNAPSHOT/car
    WAR: org.apache.geronimo.plugins/activemq-console-tomcat/3.0-SNAPSHOT/car
    WAR: org.apache.geronimo.plugins/debugviews-console-tomcat/3.0-SNAPSHOT/car
    WAR: org.apache.geronimo.plugins/openejb-console-tomcat/3.0-SNAPSHOT/car
    WAR: org.apache.geronimo.plugins/plancreator-console-tomcat/3.0-SNAPSHOT/car
    WAR: org.apache.geronimo.plugins/plugin-console-tomcat/3.0-SNAPSHOT/car
    WAR: org.apache.geronimo.plugins/sysdb-console-tomcat/3.0-SNAPSHOT/car

  Web Applications:
    /
    /activemq
    /console
    /console-base
    /debug-views
    /juddi
    /monitoring
    /openejb-server
    /plan-creator
    /plugin
    /remote-deploy
    /system-database

Geronimo Application Server started
{noformat}


                
> Defining and Using org.apache.geronimo.server.dir versus org.apache.geronimo.home.dir in shell scripts
> ------------------------------------------------------------------------------------------------------
>
>                 Key: GERONIMO-6275
>                 URL: https://issues.apache.org/jira/browse/GERONIMO-6275
>             Project: Geronimo
>          Issue Type: Sub-task
>      Security Level: public(Regular issues) 
>          Components: startup/shutdown
>    Affects Versions: 3.0-beta-1
>         Environment: Linux x86, Red Hat Enterprise Linux Server release 5.4 (Tikanga); Java JDK1.6.0_25
>            Reporter: Russell E Glaue
>            Assignee: Russell E Glaue
>            Priority: Minor
>              Labels: geronimo
>         Attachments: geronimo-6275.patch
>
>
> Related: GERONIMO-6270, GERONIMO-6175, GERONIMO-6174, GERONIMO-5987, GERONIMO-4229
> It would be easier to support multiple server instances of Geronimo if there is one shell variable that is used to reference the path on disk to the instance, proposed as GERONIMO_SERVER as opposed to the GERONIMO_HOME installation path. This issue tracks the discussion and modification of such a change.
> GERONIMO_SERVER defines:
> - GERONIMO_SERVER defaults to GERONIMO_HOME if no instances are specified
> - GERONIMO_SERVER is expanded to GERONIMO_HOME/GERONIMO_SERVER if GERONIMO_SERVER is a relative path
> - GERONIMO_SERVER defines org.apache.geronimo.server.dir
> In the java code there are the following properties:
> # org.apache.geronimo.home.dir - equivelant to GERONIMO_HOME shell variable
> # org.apache.geronimo.server.dir - proposed to be equivelant to GERONIMO_SERVER 
> The words "BASE" versus "HOME" appear a few times in the source. Once example is "karaf.home" and "karaf.base" properties. According to the code usage, it is aparant that these terms are assumed to mean these things:
> # HOME - path location on disk of read-only binaries and configuration
> # BASE - path location on disk of read-write configuration and data storage
> The term BASE is intended to point at a Geronimo Server Instance Base path. However, this has not been clearly defined, and has appeared to cause some misusage. Thus this and other issues lead to the removal of GERONIMO_BASE shell variable and org.apache.geronimo.base.dir java property in GERONIMO-4229 .
> Currently, to start a Geronimo Instance, the org.apache.geronimo.server.dir java property must be defined in the GERONIMO_OPTS variable. However, this prevents the Shell scripts from being able to know and use the path location to the Geronimo Server Instance.
> In particular, there are a few issues affected by a variable like this not being available.
> # Reported in GERONIMO-6174 - GERONIMO_TMPDIR is set in the shell/bat scripts as GERONIMO_HOME/var/tmp. In turn, the java property "java.io.tmpdir" is set to GERONIMO_TMPDIR (this is GERONIMO_HOME/var/tmp). Shouldn't GERONIMO_TMPDIR instead be set to a value provided by GERONIMO_SERVER/var/tmp ?
> -- affected scripts: client, deploy, geronimo, internalLauncher, jaxws-tools
> -- This can be argued to whether or not all Geronimo Server Instance should share a common temp directory.
> # Reported in GERONIMO-6174 - The java properties karaf.home and karaf.base are both being set to GERONIMO_HOME. When instead karaf.base should be set to a value held by GERONIMO_SERVER.
> -- affected scripts: client, geronimo, internalLauncher
> -- see resulting errors and reasoning in GERONIMO-6174
> # Not Reported - The java property java.util.logging.config.file is being set to GERONIMO_HOME/etc/java.util.logging.properties . It is intended to be an empty configuration file. This only causes a problem when using instances if GERONIMO_HOME/etc does not exist (it would not exist if GERONIMO_SERVER/etc is intended to be used).
> -- affected scripts: client, geronimo, internalLauncher
> # Not Reported - Logging startup output to GERONIMO_HOME/var/log/geronimo.out - Obviously if multiple instances are being started, this should be GERONIMO_SERVER/var/log/geronimo.out . Any error is silent if var/log/geronimo.out does not exist.
> -- affected scripts: geronimo
> # Not Reported - The register-service script does a grep and awk on GERONIMO_HOME/var/config/config-substitutions.properties to discover the portOffset . Obviously this will not work for multiple instances
> -- The register-service script does not take multiple instances into consideration at all
> -- affected scripts: register-service
> Solution:
> - Create a new shell variable GERONIMO_SERVER to hold the path location to the run-time server configuration, and leave GERONIMO_HOME to hold the path location to the Geronimo Installation Path.
> Arguments:
> - If GERONIMO_SERVER defaults to GERONIMO_HOME, then any installation not having multiple instances configured will not be affected.
> - This will not resolve the multiple instance support issue in Geronimo, GERONIMO-6270, but having this support in the shell scripts will get Geronimo much closer.
> - About half of the currently known issues (listed above) can be resolved with the addition of GERONIMO_SERVER as proposed.
> The remaining currently known issues will be:
> # GERONIMO-6174: the proper use of karaf.home versus karaf.base
> # GERONIMO-6270 SnapshotConfigXMLBuilder using the org.apache.geronimo.server.dir/var directory
> # GERONIMO-5987 and GERONIMO-6270: ActiveMQ using org.apache.geronimo.server.dir as the base for var rather than the current working directory the run-time server is in at startup
> # GERONIMO-6175: The Geronimo Repository using org.apache.geronimo.server.dir instead of org.apache.geronimo.home.dir

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (GERONIMO-6275) Defining and Using org.apache.geronimo.server.dir versus org.apache.geronimo.home.dir in shell scripts

Posted by "Russell E Glaue (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/GERONIMO-6275?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13211683#comment-13211683 ] 

Russell E Glaue commented on GERONIMO-6275:
-------------------------------------------

The "# Resolve the full path to GERONIMO_SERVER" section is copied from the $PRG resolution logic just a dozen lines prior in the section titled "# resolve links - $0 may be a softlink".

I have concern that putting path resolution code in a file identified/named for java environment purposes (setjavaenv) could lead to confusion. Also, we would still be duplicating the "resolution" code since it is identical to the existing duplicated code that resolves GERONIMO_HOME in each of those same shell files (because I just copied it).

I hesitated in modifying existing code lines, so I went for the copy-and-paste. The ideal resolution is probably to move the $PRG/$GERONIMO_HOME resolution code into a function.

{noformat:borderStyle=solid}
RESOLVE_PATH=  # Global return variable for resolvePath()
resolvePath () {
  LPRG=$1
  [ ! -d $LPRG ] && return 1
  while [ -h "$LPRG" ]; do
    ls=`ls -ld "$LPRG"`
    link=`expr "$ls" : '.*-> \(.*\)$'`
    if expr "$link" : '/.*' > /dev/null; then
      LPRG="$link"
    else
      LPRG=`dirname "$LPRG"`/"$link"
    fi
  done
  RESOLVE_PATH="$LPRG"
  return 0
}

# resolve links - $0 may be a softlink
resolvePath "$0" && PRG="$RESOLVE_PATH"

# Get standard environment variables
PRGDIR=`dirname "$PRG"`

# Only set GERONIMO_HOME if not already set
[ -z "$GERONIMO_HOME" ] && GERONIMO_HOME=`cd "$PRGDIR/.." ; pwd`

# Set GERONIMO_SERVER if not already set, otherwise resolve the full path
if [ -z "$GERONIMO_SERVER" ] ; then
  GERONIMO_SERVER="$GERONIMO_HOME"
else
  ATTEMPTED_SERVER="$GERONIMO_SERVER"
  resolvePath `cd "$GERONIMO_HOME"; cd $GERONIMO_SERVER 2>/dev/null && pwd` && GERONIMO_SERVER="$RESOLVE_PATH"
  [ -z "$GERONIMO_SERVER" ] && echo "ERROR: GERONIMO_SERVER: $ATTEMPTED_SERVER not found!" && exit 1
fi
{noformat}

Unfortunately, bash functions cannot return strings, only an exit/return status in $?. So we would have to use a global variable. Anyone have a more efficient idea for doing this?

                
> Defining and Using org.apache.geronimo.server.dir versus org.apache.geronimo.home.dir in shell scripts
> ------------------------------------------------------------------------------------------------------
>
>                 Key: GERONIMO-6275
>                 URL: https://issues.apache.org/jira/browse/GERONIMO-6275
>             Project: Geronimo
>          Issue Type: Sub-task
>      Security Level: public(Regular issues) 
>          Components: startup/shutdown
>    Affects Versions: 3.0-beta-1
>         Environment: Linux x86, Red Hat Enterprise Linux Server release 5.4 (Tikanga); Java JDK1.6.0_25
>            Reporter: Russell E Glaue
>            Assignee: Russell E Glaue
>            Priority: Minor
>              Labels: geronimo
>         Attachments: geronimo-6275-procrun_service.patch, geronimo-6275.patch
>
>
> Related: GERONIMO-6270, GERONIMO-6175, GERONIMO-6174, GERONIMO-5987, GERONIMO-4229
> It would be easier to support multiple server instances of Geronimo if there is one shell variable that is used to reference the path on disk to the instance, proposed as GERONIMO_SERVER as opposed to the GERONIMO_HOME installation path. This issue tracks the discussion and modification of such a change.
> GERONIMO_SERVER defines:
> - GERONIMO_SERVER defaults to GERONIMO_HOME if no instances are specified
> - GERONIMO_SERVER is expanded to GERONIMO_HOME/GERONIMO_SERVER if GERONIMO_SERVER is a relative path
> - GERONIMO_SERVER defines org.apache.geronimo.server.dir
> In the java code there are the following properties:
> # org.apache.geronimo.home.dir - equivelant to GERONIMO_HOME shell variable
> # org.apache.geronimo.server.dir - proposed to be equivelant to GERONIMO_SERVER 
> The words "BASE" versus "HOME" appear a few times in the source. Once example is "karaf.home" and "karaf.base" properties. According to the code usage, it is aparant that these terms are assumed to mean these things:
> # HOME - path location on disk of read-only binaries and configuration
> # BASE - path location on disk of read-write configuration and data storage
> The term BASE is intended to point at a Geronimo Server Instance Base path. However, this has not been clearly defined, and has appeared to cause some misusage. Thus this and other issues lead to the removal of GERONIMO_BASE shell variable and org.apache.geronimo.base.dir java property in GERONIMO-4229 .
> Currently, to start a Geronimo Instance, the org.apache.geronimo.server.dir java property must be defined in the GERONIMO_OPTS variable. However, this prevents the Shell scripts from being able to know and use the path location to the Geronimo Server Instance.
> In particular, there are a few issues affected by a variable like this not being available.
> # Reported in GERONIMO-6174 - GERONIMO_TMPDIR is set in the shell/bat scripts as GERONIMO_HOME/var/tmp. In turn, the java property "java.io.tmpdir" is set to GERONIMO_TMPDIR (this is GERONIMO_HOME/var/tmp). Shouldn't GERONIMO_TMPDIR instead be set to a value provided by GERONIMO_SERVER/var/tmp ?
> -- affected scripts: client, deploy, geronimo, internalLauncher, jaxws-tools
> -- This can be argued to whether or not all Geronimo Server Instance should share a common temp directory.
> # Reported in GERONIMO-6174 - The java properties karaf.home and karaf.base are both being set to GERONIMO_HOME. When instead karaf.base should be set to a value held by GERONIMO_SERVER.
> -- affected scripts: client, geronimo, internalLauncher
> -- see resulting errors and reasoning in GERONIMO-6174
> # Not Reported - The java property java.util.logging.config.file is being set to GERONIMO_HOME/etc/java.util.logging.properties . It is intended to be an empty configuration file. This only causes a problem when using instances if GERONIMO_HOME/etc does not exist (it would not exist if GERONIMO_SERVER/etc is intended to be used).
> -- affected scripts: client, geronimo, internalLauncher
> # Not Reported - Logging startup output to GERONIMO_HOME/var/log/geronimo.out - Obviously if multiple instances are being started, this should be GERONIMO_SERVER/var/log/geronimo.out . Any error is silent if var/log/geronimo.out does not exist.
> -- affected scripts: geronimo
> # Not Reported - The register-service script does a grep and awk on GERONIMO_HOME/var/config/config-substitutions.properties to discover the portOffset . Obviously this will not work for multiple instances
> -- The register-service script does not take multiple instances into consideration at all
> -- affected scripts: register-service
> Solution:
> - Create a new shell variable GERONIMO_SERVER to hold the path location to the run-time server configuration, and leave GERONIMO_HOME to hold the path location to the Geronimo Installation Path.
> Arguments:
> - If GERONIMO_SERVER defaults to GERONIMO_HOME, then any installation not having multiple instances configured will not be affected.
> - This will not resolve the multiple instance support issue in Geronimo, GERONIMO-6270, but having this support in the shell scripts will get Geronimo much closer.
> - About half of the currently known issues (listed above) can be resolved with the addition of GERONIMO_SERVER as proposed.
> The remaining currently known issues will be:
> # GERONIMO-6174: the proper use of karaf.home versus karaf.base
> # GERONIMO-6270 SnapshotConfigXMLBuilder using the org.apache.geronimo.server.dir/var directory
> # GERONIMO-5987 and GERONIMO-6270: ActiveMQ using org.apache.geronimo.server.dir as the base for var rather than the current working directory the run-time server is in at startup
> # GERONIMO-6175: The Geronimo Repository using org.apache.geronimo.server.dir instead of org.apache.geronimo.home.dir

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Issue Comment Edited] (GERONIMO-6275) Defining and Using org.apache.geronimo.server.dir versus org.apache.geronimo.home.dir in shell scripts

Posted by "Russell E Glaue (Issue Comment Edited) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/GERONIMO-6275?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13211683#comment-13211683 ] 

Russell E Glaue edited comment on GERONIMO-6275 at 2/20/12 5:59 AM:
--------------------------------------------------------------------

The "# Resolve the full path to GERONIMO_SERVER" section is copied from the $PRG resolution logic just a dozen lines prior in the section titled "# resolve links - $0 may be a softlink".

I have concern that putting path resolution code in a file identified/named for java environment purposes (setjavaenv) could lead to confusion. Also, we would still be duplicating the "resolution" code since it is identical to the existing duplicated code that resolves GERONIMO_HOME in each of those same shell files (because I just copied it).

I hesitated in modifying existing code lines, so I went for the copy-and-paste. The ideal resolution is probably to move the $PRG/$GERONIMO_HOME resolution code into a function.

{noformat:borderStyle=solid}
RESOLVE_PATH=  # Global return variable for resolvePath()
resolvePath () {
  RESOLVE_PATH=""
  LPRG=$1
  [ ! -d $LPRG ] && return 1
  while [ -h "$LPRG" ]; do
    ls=`ls -ld "$LPRG"`
    link=`expr "$ls" : '.*-> \(.*\)$'`
    if expr "$link" : '/.*' > /dev/null; then
      LPRG="$link"
    else
      LPRG=`dirname "$LPRG"`/"$link"
    fi
  done
  RESOLVE_PATH="$LPRG"
  return 0
}

# resolve links - $0 may be a softlink
resolvePath "$0" && PRG="$RESOLVE_PATH"

# Get standard environment variables
PRGDIR=`dirname "$PRG"`

# Only set GERONIMO_HOME if not already set
[ -z "$GERONIMO_HOME" ] && GERONIMO_HOME=`cd "$PRGDIR/.." ; pwd`

# Set GERONIMO_SERVER if not already set, otherwise resolve the full path
if [ -z "$GERONIMO_SERVER" ] ; then
  GERONIMO_SERVER="$GERONIMO_HOME"
else
  ATTEMPTED_SERVER="$GERONIMO_SERVER"
  resolvePath `cd "$GERONIMO_HOME"; cd $GERONIMO_SERVER 2>/dev/null && pwd` && GERONIMO_SERVER="$RESOLVE_PATH"
  [ -z "$GERONIMO_SERVER" ] && echo "ERROR: GERONIMO_SERVER: $ATTEMPTED_SERVER not found!" && exit 1
fi
{noformat}

Unfortunately, bash functions cannot return strings, only an exit/return status in $?. So we would have to use a global variable. Anyone have a more efficient idea for doing this?

                
      was (Author: rglaue):
    The "# Resolve the full path to GERONIMO_SERVER" section is copied from the $PRG resolution logic just a dozen lines prior in the section titled "# resolve links - $0 may be a softlink".

I have concern that putting path resolution code in a file identified/named for java environment purposes (setjavaenv) could lead to confusion. Also, we would still be duplicating the "resolution" code since it is identical to the existing duplicated code that resolves GERONIMO_HOME in each of those same shell files (because I just copied it).

I hesitated in modifying existing code lines, so I went for the copy-and-paste. The ideal resolution is probably to move the $PRG/$GERONIMO_HOME resolution code into a function.

{noformat:borderStyle=solid}
RESOLVE_PATH=  # Global return variable for resolvePath()
resolvePath () {
  LPRG=$1
  [ ! -d $LPRG ] && return 1
  while [ -h "$LPRG" ]; do
    ls=`ls -ld "$LPRG"`
    link=`expr "$ls" : '.*-> \(.*\)$'`
    if expr "$link" : '/.*' > /dev/null; then
      LPRG="$link"
    else
      LPRG=`dirname "$LPRG"`/"$link"
    fi
  done
  RESOLVE_PATH="$LPRG"
  return 0
}

# resolve links - $0 may be a softlink
resolvePath "$0" && PRG="$RESOLVE_PATH"

# Get standard environment variables
PRGDIR=`dirname "$PRG"`

# Only set GERONIMO_HOME if not already set
[ -z "$GERONIMO_HOME" ] && GERONIMO_HOME=`cd "$PRGDIR/.." ; pwd`

# Set GERONIMO_SERVER if not already set, otherwise resolve the full path
if [ -z "$GERONIMO_SERVER" ] ; then
  GERONIMO_SERVER="$GERONIMO_HOME"
else
  ATTEMPTED_SERVER="$GERONIMO_SERVER"
  resolvePath `cd "$GERONIMO_HOME"; cd $GERONIMO_SERVER 2>/dev/null && pwd` && GERONIMO_SERVER="$RESOLVE_PATH"
  [ -z "$GERONIMO_SERVER" ] && echo "ERROR: GERONIMO_SERVER: $ATTEMPTED_SERVER not found!" && exit 1
fi
{noformat}

Unfortunately, bash functions cannot return strings, only an exit/return status in $?. So we would have to use a global variable. Anyone have a more efficient idea for doing this?

                  
> Defining and Using org.apache.geronimo.server.dir versus org.apache.geronimo.home.dir in shell scripts
> ------------------------------------------------------------------------------------------------------
>
>                 Key: GERONIMO-6275
>                 URL: https://issues.apache.org/jira/browse/GERONIMO-6275
>             Project: Geronimo
>          Issue Type: Sub-task
>      Security Level: public(Regular issues) 
>          Components: startup/shutdown
>    Affects Versions: 3.0-beta-1
>         Environment: Linux x86, Red Hat Enterprise Linux Server release 5.4 (Tikanga); Java JDK1.6.0_25
>            Reporter: Russell E Glaue
>            Assignee: Russell E Glaue
>            Priority: Minor
>              Labels: geronimo
>         Attachments: geronimo-6275-procrun_service.patch, geronimo-6275.patch
>
>
> Related: GERONIMO-6270, GERONIMO-6175, GERONIMO-6174, GERONIMO-5987, GERONIMO-4229
> It would be easier to support multiple server instances of Geronimo if there is one shell variable that is used to reference the path on disk to the instance, proposed as GERONIMO_SERVER as opposed to the GERONIMO_HOME installation path. This issue tracks the discussion and modification of such a change.
> GERONIMO_SERVER defines:
> - GERONIMO_SERVER defaults to GERONIMO_HOME if no instances are specified
> - GERONIMO_SERVER is expanded to GERONIMO_HOME/GERONIMO_SERVER if GERONIMO_SERVER is a relative path
> - GERONIMO_SERVER defines org.apache.geronimo.server.dir
> In the java code there are the following properties:
> # org.apache.geronimo.home.dir - equivelant to GERONIMO_HOME shell variable
> # org.apache.geronimo.server.dir - proposed to be equivelant to GERONIMO_SERVER 
> The words "BASE" versus "HOME" appear a few times in the source. Once example is "karaf.home" and "karaf.base" properties. According to the code usage, it is aparant that these terms are assumed to mean these things:
> # HOME - path location on disk of read-only binaries and configuration
> # BASE - path location on disk of read-write configuration and data storage
> The term BASE is intended to point at a Geronimo Server Instance Base path. However, this has not been clearly defined, and has appeared to cause some misusage. Thus this and other issues lead to the removal of GERONIMO_BASE shell variable and org.apache.geronimo.base.dir java property in GERONIMO-4229 .
> Currently, to start a Geronimo Instance, the org.apache.geronimo.server.dir java property must be defined in the GERONIMO_OPTS variable. However, this prevents the Shell scripts from being able to know and use the path location to the Geronimo Server Instance.
> In particular, there are a few issues affected by a variable like this not being available.
> # Reported in GERONIMO-6174 - GERONIMO_TMPDIR is set in the shell/bat scripts as GERONIMO_HOME/var/tmp. In turn, the java property "java.io.tmpdir" is set to GERONIMO_TMPDIR (this is GERONIMO_HOME/var/tmp). Shouldn't GERONIMO_TMPDIR instead be set to a value provided by GERONIMO_SERVER/var/tmp ?
> -- affected scripts: client, deploy, geronimo, internalLauncher, jaxws-tools
> -- This can be argued to whether or not all Geronimo Server Instance should share a common temp directory.
> # Reported in GERONIMO-6174 - The java properties karaf.home and karaf.base are both being set to GERONIMO_HOME. When instead karaf.base should be set to a value held by GERONIMO_SERVER.
> -- affected scripts: client, geronimo, internalLauncher
> -- see resulting errors and reasoning in GERONIMO-6174
> # Not Reported - The java property java.util.logging.config.file is being set to GERONIMO_HOME/etc/java.util.logging.properties . It is intended to be an empty configuration file. This only causes a problem when using instances if GERONIMO_HOME/etc does not exist (it would not exist if GERONIMO_SERVER/etc is intended to be used).
> -- affected scripts: client, geronimo, internalLauncher
> # Not Reported - Logging startup output to GERONIMO_HOME/var/log/geronimo.out - Obviously if multiple instances are being started, this should be GERONIMO_SERVER/var/log/geronimo.out . Any error is silent if var/log/geronimo.out does not exist.
> -- affected scripts: geronimo
> # Not Reported - The register-service script does a grep and awk on GERONIMO_HOME/var/config/config-substitutions.properties to discover the portOffset . Obviously this will not work for multiple instances
> -- The register-service script does not take multiple instances into consideration at all
> -- affected scripts: register-service
> Solution:
> - Create a new shell variable GERONIMO_SERVER to hold the path location to the run-time server configuration, and leave GERONIMO_HOME to hold the path location to the Geronimo Installation Path.
> Arguments:
> - If GERONIMO_SERVER defaults to GERONIMO_HOME, then any installation not having multiple instances configured will not be affected.
> - This will not resolve the multiple instance support issue in Geronimo, GERONIMO-6270, but having this support in the shell scripts will get Geronimo much closer.
> - About half of the currently known issues (listed above) can be resolved with the addition of GERONIMO_SERVER as proposed.
> The remaining currently known issues will be:
> # GERONIMO-6174: the proper use of karaf.home versus karaf.base
> # GERONIMO-6270 SnapshotConfigXMLBuilder using the org.apache.geronimo.server.dir/var directory
> # GERONIMO-5987 and GERONIMO-6270: ActiveMQ using org.apache.geronimo.server.dir as the base for var rather than the current working directory the run-time server is in at startup
> # GERONIMO-6175: The Geronimo Repository using org.apache.geronimo.server.dir instead of org.apache.geronimo.home.dir

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira