I have several web applications that are deployed as .war files on a Tomcat server. Each web application has an ApplicationListener.java class which implements ServletContextListener. Within the ApplicationListener.java classes, I use ScheduledExecutorService to spawn a single thread which is used to consume messages from a queue:
@Override
public void contextInitialized(ServletContextEvent event) {
ReferenceData.init();
scheduler = Executors.newSingleThreadScheduledExecutor();
scheduler.scheduleAtFixedRate(new ScheduledConsumer(), 0, ReferenceData.CONSUME_INTERVAL, TimeUnit.MILLISECONDS);
}
Here is my question: Is it possible to create an additional web application that can "talk" with all of the others? I essentially want to create a dashboard that will let me display the current ReferenceData.CONSUME_INTERVAL
values (used in the code above) for each web application, as well as the ability to update their values.
Is this possible? I would appreciate any design recommendations, details, or examples.
Thanks!
This is a kind of configuration, right?
Well you could create one JMX-Beans in each of your application(slave), and a new Application that proxy all those JMX-Beans(master). Those JMX-Slaves register/unregister themselves to JMX-Master.
Now you got some Points:
(The JMX-Master may be solved in a one-class-app)
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.