Multiple ResponseMX applications with mapserver
In the past, if you used mapserver as the mapping engine, you could only use one ResponseMX server application inside Tomcat. This was due to the fact that mapserver uses native libraries, which can only be loaded once by any given process, rather than pure java libraries.
We have found a way to remove this restriction, which opens up a number of possibilities. For example, it allows different applications to be created for different user groups. We are already using this to allow us to host several different ResponseMX applications in our test environment.
The change requires a small code modification to the ResponseMX server. If you would like to run multiple ResponseMX servers on the same tomcat, please contact Dotted Eyes so we can supply you with a new version of ResponseMX server.
There is no configuration required, but you have to make the following changes to your software installation once you have the new server software.
Set up
Assuming you have two ResponseMX applications called rmxa and rmxb, you’ll need to do the following:
Copy the mapscript.jar file from the WEB-INF/lib folder of one of the ResponseMX applications to $TOMCAT_HOME/shared/lib
For example
cd /opt/app/apache-tomcat-5.5.17/webapps/rmxa/WEB-INF/lib
cp mapscript.jar /opt/app/apache-tomcat-5.5.17/shared/lib
Then for each ResponseMX application installation inside your tomcat, rename the mapscript.jar file so that it is not automatically loaded when ResponseMX starts.
For example
cd /opt/app/apache-tomcat-5.5.17/webapps/rmxa/WEB-INF/lib
mv mapscript.jar mapscript.jar-DO-NOT-LOAD
cd /opt/app/apache-tomcat-5.5.17/webapps/rmxb/WEB-INF/lib
mv mapscript.jar mapscript.jar-DO-NOT-LOAD
Restart tomcat and have fun with maps.
Troubleshooting
It is important that none of the applications try to load mapscript.jar from the WEB-INF/lib folder any more, so if the server won’t start or won’t produce maps, check each installed webapp for mapscript.jar first.
