Running multiple instances of tomcat in eclipse WTP
- by lisak
Hey, SCENARIO: 10 CATALINA_BASEs with own configuration (always the same port numbers 8080, but 10 different IP/hostnames on one host via virtual IPs).
created a server in WTP and pick "Use the custom location" option in the server configuration in eclipse.
New configuration files are created in workspace/Server/server-name-config/
Set up the server path and deploy path for my catalina base (not the internal .metadata one)
After I started it, the new configuration files overwrote the original catalina-base/conf files I had there - I was glad, it should be like this
but after I made changes in the eclipse config files workspace/Server/server-name-config/ and restarted the server, the changes didn't appeared in the original files in CATALINA_BASE/conf
What the hell is that ?
So I set the CATALINA_BASE/conf/server.xml to fault configuration and restarted tomcat from eclipse and it worked ! it took the configuration from /Server/server-name-config/server.xml
Then I deleted CATALINA_BASE/conf/server.xml and it said that there is no server.xml in catalina base !
How is it possible ? I don't understand why eclipse WTP developers made so tight integration. There should by just symbolic links in /Server/server-name-config/ pointing to CATALINA_BASE/conf/ ... now there is a weird system which is totally unpredictable. The changes in /Server/server-name-config/ are not reflected in CATALINA_BASE/conf ... from where the standard bootstrap.jar or other catalina classloaders and classes build server, engine and other objects with particular setting.
Moreover the CATALINA_BASEs could be used outside eclipse then.
The second problem, I'm setting up various things in CATALINA_BASE/bin/startup.sh and setenv.sh which is easy cause I can use bash for it. Is then modifying VM parameters in the "Open launch configuration" settings the only way how to do it in eclipse ?
Sorry for such a huge pile of questions, but I'm annoyed by the fact that it is much better to not use eclipse WTP for this because it is very poorly designed and it's a shame because this would spare me a lot of time. And using the internal .metadata/ instances it's even more terrifying way that the one I described.