Running same web application in 2 instances having separate tomcat
I am trying to run 2 IntelliJ instances with different git branches of same project.(have cloned 2 repos for the same)
To achieve same, I open 2 multiple instances of IntelliJ 2018(licensed).
I have kept 2 instances of Tomcat installations. I have done changes to the http,jmx etc ports in each individual IntelliJ instances and I can run each of them individually on IntelliJ, they get deployed to tomcat successfully.
But if I deploy to one IntelliJ(A) instance when tomcat on IntelliJ(B) is already running. It restarts the IntelliJ(B) as well.
Starting one intellij tomcat will start another one as well.
I even happened to change the shutdown port in server.xml in both the tomcat installations to keep them different
I am not clear how can I achieve this objective of running same web application in separate intellij instances?
Please sign in to leave a comment.
When you say 2 IntelliJ IDEA instances - do you mean you really have 2 different IDE installations? Or you just open multiple IDE windows of the same running instance?
These two Tomcat installations - did you place them into different directories and added as different Application servers in IDEs?
When the other instance is restarted - what is the output it shows? Please attach the outputs form these two Tomcat runs from both cases.
I open multiple instances of the same IDE installation.
Yes I have 2 tomcat installations in different folders. Added them as application server.
When I restart the IntelliJ A tomcat, below is the first thing that hits the IntelliJ B tomcat logs(which was already running).
Also I have observed one thing.
Catalina Base that gets printed on server restarts on the both the instances point to the same location
Cannot reproduce. It looks like you are using the same Tomcat instance. Double check you have added two different tomcat installations in Settings (Preferences on macOS) | Build, Execution, Deployment | Application Servers | Build, Execution, Deployment | Application Servers and select separate tomcat servers in Run/Debug Configurations. Try re-creating the run configurations. Try version from https://www.jetbrains.com/idea/download