Changeset 2783

Show
Ignore:
Timestamp:
02/12/10 15:25:25
Author:
johnsa
Message:

port startjboss script enhancements to windows (ability to set JVM settings) and update usage text

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/build/quickstart/linux/startjboss

    r2780 r2783  
    1010 
    1111usage() { 
    12   echo "  $PRG [-heap size] [-newsize size] [-permgen size] " 
     12  echo "  $PRG [-heap size] [-newsize size] [-permsize size] " 
    1313  echo "" 
    14   echo " where:" 
     14  echo " Where:" 
    1515  echo "" 
    1616  echo " -heap sets the heap size and should be n for bytes" 
    17   echo "                                        nK for kilo-bytes
    18   echo "                                        nM for mega-bytes
    19   echo "                                        nG for giga-bytes
     17  echo "                                        nK for kilo-bytes (e.g. 256K)
     18  echo "                                        nM for mega-bytes (e.g. 256M)
     19  echo "                                        nG for giga-bytes (e.g. 1G)
    2020  echo "" 
    2121  echo " -newsize sets the new generation size and has the same form as -heap" 
    2222  echo "  the value should be around one third of the heap" 
    2323  echo "" 
    24   echo " -permsize sets the permgen size and has the same form as -heap" 
     24  echo " -permsize sets the permgen size and has the same form as -heap" 
    2525  echo "   The value should probably not be less than 256M" 
     26  echo "" 
     27  echo "" 
     28  echo "Default settings:" 
     29  echo "heap     = $heap"  
     30  echo "newsize  = $newsize" 
     31  echo "permsize = $permsize" 
     32  echo "" 
    2633  echo "" 
    2734} 
  • trunk/build/quickstart/windows/startjboss.bat

    r2738 r2783  
    77 
    88SET BASE_DIR=%CD% 
     9SET PRG=%0 
     10 
     11:: Set defaults 
     12SET heap=1G 
     13SET newsize=330M 
     14SET permsize=256M 
     15 
     16GOTO branch 
     17 
     18:heap 
     19  SHIFT 
     20  SET heap=%1 
     21  SHIFT 
     22  GOTO branch 
     23 
     24:newsize 
     25  SHIFT 
     26  SET newsize=%1 
     27  SHIFT 
     28  GOTO branch 
     29 
     30:permsize 
     31  SHIFT 
     32  SET permsize=%1 
     33  SHIFT 
     34  GOTO branch 
     35 
     36:doneWithArgs 
    937 
    1038SET JBOSS_VERSION=jboss-5.1.0.GA 
     
    3462SET BW_DATA_DIR_DEF=-Dorg.bedework.data.dir=%BW_DATA_DIR%\ 
    3563 
     64SET JAVA_OPTS=%JAVA_OPTS% -Xms%heap% -Xmx%heap% 
     65SET JAVA_OPTS=%JAVA_OPTS% -XX:NewSize=%newsize% -XX:MaxNewSize=%newsize% 
     66SET JAVA_OPTS=%JAVA_OPTS% -XX:PermSize=%permsize% -XX:MaxPermSize=%permsize% 
     67 
    3668SET RUN_CMD=.\%JBOSS_VERSION%\bin\run.bat -c %JBOSS_CONFIG% %JBOSS_BIND% %JBOSS_PORTS% %LOG_THRESHOLD% %ACTIVEMQ_DIRPREFIX% %BW_DATA_DIR_DEF% 
    3769 
     
    4375 
    4476%RUN_CMD% 
     77GOTO:EOF 
     78 
     79 
     80:: Iterate over the command line arguments; 
     81:: DOS Batch labels can't contain hyphens, so convert them 
     82:: (otherwise, we could just "GOTO %1") 
     83:branch 
     84IF "%1" == "-usage" GOTO usage 
     85IF "%1" == "-heap" GOTO heap 
     86IF "%1" == "-newsize" GOTO newsize 
     87IF "%1" == "-permsize" GOTO permsize 
     88GOTO doneWithArgs 
    4589  
     90:usage 
     91ECHO. 
     92ECHO. 
     93ECHO. 
     94ECHO startjboss.bat [-heap size] [-newsize size] [-permsize size] 
     95ECHO. 
     96ECHO Where: 
     97ECHO. 
     98ECHO -heap sets the heap size and should be n for bytes 
     99ECHO                                        nK for kilo-bytes (e.g. 256K) 
     100ECHO                                        nM for mega-bytes (e.g. 256M) 
     101ECHO                                        nG for giga-bytes (e.g. 1G) 
     102ECHO. 
     103ECHO -newsize sets the new generation size and has the same form as -heap 
     104ECHO  the value should be around one third of the heap 
     105ECHO. 
     106ECHO -permsize sets the permgen size and has the same form as -heap 
     107ECHO   The value should probably not be less than 256M 
     108ECHO. 
     109ECHO. 
     110ECHO. Default settings: 
     111ECHO. heap    = %heap% 
     112ECHO. newsize = %newsize% 
     113ECHO. permgen = %permsize%