JOnAS 5.2 duplicated arguments in jonas script

[email protected] Thu, 19 Jan 2012 16:28:15 +0100
Newsgroups gmane.comp.java.objectweb.jonas
Message-ID <OF2EFB2B09.7753203C-ONC125798A.005318A5-C125798A.00550253@bull.net>
Message en plusieurs parties au format MIME
--=_alternative 00550233C125798A_=
Content-Type: text/plain; charset="US-ASCII"

Hello, when using 5.2.0-M4-SNAPSHOT I happened to notice that the jonas 
process had some duplicated arguments
(among which a long library path) which made the arguments list much 
longer than expected.

By looking closer into the jonas script, I found that the arguments passed 
with "-D" are repeated due to the use of both
JONAS_OPTS and START_OPS variables in that script :

JONAS_OPTS="\
 -Djonas.root=$JONAS_ROOT \
 -Djonas.base=$JONAS_BASE \
...
"
...
START_OPTS=
...
while [ "$#" -gt 0 ]
  do case "$1" in
...
    -D*)
      JONAS_OPTS="$JONAS_OPTS $1"
      START_OPTS="$START_OPTS $1"
      ;;
...
  esac
  if [ "$1" != "-win" ]; then
    PARAMS="$PARAMS $1"
  fi
  shift
done
...
     $JAVA $JAVA_OPTS $START_OPTS $JONAS_OPTS -cp $JONAS_CLASSPATH ...
...


I found no report of this problem in the archives and it seems the same 
problem is present in Jonas 5.2.2 script that we are going to use soon.


--

------------------------------------------------------------------------
mailto: [email protected]  EVIDIAN
Phone : 01.30.80.61.17                   Avenue Jean Jaures
Fax   : 01.30.80.77.99                   78340 Les Clayes sous Bois
                                         FRANCE

        OpenMaster                       http://www.evidian.com
------------------------------------------------------------------------
--=_alternative 00550233C125798A_=
Content-Type: text/html; charset="US-ASCII"

<font size=2 face="sans-serif">Hello, when using 5.2.0-M4-SNAPSHOT I happened
to notice that the jonas process had some duplicated arguments</font>
<br><font size=2 face="sans-serif">(among which a long library path) which
made the arguments list much longer than expected.</font>
<br>
<br><font size=2 face="sans-serif">By looking closer into the jonas script,
I found that the arguments passed with &quot;-D&quot; are repeated due
to the use of both</font>
<br><font size=2 face="Arial">JONAS_OPTS</font><font size=2 face="sans-serif">
and START_OPS variables in that script :</font>
<br>
<br><font size=2 face="sans-serif">JONAS_OPTS=&quot;\</font>
<br><font size=2 face="sans-serif">&nbsp;-Djonas.root=$JONAS_ROOT \</font>
<br><font size=2 face="sans-serif">&nbsp;-Djonas.base=$JONAS_BASE \</font>
<br><font size=2 face="sans-serif">...</font>
<br><font size=2 face="sans-serif">&quot;</font>
<br><font size=2 face="sans-serif">...</font>
<br><font size=2 face="sans-serif">START_OPTS=</font>
<br><font size=2 face="sans-serif">...</font>
<br><font size=2 face="sans-serif">while [ &quot;$#&quot; -gt 0 ]</font>
<br><font size=2 face="sans-serif">&nbsp; do case &quot;$1&quot; in</font>
<br><font size=2 face="sans-serif">...</font>
<br><font size=2 face="sans-serif">&nbsp; &nbsp; -D*)</font>
<br><font size=2 face="sans-serif">&nbsp; &nbsp; &nbsp; JONAS_OPTS=&quot;$JONAS_OPTS
$1&quot;</font>
<br><font size=2 face="sans-serif">&nbsp; &nbsp; &nbsp; START_OPTS=&quot;$START_OPTS
$1&quot;</font>
<br><font size=2 face="sans-serif">&nbsp; &nbsp; &nbsp; ;;</font>
<br><font size=2 face="sans-serif">...</font>
<br><font size=2 face="sans-serif">&nbsp; esac</font>
<br><font size=2 face="sans-serif">&nbsp; if [ &quot;$1&quot; != &quot;-win&quot;
]; then</font>
<br><font size=2 face="sans-serif">&nbsp; &nbsp; PARAMS=&quot;$PARAMS $1&quot;</font>
<br><font size=2 face="sans-serif">&nbsp; fi</font>
<br><font size=2 face="sans-serif">&nbsp; shift</font>
<br><font size=2 face="sans-serif">done</font>
<br><font size=2 face="sans-serif">...</font>
<br><font size=2 face="sans-serif">&nbsp; &nbsp; &nbsp;$JAVA $JAVA_OPTS
$START_OPTS $JONAS_OPTS -cp $JONAS_CLASSPATH ...</font>
<br><font size=2 face="sans-serif">...</font>
<br>
<br>
<br><font size=2 face="sans-serif">I found no report of this problem in
the archives and it seems the same problem is present in Jonas 5.2.2 script
that we are going to use soon.</font>
<br>
<br>
<br><font size=2 face="Courier New">--</font>
<br>
<br><font size=2 face="Courier New">------------------------------------------------------------------------</font>
<br><font size=2 face="Courier New">mailto: [email protected]
&nbsp;EVIDIAN</font>
<br><font size=2 face="Courier New">Phone : 01.30.80.61.17 &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Avenue Jean Jaures</font>
<br><font size=2 face="Courier New">Fax &nbsp; : 01.30.80.77.99 &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 78340 Les Clayes
sous Bois</font>
<br><font size=2 face="Courier New">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;FRANCE</font>
<br>
<br><font size=2 face="Courier New">&nbsp; &nbsp; &nbsp; &nbsp; OpenMaster
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
</font><a href=http://www.evidian.com/><font size=2 face="Courier New">http://www.evidian.com</font></a>
<br><font size=2 face="Courier New">------------------------------------------------------------------------</font>
--=_alternative 00550233C125798A_=--