Author: markt
Date: Tue Mar 9 22:37:01 2010
New Revision: 921178
URL: http://svn.apache.org/viewvc?rev=921178&view=rev
Log:
Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=47997
Process changes for all naming contexts, not just the global one
Modified:
tomcat/tc5.5.x/trunk/STATUS.txt
tomcat/tc5.5.x/trunk/container/catalina/src/share/org/apache/catalina/core/NamingContextListener.java
tomcat/tc5.5.x/trunk/container/webapps/docs/changelog.xml
Modified: tomcat/tc5.5.x/trunk/STATUS.txt
URL:
http://svn.apache.org/viewvc/tomcat/tc5.5.x/trunk/STATUS.txt?rev=921178&r1=921177&r2=921178&view=diff
==============================================================================
--- tomcat/tc5.5.x/trunk/STATUS.txt (original)
+++ tomcat/tc5.5.x/trunk/STATUS.txt Tue Mar 9 22:37:01 2010
@@ -66,12 +66,6 @@ PATCHES PROPOSED TO BACKPORT:
kkolinko - Just a note: This issue won't affect configurations where
Jasper
runs with development=false.
-* Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=47997
- Process changes for all naming contexts, not just the global one
- http://svn.apache.org/viewvc?rev=883134&view=rev
- +1: markt, rjung, kkolinko
- -1:
-
* Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=48179
Improve processing of TLD cache file
https://issues.apache.org/bugzilla/attachment.cgi?id=24918
Modified:
tomcat/tc5.5.x/trunk/container/catalina/src/share/org/apache/catalina/core/NamingContextListener.java
URL:
http://svn.apache.org/viewvc/tomcat/tc5.5.x/trunk/container/catalina/src/share/org/apache/catalina/core/NamingContextListener.java?rev=921178&r1=921177&r2=921178&view=diff
==============================================================================
---
tomcat/tc5.5.x/trunk/container/catalina/src/share/org/apache/catalina/core/NamingContextListener.java
(original)
+++
tomcat/tc5.5.x/trunk/container/catalina/src/share/org/apache/catalina/core/NamingContextListener.java
Tue Mar 9 22:37:01 2010
@@ -223,6 +223,8 @@ public class NamingContextListener
(sm.getString("naming.namingContextCreationFailed", e));
}
+ namingResources.addPropertyChangeListener(this);
+
// Binding the naming context to the class loader
if (container instanceof Context) {
// Setting the context in read only mode
@@ -237,7 +239,6 @@ public class NamingContextListener
}
if (container instanceof Server) {
- namingResources.addPropertyChangeListener(this);
org.apache.naming.factory.ResourceLinkFactory.setGlobalContext
(namingContext);
try {
@@ -416,9 +417,7 @@ public class NamingContextListener
/**
- * Process property change events. Currently, only listens to such events
- * on the <code>NamingResources</code> instance for the global naming
- * resources.
+ * Process property change events.
*
* @param event The property change event that has occurred
*/
@@ -449,7 +448,7 @@ public class NamingContextListener
/**
- * Process a property change on the global naming resources, by making the
+ * Process a property change on the naming resources, by making the
* corresponding addition or removal to the associated JNDI context.
*
* @param name Property name of the change to be processed
@@ -460,9 +459,6 @@ public class NamingContextListener
Object oldValue,
Object newValue) {
- // NOTE - It seems that the Context for global JNDI resources
- // is left in read-write mode, so we do not have to change it here
-
if (name.equals("ejb")) {
if (oldValue != null) {
ContextEjb ejb = (ContextEjb) oldValue;
Modified: tomcat/tc5.5.x/trunk/container/webapps/docs/changelog.xml
URL:
http://svn.apache.org/viewvc/tomcat/tc5.5.x/trunk/container/webapps/docs/changelog.xml?rev=921178&r1=921177&r2=921178&view=diff
==============================================================================
--- tomcat/tc5.5.x/trunk/container/webapps/docs/changelog.xml (original)
+++ tomcat/tc5.5.x/trunk/container/webapps/docs/changelog.xml Tue Mar 9
22:37:01 2010
@@ -130,6 +130,11 @@
with RFC2616. (markt/kkolinko)
</fix>
<fix>
+ <bug>47997</bug>: Enable the NamingResourcesMBean to work with
+ non-Server (i.e. Context) containers. Patch provided by Michael Allman.
+ (markt)
+ </fix>
+ <fix>
<bug>48004</bug>: Allow applications to set the Server header. (markt)
</fix>
<fix>
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]