tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chiranga Alwis <>
Subject Apache Tomcat context update listeners
Date Fri, 26 Feb 2016 11:44:45 GMT

I have currently created a LifecycleListener which listens to Tomcat's
context deployment event and loads data in a custom configuration file at
that point.

I have been trying to find out whether LifecycleListeners support context
update and modification events but yet in my understanding I could not
discover an appropriate resource to use.

Most specifically, no event type which is triggered at the point of Context
modification has been provided. Or does Tomcat first destroy the modified
context instance and create a new Context instance which means it calls a
destroy event on the Context and then create a new Context instance?

The ones that have come closest to the expectations are as follows:

 - A Context WatchedResource
<> which simply
observes defined resources
   within a context. But yet in my understanding this does not allow me
   to monitor any modification within the context.

 - Java WatchService

It also has to be noted that currently I am collecting all the deployed
Contexts at deployment to a map along with their corresponding custom
configuration objects. Hence, there has to be a mechanism through which I
am to identify the Context which is modified.

Any help with this will be highly appreciated.

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message