cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r789898 - /cxf/trunk/rt/core/src/main/java/org/apache/cxf/configuration/spring/ConfigurerImpl.java
Date Tue, 30 Jun 2009 19:38:37 GMT
Author: dkulp
Date: Tue Jun 30 19:38:37 2009
New Revision: 789898

URL: http://svn.apache.org/viewvc?rev=789898&view=rev
Log:
[CXF-2279] Make sure app contexts are active.

Modified:
    cxf/trunk/rt/core/src/main/java/org/apache/cxf/configuration/spring/ConfigurerImpl.java

Modified: cxf/trunk/rt/core/src/main/java/org/apache/cxf/configuration/spring/ConfigurerImpl.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/core/src/main/java/org/apache/cxf/configuration/spring/ConfigurerImpl.java?rev=789898&r1=789897&r2=789898&view=diff
==============================================================================
--- cxf/trunk/rt/core/src/main/java/org/apache/cxf/configuration/spring/ConfigurerImpl.java
(original)
+++ cxf/trunk/rt/core/src/main/java/org/apache/cxf/configuration/spring/ConfigurerImpl.java
Tue Jun 30 19:38:37 2009
@@ -22,6 +22,7 @@
 import java.lang.reflect.Method;
 import java.util.ArrayList;
 import java.util.HashMap;
+import java.util.Iterator;
 import java.util.List;
 import java.util.Map;
 import java.util.Set;
@@ -44,6 +45,7 @@
 import org.springframework.beans.factory.wiring.BeanWiringInfoResolver;
 import org.springframework.context.ApplicationContext;
 import org.springframework.context.ApplicationContextAware;
+import org.springframework.context.ConfigurableApplicationContext;
 
 public class ConfigurerImpl extends BeanConfigurerSupport 
     implements Configurer, ApplicationContextAware, BusExtension {
@@ -221,6 +223,16 @@
     public final void addApplicationContext(ApplicationContext ac) {
         if (!appContexts.contains(ac)) {
             appContexts.add(ac);
+            
+            Iterator<ApplicationContext> it = appContexts.iterator();
+            while (it.hasNext()) {
+                ApplicationContext c = it.next();
+                if (c instanceof ConfigurableApplicationContext
+                    && !((ConfigurableApplicationContext)c).isActive()) {
+                    it.remove();
+                }
+            }
+            
             initWildcardDefinitionMap();
         }
     }



Mime
View raw message