(String[] args)
| 15 | private static final Logger LOGGER = Logger.getLogger(App.class.getName()); |
| 16 | |
| 17 | public static void main(String[] args) { |
| 18 | int serverCount = 3; // Number of Tomcat instances |
| 19 | int basePort = 57890; |
| 20 | |
| 21 | ExecutorService executor = Executors.newFixedThreadPool(serverCount); |
| 22 | List<TomcatServer> servers = new ArrayList<>(); |
| 23 | |
| 24 | for (int i = 0; i < serverCount; i++) { |
| 25 | int port = basePort + i; |
| 26 | TomcatServer server = new TomcatServer(port); |
| 27 | servers.add(server); |
| 28 | executor.submit(server); |
| 29 | } |
| 30 | |
| 31 | // Allow servers to run in parallel |
| 32 | executor.shutdown(); |
| 33 | } |
| 34 | } |
| 35 | |
| 36 | class TomcatServer implements Runnable { |
nothing calls this directly
no outgoing calls
no test coverage detected