Bug 47997

Summary: NamingContextListener fails to add itself as a PropertyChangeListener to all namingResources
Product: Tomcat 5 Reporter: Michael Allman <msa>
Component: CatalinaAssignee: Tomcat Developers Mailing List <dev>
Severity: normal CC: msa
Priority: P2    
Version: 5.5.28   
Target Milestone: ---   
Hardware: Macintosh   
OS: Mac OS X 10.4   
Attachments: proposed fix

Description Michael Allman 2009-10-14 17:45:53 UTC
Created attachment 24378 [details]
proposed fix

In the NamingContextListener.lifecycleEvent(LifecycleEvent) method, the
NamingContextListener object fails to add itself as a PropertyChangeListener to
namingResources whose context is not a Server, e.g. a Context instance.  This
prevents the NamingResourcesMBean from working with non-Server contexts.
Comment 1 Michael Allman 2009-10-28 11:49:41 UTC
I just want to add that without this patch, the standard Admin app functionality of adding a DataSource to a deployed Web app does not work.  (Adding a DataSource dynamically is my app's use case as well, incidentally.)
Comment 2 Mark Thomas 2009-11-22 12:02:47 UTC
Thanks for the patch. It has been applied to trunk and proposed for 6.0.x and 5.5.x
Comment 3 Mark Thomas 2009-12-21 08:22:20 UTC
This has been fixed in 6.0.x and will be included in 6.0.21 onwards. Thanks again for the patch.
Comment 4 Michael Allman 2009-12-21 12:39:18 UTC
Can this please be applied to 5.5.x and released with 5.5.29?  I ask because my client is using a patched (with this patch) version of 5.5.28 in production and I'd like to simplify their upgrades by obviating the need to patch and build future releases of 5.5.x.  Thanks.
Comment 5 Mark Thomas 2010-03-09 22:37:31 UTC
The patch has been applied to 5.5.x and will be included in 5.5.29 onwards. Again, thanks for the patch.