incubator-connectors-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From shinich...@apache.org
Subject svn commit: r1140488 - in /incubator/lcf/trunk: CHANGES.txt framework/scripts/executecommand.bat framework/scripts/executecommand.sh framework/scripts/options.env
Date Tue, 28 Jun 2011 09:00:06 GMT
Author: shinichiro
Date: Tue Jun 28 09:00:06 2011
New Revision: 1140488

URL: http://svn.apache.org/viewvc?rev=1140488&view=rev
Log:
Fix for CONNECTORS-215

Added:
    incubator/lcf/trunk/framework/scripts/options.env
Modified:
    incubator/lcf/trunk/CHANGES.txt
    incubator/lcf/trunk/framework/scripts/executecommand.bat
    incubator/lcf/trunk/framework/scripts/executecommand.sh

Modified: incubator/lcf/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/CHANGES.txt?rev=1140488&r1=1140487&r2=1140488&view=diff
==============================================================================
--- incubator/lcf/trunk/CHANGES.txt (original)
+++ incubator/lcf/trunk/CHANGES.txt Tue Jun 28 09:00:06 2011
@@ -3,6 +3,10 @@ $Id$
 
 ======================= 0.3-dev =========================
 
+CONNECTORS-215: Setting an environment variable of agent.
+Add options.env file, in which we can define optional value.
+(Karl Wright, Shinichiro Abe)
+
 CONNECTORS-216: Clean up document removal options in IProcessActivity,
 and modify connectors accordingly to avoid using the deprecated form of
 deleteDocument().

Modified: incubator/lcf/trunk/framework/scripts/executecommand.bat
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/framework/scripts/executecommand.bat?rev=1140488&r1=1140487&r2=1140488&view=diff
==============================================================================
--- incubator/lcf/trunk/framework/scripts/executecommand.bat (original)
+++ incubator/lcf/trunk/framework/scripts/executecommand.bat Tue Jun 28 09:00:06 2011
@@ -22,11 +22,12 @@ set OLDDIR=%CD%
 cd "%MCF_HOME%\processes"
 set CLASSPATH=.
 for %%f in (jar/*) do call script\setclasspath.bat %%f
+for /f "delims=" %%a in ('type %MCF_HOME%\processes\script\options.env') do set JAVAOPTIONS=%%a
 set JAVADEFINES=
 for %%g in (define/*) do call script\setdefine.bat %%g
 rem restore old path here
 cd "%OLDDIR%"
-"%JAVA_HOME%\bin\java" "-Dorg.apache.manifoldcf.configfile=%MCF_HOME%\properties.xml" %JAVADEFINES%
-classpath "%CLASSPATH%" %*
+"%JAVA_HOME%\bin\java" "-Dorg.apache.manifoldcf.configfile=%MCF_HOME%\properties.xml" %JAVAOPTIONS%
%JAVADEFINES% -classpath "%CLASSPATH%" %*
 goto done
 :nojavahome
 echo Environment variable JAVA_HOME is not set properly.

Modified: incubator/lcf/trunk/framework/scripts/executecommand.sh
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/framework/scripts/executecommand.sh?rev=1140488&r1=1140487&r2=1140488&view=diff
==============================================================================
--- incubator/lcf/trunk/framework/scripts/executecommand.sh (original)
+++ incubator/lcf/trunk/framework/scripts/executecommand.sh Tue Jun 28 09:00:06 2011
@@ -34,6 +34,9 @@ if [ -e "$JAVA_HOME"/bin/java ] ; then
                 CLASSPATH="$MCF_HOME"/processes/jar/"$filename"
             fi
         done
+
+        # Build the options
+	OPTIONS=$(cat "$MCF_HOME"/processes/script/options.env)
         
         # Build the defines
         DEFINES="-Dorg.apache.manifoldcf.configfile=$MCF_HOME/properties.xml"
@@ -44,7 +47,7 @@ if [ -e "$JAVA_HOME"/bin/java ] ; then
             done
         fi
 
-        "$JAVA_HOME/bin/java" $DEFINES -cp "$CLASSPATH" "$@"
+        "$JAVA_HOME/bin/java" $OPTIONS $DEFINES -cp "$CLASSPATH" "$@"
         exit $?
         
     else

Added: incubator/lcf/trunk/framework/scripts/options.env
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/framework/scripts/options.env?rev=1140488&view=auto
==============================================================================
--- incubator/lcf/trunk/framework/scripts/options.env (added)
+++ incubator/lcf/trunk/framework/scripts/options.env Tue Jun 28 09:00:06 2011
@@ -0,0 +1 @@
+-Xms256m -Xmx256m
\ No newline at end of file



Mime
View raw message