A Portable Mariage!
Posted by mholmes on 13 Jun 2008 in Activity log
After much work and testing, we finally got a portable version of Mariage working alongside ColDesp on a thumbdrive. These were the tweaks we had to do:
- We had to set the Java Options manually in the catalina.bat and catalina.sh files respectively, like this:
set JAVA_OPTS=-Xms128M -Xmx256M -XX:MaxPermSize=256m
JAVA_OPTS=-Xms128M" "-Xmx256M" "-XX:MaxPermSize=256m
All attempts to pass these values through command-line parameters in our own startup batch file failed. We wanted to make sure Tomcat had enough memory; the default 64MB isn't very much. - Enhanced the Windows startup batch file, so that it will work both when it's in the root of a removable drive, and when it's in a subfolder somewhere. In the one case, the
%cd%
variable ends with a backslash, and in the other it doesn't. This is the batch file now:if EXIST %cd%jdk1.6.0_06 goto javaInRoot set JAVA_HOME=%cd%\jdk1.6.0_06 goto doneSettingJavaHome :javaInRoot set JAVA_HOME=%cd%jdk1.6.0_06 :doneSettingJavaHome set PATH=%JAVA_HOME%;%PATH% if EXIST %cd%apache-tomcat-6.0.16 goto tomcatInRoot %cd%\apache-tomcat-6.0.16 goto doneSettingTomcatHome :tomcatInRoot set CATALINA_HOME=%cd%apache-tomcat-6.0.16 :doneSettingTomcatHome cd apache-tomcat-6.0.16\bin echo starting... call startup.bat echo Waiting for the server to start... ping -n 120 127.0.0.1>nul start http://localhost:8080/coldesp/ pause
- Updated the version of Saxon 9 that was in the two Cocoons. 9.0.0.2, which was previously there, was throwing an error with some of our Mariage documents. We were unable to figure out why, but there are similar bug reports which suggest it's a problem with Saxon, and updating to the latest version solved it.
- Tested on Windows.
- Tested on Mac.
- Tested on Linux.
I now have two thumbdrives I can use, and we'll put the stuff on CD too for the trip, just in case.
The point of this is not just for the trip to Finland, though; in case of server emergencies, we can now run Mariage in any other Tomcat as a standalone, and repoint the domain to it. This is the way we should really handle all our projects in future, so that it's easier to update Cocoon for any given project without damaging the others.
This entry was posted by Martin and filed under Activity log.