We have a tomcat server up and running. We want our application to run as 5 independent instances on this tomcat server. Each instance needs a different set of command line arguments to run properly.
How can we pass those arguments per instance?
We run the current version of tomcat server. We have a Spring-Boot-Application which needs to run as 5 instances on this tomcat server. This is so that each instance takes care of a single port and on the business-level serves a different environment (dev, test, ...).
We are using different spring profiles per environment and therefore need to pass those to each instance running on tomcat.
Thing is: We cannot figure out how to pass those arguments. There seems like no configuration to do this per instance. We know about the JAVA_OPTS which are used on the entire tomcat.
We thought about declaring those arguments envrionment variables, but: - potential other applications shouldn't know about those configurations. - the configuration is pretty specific per instance and therefore a lot of 'noise' is produced which might be hard to maintain in the future.
As we look for the right place and right way to do that, there is no code yet.
Expected result: 5 instances of the same application are up and running on a tomcat server, each configured individually. Hoped for: A way to alter the config.xmls or alter a batch script to pass command line args.