cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r808616 - in /cxf/trunk: api/src/main/java/org/apache/cxf/configuration/ common/common/src/main/java/org/apache/cxf/common/injection/ rt/bindings/coloc/src/main/java/org/apache/cxf/binding/coloc/feature/ rt/core/src/main/java/org/apache/cxf...
Date Thu, 27 Aug 2009 20:43:40 GMT
Author: dkulp
Date: Thu Aug 27 20:43:38 2009
New Revision: 808616

URL: http://svn.apache.org/viewvc?rev=808616&view=rev
Log:
More updates for reducing JSR250 processing

Modified:
    cxf/trunk/api/src/main/java/org/apache/cxf/configuration/ConfiguredBeanLocator.java
    cxf/trunk/common/common/src/main/java/org/apache/cxf/common/injection/ResourceInjector.java
    cxf/trunk/rt/bindings/coloc/src/main/java/org/apache/cxf/binding/coloc/feature/ColocFeature.java
    cxf/trunk/rt/core/src/main/java/org/apache/cxf/binding/BindingFactoryManagerImpl.java
    cxf/trunk/rt/core/src/main/java/org/apache/cxf/bus/spring/BusDefinitionParser.java
    cxf/trunk/rt/core/src/main/java/org/apache/cxf/bus/spring/Jsr250BeanPostProcessor.java
    cxf/trunk/rt/core/src/main/java/org/apache/cxf/bus/spring/SpringBeanLocator.java
    cxf/trunk/rt/core/src/main/java/org/apache/cxf/clustering/FailoverFeature.java
    cxf/trunk/rt/core/src/main/java/org/apache/cxf/feature/FastInfosetFeature.java
    cxf/trunk/rt/core/src/main/java/org/apache/cxf/feature/LoggingFeature.java
    cxf/trunk/rt/core/src/main/java/org/apache/cxf/transport/TransportFinder.java
    cxf/trunk/rt/core/src/main/java/org/apache/cxf/transport/http/QueryHandlerRegistryImpl.java
    cxf/trunk/rt/core/src/main/resources/META-INF/cxf/cxf.xml
    cxf/trunk/rt/javascript/src/main/java/org/apache/cxf/javascript/JavascriptOptionsFeature.java
    cxf/trunk/rt/management/src/main/java/org/apache/cxf/management/interceptor/ResponseTimeFeature.java
    cxf/trunk/rt/transports/http-jetty/src/main/java/org/apache/cxf/transport/http_jetty/JettyHTTPServerEngineFactory.java
    cxf/trunk/rt/transports/http-jetty/src/main/java/org/apache/cxf/transport/http_jetty/JettyHTTPTransportFactory.java
    cxf/trunk/rt/transports/http-jetty/src/main/java/org/apache/cxf/transport/http_jetty/spring/JettyHTTPServerEngineFactoryBeanDefinitionParser.java
    cxf/trunk/rt/transports/http-jetty/src/main/java/org/apache/cxf/transport/http_jetty/spring/JettySpringTypesFactory.java
    cxf/trunk/rt/transports/http-jetty/src/test/java/org/apache/cxf/transport/http_jetty/JettyHTTPServerEngineTest.java
    cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/http/gzip/GZIPFeature.java
    cxf/trunk/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSConfigFeature.java
    cxf/trunk/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSTransportFactory.java
    cxf/trunk/rt/ws/addr/src/main/java/org/apache/cxf/ws/addressing/WSAddressingFeature.java
    cxf/trunk/rt/ws/policy/src/main/java/org/apache/cxf/ws/policy/WSPolicyFeature.java
    cxf/trunk/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/feature/RMFeature.java

Modified: cxf/trunk/api/src/main/java/org/apache/cxf/configuration/ConfiguredBeanLocator.java
URL: http://svn.apache.org/viewvc/cxf/trunk/api/src/main/java/org/apache/cxf/configuration/ConfiguredBeanLocator.java?rev=808616&r1=808615&r2=808616&view=diff
==============================================================================
--- cxf/trunk/api/src/main/java/org/apache/cxf/configuration/ConfiguredBeanLocator.java (original)
+++ cxf/trunk/api/src/main/java/org/apache/cxf/configuration/ConfiguredBeanLocator.java Thu
Aug 27 20:43:38 2009
@@ -27,13 +27,53 @@
  */
 public interface ConfiguredBeanLocator {
     
+    /**
+     * Gets the names of all the configured beans of the specific type.  Does
+     * not cause them to be loaded.
+     * @param type
+     * @return
+     */
     List<String> getBeanNamesOfType(Class<?> type);
     
+    /**
+     * Gets all the configured beans of the specific types.  Causes them
+     * all to be loaded. 
+     * @param <T>
+     * @param type
+     * @return
+     */
     <T> Collection<? extends T> getBeansOfType(Class<T> type);
 
+    /**
+     * Returns the bean of the given type and name.  Causes it to be loaded.
+     * @param <T>
+     * @param name
+     * @param type
+     * @return
+     */
     <T> T getBeanOfType(String name, Class<T> type);
     
+    /**
+     * Iterates through the beans of the given type, calling the listener
+     * to determine if it should be loaded or not. 
+     * @param <T>
+     * @param type
+     * @param listener
+     * @return
+     */
     <T> boolean loadBeansOfType(Class<T> type, BeanLoaderListener<T> listener);
+
+    /**
+     * For supporting "legacy" config, checks the configured bean to see if
+     * it has a property configured with the given name/value.  Mostly used 
+     * for supporting things configured with "activationNamespaces" set. 
+     * @param <T>
+     * @param type
+     * @param property
+     * @param value
+     * @return
+     */
+    boolean hasConfiguredPropertyValue(String beanName, String propertyName, String value);
     
     public interface BeanLoaderListener<T> {
         /**

Modified: cxf/trunk/common/common/src/main/java/org/apache/cxf/common/injection/ResourceInjector.java
URL: http://svn.apache.org/viewvc/cxf/trunk/common/common/src/main/java/org/apache/cxf/common/injection/ResourceInjector.java?rev=808616&r1=808615&r2=808616&view=diff
==============================================================================
--- cxf/trunk/common/common/src/main/java/org/apache/cxf/common/injection/ResourceInjector.java
(original)
+++ cxf/trunk/common/common/src/main/java/org/apache/cxf/common/injection/ResourceInjector.java
Thu Aug 27 20:43:38 2009
@@ -34,7 +34,6 @@
 import javax.annotation.PreDestroy;
 import javax.annotation.Resource;
 import javax.annotation.Resources;
-import javax.xml.namespace.QName;
 
 
 import org.apache.cxf.common.annotation.AbstractAnnotationVisitor;
@@ -85,7 +84,8 @@
     }
     
     public static boolean processable(Class<?> cls, Object o) {
-        if (QName.class.equals(cls)) {
+        if (cls.getName().startsWith("java.")
+            || cls.getName().startsWith("javax.")) {
             return false;
         }
         NoJSR250Annotations njsr = cls.getAnnotation(NoJSR250Annotations.class);

Modified: cxf/trunk/rt/bindings/coloc/src/main/java/org/apache/cxf/binding/coloc/feature/ColocFeature.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/bindings/coloc/src/main/java/org/apache/cxf/binding/coloc/feature/ColocFeature.java?rev=808616&r1=808615&r2=808616&view=diff
==============================================================================
--- cxf/trunk/rt/bindings/coloc/src/main/java/org/apache/cxf/binding/coloc/feature/ColocFeature.java
(original)
+++ cxf/trunk/rt/bindings/coloc/src/main/java/org/apache/cxf/binding/coloc/feature/ColocFeature.java
Thu Aug 27 20:43:38 2009
@@ -21,12 +21,14 @@
 import org.apache.cxf.Bus;
 import org.apache.cxf.binding.coloc.ColocInInterceptor;
 import org.apache.cxf.binding.coloc.ColocOutInterceptor;
+import org.apache.cxf.common.injection.NoJSR250Annotations;
 import org.apache.cxf.endpoint.Client;
 import org.apache.cxf.endpoint.ConduitSelector;
 import org.apache.cxf.endpoint.DeferredConduitSelector;
 import org.apache.cxf.feature.AbstractFeature;
 import org.apache.cxf.interceptor.InterceptorProvider;
 
+@NoJSR250Annotations
 public class ColocFeature extends AbstractFeature {
 
     @Override

Modified: cxf/trunk/rt/core/src/main/java/org/apache/cxf/binding/BindingFactoryManagerImpl.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/core/src/main/java/org/apache/cxf/binding/BindingFactoryManagerImpl.java?rev=808616&r1=808615&r2=808616&view=diff
==============================================================================
--- cxf/trunk/rt/core/src/main/java/org/apache/cxf/binding/BindingFactoryManagerImpl.java
(original)
+++ cxf/trunk/rt/core/src/main/java/org/apache/cxf/binding/BindingFactoryManagerImpl.java
Thu Aug 27 20:43:38 2009
@@ -109,7 +109,7 @@
             if (!failed.contains(namespace)) {
                 factory = loadDefaultNamespace(namespace);
                 if (factory == null) {
-                    factory = loadNoDefaultNamespace(namespace);
+                    factory = loadActivationNamespace(namespace);
                 }
                 if (factory == null) {
                     factory = loadAll(namespace);
@@ -193,10 +193,13 @@
         
         return bindingFactories.get(namespace);
     }
-    private BindingFactory loadNoDefaultNamespace(final String namespace) {
+    private BindingFactory loadActivationNamespace(final String namespace) {
+        final ConfiguredBeanLocator locator = bus.getExtension(ConfiguredBeanLocator.class);
+        
         //Second attempt will be to examine the factory class
         //for a DEFAULT_NAMESPACES field and if it doesn't exist, try 
-        //loading.  This will then load most of the "older" things
+        //using the older activation ns things.  This will then load most 
+        //of the "older" things
         ConfiguredBeanLocator.BeanLoaderListener<BindingFactory> listener 
             = new ConfiguredBeanLocator.BeanLoaderListener<BindingFactory>() {
                 public boolean beanLoaded(String name, BindingFactory bean) {
@@ -214,12 +217,11 @@
                     } catch (Exception ex) {
                         //ignore
                     }
-                    return true;
+                    return locator.hasConfiguredPropertyValue(name, "activationNamespaces",
namespace);
                 }
             };                
-        bus.getExtension(ConfiguredBeanLocator.class)
-            .loadBeansOfType(BindingFactory.class,
-                             listener);
+        locator.loadBeansOfType(BindingFactory.class,
+                                listener);
         
         return bindingFactories.get(namespace);
     }

Modified: cxf/trunk/rt/core/src/main/java/org/apache/cxf/bus/spring/BusDefinitionParser.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/core/src/main/java/org/apache/cxf/bus/spring/BusDefinitionParser.java?rev=808616&r1=808615&r2=808616&view=diff
==============================================================================
--- cxf/trunk/rt/core/src/main/java/org/apache/cxf/bus/spring/BusDefinitionParser.java (original)
+++ cxf/trunk/rt/core/src/main/java/org/apache/cxf/bus/spring/BusDefinitionParser.java Thu
Aug 27 20:43:38 2009
@@ -27,6 +27,7 @@
 
 import org.apache.cxf.Bus;
 import org.apache.cxf.bus.CXFBusImpl;
+import org.apache.cxf.common.injection.NoJSR250Annotations;
 import org.apache.cxf.common.util.StringUtils;
 import org.apache.cxf.configuration.spring.AbstractBeanDefinitionParser;
 import org.apache.cxf.configuration.spring.BusWiringType;
@@ -74,7 +75,7 @@
         }
         return id;
     }
-    
+    @NoJSR250Annotations
     public static class BusConfig  {
         CXFBusImpl bus;
         

Modified: cxf/trunk/rt/core/src/main/java/org/apache/cxf/bus/spring/Jsr250BeanPostProcessor.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/core/src/main/java/org/apache/cxf/bus/spring/Jsr250BeanPostProcessor.java?rev=808616&r1=808615&r2=808616&view=diff
==============================================================================
--- cxf/trunk/rt/core/src/main/java/org/apache/cxf/bus/spring/Jsr250BeanPostProcessor.java
(original)
+++ cxf/trunk/rt/core/src/main/java/org/apache/cxf/bus/spring/Jsr250BeanPostProcessor.java
Thu Aug 27 20:43:38 2009
@@ -37,8 +37,8 @@
     private ApplicationContext context;
 
     private boolean isProcessing = true;
-    private int count;
-    private int count2;
+    //private int count;
+    //private int count2;
 
     Jsr250BeanPostProcessor() {
     }
@@ -95,10 +95,12 @@
         if (bean != null 
             && injectable(bean, beanId)) {
             new ResourceInjector(getResourceManager(bean)).inject(bean);
+            /*
             System.out.println("p :" + (++count) + ": " + bean.getClass().getName() + " "
+ beanId);
         } else if (bean != null) {
             System.out.println("np: " + (++count2) 
                                + ": " + bean.getClass().getName() + " " + beanId);
+            */
         }
         return bean;
     }

Modified: cxf/trunk/rt/core/src/main/java/org/apache/cxf/bus/spring/SpringBeanLocator.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/core/src/main/java/org/apache/cxf/bus/spring/SpringBeanLocator.java?rev=808616&r1=808615&r2=808616&view=diff
==============================================================================
--- cxf/trunk/rt/core/src/main/java/org/apache/cxf/bus/spring/SpringBeanLocator.java (original)
+++ cxf/trunk/rt/core/src/main/java/org/apache/cxf/bus/spring/SpringBeanLocator.java Thu Aug
27 20:43:38 2009
@@ -23,10 +23,16 @@
 import java.util.Arrays;
 import java.util.Collection;
 import java.util.Collections;
+import java.util.Iterator;
 import java.util.List;
 
 import org.apache.cxf.configuration.ConfiguredBeanLocator;
+import org.springframework.beans.Mergeable;
+import org.springframework.beans.PropertyValue;
+import org.springframework.beans.factory.config.BeanDefinition;
+import org.springframework.beans.factory.config.TypedStringValue;
 import org.springframework.context.ApplicationContext;
+import org.springframework.context.ConfigurableApplicationContext;
 
 /**
  * 
@@ -72,4 +78,45 @@
         return false;
     }
 
+    public boolean hasConfiguredPropertyValue(String beanName, String propertyName, String
searchValue) {
+        ConfigurableApplicationContext ctxt = (ConfigurableApplicationContext)context;
+        BeanDefinition def = ctxt.getBeanFactory().getBeanDefinition(beanName);
+        if (!def.isSingleton() || def.isAbstract() || def.isAbstract()) {
+            return false;
+        }
+        Collection<?> ids = null;
+        PropertyValue pv = def.getPropertyValues().getPropertyValue(propertyName);
+        
+        if (pv != null) {
+            Object value = pv.getValue();
+            if (!(value instanceof Collection)) {
+                throw new RuntimeException("The property " + propertyName + " must be a collection!");
+            }
+
+            if (value instanceof Mergeable) {
+                if (!((Mergeable)value).isMergeEnabled()) {
+                    ids = (Collection<?>)value;
+                }
+            } else {
+                ids = (Collection<?>)value;
+            }
+        } 
+        
+        if (ids != null) {
+            for (Iterator itr = ids.iterator(); itr.hasNext();) {
+                Object o = itr.next();
+                if (o instanceof TypedStringValue) {
+                    if (searchValue.equals(((TypedStringValue) o).getValue())) {
+                        return true;
+                    }
+                } else {
+                    if (searchValue.equals((String)o)) {
+                        return true;
+                    }
+                }
+            }
+        }
+        return false;
+    }
+
 }

Modified: cxf/trunk/rt/core/src/main/java/org/apache/cxf/clustering/FailoverFeature.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/core/src/main/java/org/apache/cxf/clustering/FailoverFeature.java?rev=808616&r1=808615&r2=808616&view=diff
==============================================================================
--- cxf/trunk/rt/core/src/main/java/org/apache/cxf/clustering/FailoverFeature.java (original)
+++ cxf/trunk/rt/core/src/main/java/org/apache/cxf/clustering/FailoverFeature.java Thu Aug
27 20:43:38 2009
@@ -19,6 +19,7 @@
 package org.apache.cxf.clustering;
 
 import org.apache.cxf.Bus;
+import org.apache.cxf.common.injection.NoJSR250Annotations;
 import org.apache.cxf.endpoint.Client;
 import org.apache.cxf.feature.AbstractFeature;
 
@@ -27,6 +28,7 @@
  * failover from the initial target endpoint to any other
  * compatible endpoint for the target service.
  */
+@NoJSR250Annotations
 public class FailoverFeature extends AbstractFeature {
 
     private FailoverStrategy failoverStrategy;

Modified: cxf/trunk/rt/core/src/main/java/org/apache/cxf/feature/FastInfosetFeature.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/core/src/main/java/org/apache/cxf/feature/FastInfosetFeature.java?rev=808616&r1=808615&r2=808616&view=diff
==============================================================================
--- cxf/trunk/rt/core/src/main/java/org/apache/cxf/feature/FastInfosetFeature.java (original)
+++ cxf/trunk/rt/core/src/main/java/org/apache/cxf/feature/FastInfosetFeature.java Thu Aug
27 20:43:38 2009
@@ -19,6 +19,7 @@
 package org.apache.cxf.feature;
 
 import org.apache.cxf.Bus;
+import org.apache.cxf.common.injection.NoJSR250Annotations;
 import org.apache.cxf.interceptor.FIStaxInInterceptor;
 import org.apache.cxf.interceptor.FIStaxOutInterceptor;
 import org.apache.cxf.interceptor.InterceptorProvider;
@@ -35,6 +36,7 @@
   ]]>
   </pre>
  */
+@NoJSR250Annotations
 public class FastInfosetFeature extends AbstractFeature {
     
     boolean force;

Modified: cxf/trunk/rt/core/src/main/java/org/apache/cxf/feature/LoggingFeature.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/core/src/main/java/org/apache/cxf/feature/LoggingFeature.java?rev=808616&r1=808615&r2=808616&view=diff
==============================================================================
--- cxf/trunk/rt/core/src/main/java/org/apache/cxf/feature/LoggingFeature.java (original)
+++ cxf/trunk/rt/core/src/main/java/org/apache/cxf/feature/LoggingFeature.java Thu Aug 27
20:43:38 2009
@@ -20,6 +20,7 @@
 
 import org.apache.cxf.Bus;
 import org.apache.cxf.annotations.Logging;
+import org.apache.cxf.common.injection.NoJSR250Annotations;
 import org.apache.cxf.interceptor.InterceptorProvider;
 import org.apache.cxf.interceptor.LoggingInInterceptor;
 import org.apache.cxf.interceptor.LoggingOutInterceptor;
@@ -39,6 +40,7 @@
   ]]>
   </pre>
  */
+@NoJSR250Annotations
 public class LoggingFeature extends AbstractFeature {
     private static final int DEFAULT_LIMIT = 64 * 1024;
     private static final LoggingInInterceptor IN = new LoggingInInterceptor(DEFAULT_LIMIT);

Modified: cxf/trunk/rt/core/src/main/java/org/apache/cxf/transport/TransportFinder.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/core/src/main/java/org/apache/cxf/transport/TransportFinder.java?rev=808616&r1=808615&r2=808616&view=diff
==============================================================================
--- cxf/trunk/rt/core/src/main/java/org/apache/cxf/transport/TransportFinder.java (original)
+++ cxf/trunk/rt/core/src/main/java/org/apache/cxf/transport/TransportFinder.java Thu Aug
27 20:43:38 2009
@@ -54,10 +54,10 @@
         }
         T factory = loadDefaultNamespace(namespace);
         if (factory == null) {
-            factory = loadNoDefaultNamespace(namespace);
+            factory = loadActivationNamespaces(namespace);
         }
         if (factory == null) {
-            factory = loadActivationNamespaces(namespace);
+            factory = loadNoDefaultNamespace(namespace);
         }
         if (factory == null) {
             loadAll();
@@ -164,8 +164,6 @@
     
     private T loadActivationNamespaces(final String namespace) {
         //Try old method of having activationNamespaces configured in. 
-        //It activates all the factories in the list until one matches, thus
-        //it activates stuff that really aren't needed.
         ConfiguredBeanLocator.BeanLoaderListener<T> listener 
             = new ConfiguredBeanLocator.BeanLoaderListener<T>() {
                 public boolean beanLoaded(String name, T bean) {
@@ -177,7 +175,9 @@
                 }
 
                 public boolean loadBean(String name, Class<? extends T> type) {
-                    return !map.containsKey(namespace) && !loaded.contains(name);
+                    return locator.hasConfiguredPropertyValue(name,
+                                                              "transportIds",
+                                                              namespace);
                 }
             };
         locator.loadBeansOfType(cls, listener);
@@ -189,7 +189,7 @@
 
     private T loadDefaultURIs(final String uri) {
         //First attempt will be to examine the factory class
-        //for a DEFAULT_NAMESPACES field and use it
+        //for a DEFAULT_URIS field and use it
         URIBeanLoaderListener listener 
             = new URIBeanLoaderListener(uri) {
 

Modified: cxf/trunk/rt/core/src/main/java/org/apache/cxf/transport/http/QueryHandlerRegistryImpl.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/core/src/main/java/org/apache/cxf/transport/http/QueryHandlerRegistryImpl.java?rev=808616&r1=808615&r2=808616&view=diff
==============================================================================
--- cxf/trunk/rt/core/src/main/java/org/apache/cxf/transport/http/QueryHandlerRegistryImpl.java
(original)
+++ cxf/trunk/rt/core/src/main/java/org/apache/cxf/transport/http/QueryHandlerRegistryImpl.java
Thu Aug 27 20:43:38 2009
@@ -39,7 +39,9 @@
     
     public QueryHandlerRegistryImpl() {
     }
-    
+    public QueryHandlerRegistryImpl(Bus b) {
+        setBus(b);
+    }
     public QueryHandlerRegistryImpl(Bus b, List<QueryHandler> handlers) {
         queryHandlers = new CopyOnWriteArrayList<QueryHandler>(handlers);
         setBus(b);
@@ -67,7 +69,7 @@
             
             ConfiguredBeanLocator c = bus.getExtension(ConfiguredBeanLocator.class);
             if (c != null) {
-                for (WSDLQueryHandler handler : c.getBeansOfType(WSDLQueryHandler.class))
{
+                for (QueryHandler handler : c.getBeansOfType(QueryHandler.class)) {
                     if (!queryHandlers.contains(handler)) {
                         queryHandlers.add(handler);
                     }

Modified: cxf/trunk/rt/core/src/main/resources/META-INF/cxf/cxf.xml
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/core/src/main/resources/META-INF/cxf/cxf.xml?rev=808616&r1=808615&r2=808616&view=diff
==============================================================================
--- cxf/trunk/rt/core/src/main/resources/META-INF/cxf/cxf.xml (original)
+++ cxf/trunk/rt/core/src/main/resources/META-INF/cxf/cxf.xml Thu Aug 27 20:43:38 2009
@@ -107,13 +107,6 @@
     	class="org.apache.cxf.transport.http.QueryHandlerRegistryImpl"
     	lazy-init="true">
         <constructor-arg ref="cxf"/>
-        <constructor-arg>
-        	<list>
-        		<bean class="org.apache.cxf.transport.http.WSDLQueryHandler">
-			        <constructor-arg ref="cxf"/>
-        		</bean>	
-        	</list>
-        </constructor-arg>
     </bean>
 
     <bean id="org.apache.cxf.endpoint.EndpointResolverRegistry" 

Modified: cxf/trunk/rt/javascript/src/main/java/org/apache/cxf/javascript/JavascriptOptionsFeature.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/javascript/src/main/java/org/apache/cxf/javascript/JavascriptOptionsFeature.java?rev=808616&r1=808615&r2=808616&view=diff
==============================================================================
--- cxf/trunk/rt/javascript/src/main/java/org/apache/cxf/javascript/JavascriptOptionsFeature.java
(original)
+++ cxf/trunk/rt/javascript/src/main/java/org/apache/cxf/javascript/JavascriptOptionsFeature.java
Thu Aug 27 20:43:38 2009
@@ -22,6 +22,7 @@
 import java.util.Map;
 
 import org.apache.cxf.Bus;
+import org.apache.cxf.common.injection.NoJSR250Annotations;
 import org.apache.cxf.endpoint.Server;
 import org.apache.cxf.feature.AbstractFeature;
 
@@ -40,6 +41,7 @@
   </pre>
   * At this time, there is no corresponding WSDL extension for this information.
  */
+@NoJSR250Annotations
 public class JavascriptOptionsFeature extends AbstractFeature {
     private Map<String, String> namespacePrefixMap;
 

Modified: cxf/trunk/rt/management/src/main/java/org/apache/cxf/management/interceptor/ResponseTimeFeature.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/management/src/main/java/org/apache/cxf/management/interceptor/ResponseTimeFeature.java?rev=808616&r1=808615&r2=808616&view=diff
==============================================================================
--- cxf/trunk/rt/management/src/main/java/org/apache/cxf/management/interceptor/ResponseTimeFeature.java
(original)
+++ cxf/trunk/rt/management/src/main/java/org/apache/cxf/management/interceptor/ResponseTimeFeature.java
Thu Aug 27 20:43:38 2009
@@ -19,9 +19,11 @@
 package org.apache.cxf.management.interceptor;
 
 import org.apache.cxf.Bus;
+import org.apache.cxf.common.injection.NoJSR250Annotations;
 import org.apache.cxf.feature.AbstractFeature;
 import org.apache.cxf.interceptor.InterceptorProvider;
 
+@NoJSR250Annotations
 public class ResponseTimeFeature extends AbstractFeature {
     private static final ResponseTimeMessageInInterceptor IN =
         new ResponseTimeMessageInInterceptor();

Modified: cxf/trunk/rt/transports/http-jetty/src/main/java/org/apache/cxf/transport/http_jetty/JettyHTTPServerEngineFactory.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/transports/http-jetty/src/main/java/org/apache/cxf/transport/http_jetty/JettyHTTPServerEngineFactory.java?rev=808616&r1=808615&r2=808616&view=diff
==============================================================================
--- cxf/trunk/rt/transports/http-jetty/src/main/java/org/apache/cxf/transport/http_jetty/JettyHTTPServerEngineFactory.java
(original)
+++ cxf/trunk/rt/transports/http-jetty/src/main/java/org/apache/cxf/transport/http_jetty/JettyHTTPServerEngineFactory.java
Thu Aug 27 20:43:38 2009
@@ -27,7 +27,6 @@
 import java.util.logging.Level;
 import java.util.logging.Logger;
 
-import javax.annotation.PostConstruct;
 import javax.annotation.Resource;
 
 import org.apache.cxf.Bus;
@@ -85,15 +84,12 @@
     public JettyHTTPServerEngineFactory() {
         // Empty
     }    
-    public JettyHTTPServerEngineFactory(Bus bus,
+    public JettyHTTPServerEngineFactory(Bus b,
                                         Map<String, TLSServerParameters> tls,
                                         Map<String, ThreadingParameters> threading)
{
         tlsParametersMap.putAll(tls);
         threadingParametersMap.putAll(threading);
-        this.bus = bus;
-        if (bus != null) {
-            bus.setExtension(this, JettyHTTPServerEngineFactory.class);
-        }
+        setBus(b);
     }    
     
     
@@ -102,9 +98,16 @@
      * @param bus
      */
     @Resource(name = "cxf")
-    public void setBus(Bus bus) {
+    public final void setBus(Bus bus) {
         assert this.bus == null || this.bus == bus;
         this.bus = bus;
+        if (bus != null) {
+            bus.setExtension(this, JettyHTTPServerEngineFactory.class);
+            lifeCycleManager = bus.getExtension(BusLifeCycleManager.class);
+            if (null != lifeCycleManager) {
+                lifeCycleManager.registerLifeCycleListener(this);
+            }        
+        }
     }
     
     public Bus getBus() {
@@ -112,18 +115,6 @@
     }
     
     
-    @PostConstruct
-    public void registerWithBus() {
-        if (bus != null) {
-            bus.setExtension(this, JettyHTTPServerEngineFactory.class);
-        }
-        lifeCycleManager = bus.getExtension(BusLifeCycleManager.class);
-        if (null != lifeCycleManager) {
-            lifeCycleManager.registerLifeCycleListener(this);
-        }        
-    }
-    
-    
     /**
      * This call sets TLSParametersMap for a JettyHTTPServerEngine
      * 
@@ -257,14 +248,8 @@
         }
     }
 
-    @PostConstruct
-    public void finalizeConfig() {
-        registerWithBus();
-    }
-
     public void initComplete() {
         // do nothing here
-        
     }
 
     public void postShutdown() {

Modified: cxf/trunk/rt/transports/http-jetty/src/main/java/org/apache/cxf/transport/http_jetty/JettyHTTPTransportFactory.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/transports/http-jetty/src/main/java/org/apache/cxf/transport/http_jetty/JettyHTTPTransportFactory.java?rev=808616&r1=808615&r2=808616&view=diff
==============================================================================
--- cxf/trunk/rt/transports/http-jetty/src/main/java/org/apache/cxf/transport/http_jetty/JettyHTTPTransportFactory.java
(original)
+++ cxf/trunk/rt/transports/http-jetty/src/main/java/org/apache/cxf/transport/http_jetty/JettyHTTPTransportFactory.java
Thu Aug 27 20:43:38 2009
@@ -73,7 +73,6 @@
         if (serverEngineFactory == null) {
             serverEngineFactory = new JettyHTTPServerEngineFactory();
             serverEngineFactory.setBus(getBus());
-            serverEngineFactory.finalizeConfig();
         }
         return serverEngineFactory;
     }

Modified: cxf/trunk/rt/transports/http-jetty/src/main/java/org/apache/cxf/transport/http_jetty/spring/JettyHTTPServerEngineFactoryBeanDefinitionParser.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/transports/http-jetty/src/main/java/org/apache/cxf/transport/http_jetty/spring/JettyHTTPServerEngineFactoryBeanDefinitionParser.java?rev=808616&r1=808615&r2=808616&view=diff
==============================================================================
--- cxf/trunk/rt/transports/http-jetty/src/main/java/org/apache/cxf/transport/http_jetty/spring/JettyHTTPServerEngineFactoryBeanDefinitionParser.java
(original)
+++ cxf/trunk/rt/transports/http-jetty/src/main/java/org/apache/cxf/transport/http_jetty/spring/JettyHTTPServerEngineFactoryBeanDefinitionParser.java
Thu Aug 27 20:43:38 2009
@@ -28,6 +28,7 @@
 import org.apache.cxf.Bus;
 import org.apache.cxf.BusFactory;
 import org.apache.cxf.bus.spring.BusWiringBeanFactoryPostProcessor;
+import org.apache.cxf.common.injection.NoJSR250Annotations;
 import org.apache.cxf.common.util.StringUtils;
 import org.apache.cxf.configuration.jsse.TLSServerParameters;
 import org.apache.cxf.configuration.spring.AbstractBeanDefinitionParser;
@@ -137,6 +138,7 @@
         return SpringJettyHTTPServerEngineFactory.class;
     }
     
+    @NoJSR250Annotations(unlessNull = "bus")
     public static class SpringJettyHTTPServerEngineFactory extends JettyHTTPServerEngineFactory

         implements ApplicationContextAware {
 
@@ -154,7 +156,6 @@
                 Bus bus = BusFactory.getThreadDefaultBus();
                 BusWiringBeanFactoryPostProcessor.updateBusReferencesInContext(bus, ctx);
                 setBus(bus);
-                registerWithBus();
             }
         }
     }

Modified: cxf/trunk/rt/transports/http-jetty/src/main/java/org/apache/cxf/transport/http_jetty/spring/JettySpringTypesFactory.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/transports/http-jetty/src/main/java/org/apache/cxf/transport/http_jetty/spring/JettySpringTypesFactory.java?rev=808616&r1=808615&r2=808616&view=diff
==============================================================================
--- cxf/trunk/rt/transports/http-jetty/src/main/java/org/apache/cxf/transport/http_jetty/spring/JettySpringTypesFactory.java
(original)
+++ cxf/trunk/rt/transports/http-jetty/src/main/java/org/apache/cxf/transport/http_jetty/spring/JettySpringTypesFactory.java
Thu Aug 27 20:43:38 2009
@@ -34,6 +34,7 @@
 import org.w3c.dom.Element;
 import org.w3c.dom.Node;
 
+import org.apache.cxf.common.injection.NoJSR250Annotations;
 import org.apache.cxf.configuration.jsse.TLSServerParameters;
 import org.apache.cxf.configuration.jsse.spring.TLSServerParametersConfig;
 import org.apache.cxf.helpers.DOMUtils;
@@ -42,6 +43,7 @@
 import org.apache.cxf.transports.http_jetty.configuration.ThreadingParametersIdentifiedType;
 import org.apache.cxf.transports.http_jetty.configuration.ThreadingParametersType;
 
+@NoJSR250Annotations
 public final class JettySpringTypesFactory {
     public JettySpringTypesFactory() {
         

Modified: cxf/trunk/rt/transports/http-jetty/src/test/java/org/apache/cxf/transport/http_jetty/JettyHTTPServerEngineTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/transports/http-jetty/src/test/java/org/apache/cxf/transport/http_jetty/JettyHTTPServerEngineTest.java?rev=808616&r1=808615&r2=808616&view=diff
==============================================================================
--- cxf/trunk/rt/transports/http-jetty/src/test/java/org/apache/cxf/transport/http_jetty/JettyHTTPServerEngineTest.java
(original)
+++ cxf/trunk/rt/transports/http-jetty/src/test/java/org/apache/cxf/transport/http_jetty/JettyHTTPServerEngineTest.java
Thu Aug 27 20:43:38 2009
@@ -55,14 +55,16 @@
     public void setUp() throws Exception {
         control = EasyMock.createNiceControl();
         bus = control.createMock(Bus.class);
-        factory = new JettyHTTPServerEngineFactory();
-        factory.setBus(bus);
-
+        
         Configurer configurer = new ConfigurerImpl();
-
         bus.getExtension(Configurer.class);
         EasyMock.expectLastCall().andReturn(configurer).anyTimes();
+
         control.replay();
+
+        factory = new JettyHTTPServerEngineFactory();
+        factory.setBus(bus);
+
     }
 
     @Test

Modified: cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/http/gzip/GZIPFeature.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/http/gzip/GZIPFeature.java?rev=808616&r1=808615&r2=808616&view=diff
==============================================================================
--- cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/http/gzip/GZIPFeature.java
(original)
+++ cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/http/gzip/GZIPFeature.java
Thu Aug 27 20:43:38 2009
@@ -21,6 +21,7 @@
 import java.util.List;
 
 import org.apache.cxf.Bus;
+import org.apache.cxf.common.injection.NoJSR250Annotations;
 import org.apache.cxf.feature.AbstractFeature;
 import org.apache.cxf.interceptor.Interceptor;
 import org.apache.cxf.interceptor.InterceptorProvider;
@@ -53,6 +54,7 @@
  * ]]>
  * </pre>
  */
+@NoJSR250Annotations
 public class GZIPFeature extends AbstractFeature {
     private static final GZIPInInterceptor IN = new GZIPInInterceptor();
     private static final GZIPOutInterceptor OUT = new GZIPOutInterceptor();

Modified: cxf/trunk/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSConfigFeature.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSConfigFeature.java?rev=808616&r1=808615&r2=808616&view=diff
==============================================================================
--- cxf/trunk/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSConfigFeature.java
(original)
+++ cxf/trunk/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSConfigFeature.java
Thu Aug 27 20:43:38 2009
@@ -22,6 +22,7 @@
 
 import org.apache.cxf.Bus;
 import org.apache.cxf.common.i18n.Message;
+import org.apache.cxf.common.injection.NoJSR250Annotations;
 import org.apache.cxf.common.logging.LogUtils;
 import org.apache.cxf.configuration.ConfigurationException;
 import org.apache.cxf.endpoint.Client;
@@ -36,6 +37,7 @@
  * Features and reference a JMSConfiguration. The configuration inside this class takes precedence
over a
  * configuration that is generated from the old configuration style.
  */
+@NoJSR250Annotations
 public class JMSConfigFeature extends AbstractFeature {
     static final Logger LOG = LogUtils.getL7dLogger(JMSConfigFeature.class);
 

Modified: cxf/trunk/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSTransportFactory.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSTransportFactory.java?rev=808616&r1=808615&r2=808616&view=diff
==============================================================================
--- cxf/trunk/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSTransportFactory.java
(original)
+++ cxf/trunk/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSTransportFactory.java
Thu Aug 27 20:43:38 2009
@@ -45,6 +45,10 @@
 
     private Bus bus;
 
+    public JMSTransportFactory() {
+        
+    }
+    
     @Resource(name = "cxf")
     public void setBus(Bus b) {
         bus = b;

Modified: cxf/trunk/rt/ws/addr/src/main/java/org/apache/cxf/ws/addressing/WSAddressingFeature.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/ws/addr/src/main/java/org/apache/cxf/ws/addressing/WSAddressingFeature.java?rev=808616&r1=808615&r2=808616&view=diff
==============================================================================
--- cxf/trunk/rt/ws/addr/src/main/java/org/apache/cxf/ws/addressing/WSAddressingFeature.java
(original)
+++ cxf/trunk/rt/ws/addr/src/main/java/org/apache/cxf/ws/addressing/WSAddressingFeature.java
Thu Aug 27 20:43:38 2009
@@ -19,10 +19,12 @@
 package org.apache.cxf.ws.addressing;
 
 import org.apache.cxf.Bus;
+import org.apache.cxf.common.injection.NoJSR250Annotations;
 import org.apache.cxf.feature.AbstractFeature;
 import org.apache.cxf.interceptor.InterceptorProvider;
 import org.apache.cxf.ws.addressing.soap.MAPCodec;
 
+@NoJSR250Annotations
 public class WSAddressingFeature extends AbstractFeature {
 
     private MAPAggregator mapAggregator = new MAPAggregator();

Modified: cxf/trunk/rt/ws/policy/src/main/java/org/apache/cxf/ws/policy/WSPolicyFeature.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/ws/policy/src/main/java/org/apache/cxf/ws/policy/WSPolicyFeature.java?rev=808616&r1=808615&r2=808616&view=diff
==============================================================================
--- cxf/trunk/rt/ws/policy/src/main/java/org/apache/cxf/ws/policy/WSPolicyFeature.java (original)
+++ cxf/trunk/rt/ws/policy/src/main/java/org/apache/cxf/ws/policy/WSPolicyFeature.java Thu
Aug 27 20:43:38 2009
@@ -28,6 +28,7 @@
 import org.apache.cxf.Bus;
 import org.apache.cxf.common.i18n.BundleUtils;
 import org.apache.cxf.common.i18n.Message;
+import org.apache.cxf.common.injection.NoJSR250Annotations;
 import org.apache.cxf.endpoint.Client;
 import org.apache.cxf.endpoint.Endpoint;
 import org.apache.cxf.endpoint.Server;
@@ -53,6 +54,7 @@
  * @see PolicyBuilder
  * @see AbstractFeature
  */
+@NoJSR250Annotations
 public class WSPolicyFeature extends AbstractFeature implements ApplicationContextAware {
     
     private static final ResourceBundle BUNDLE = BundleUtils.getBundle(WSPolicyFeature.class);

Modified: cxf/trunk/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/feature/RMFeature.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/feature/RMFeature.java?rev=808616&r1=808615&r2=808616&view=diff
==============================================================================
--- cxf/trunk/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/feature/RMFeature.java (original)
+++ cxf/trunk/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/feature/RMFeature.java Thu Aug 27
20:43:38 2009
@@ -20,6 +20,7 @@
 package org.apache.cxf.ws.rm.feature;
 
 import org.apache.cxf.Bus;
+import org.apache.cxf.common.injection.NoJSR250Annotations;
 import org.apache.cxf.feature.AbstractFeature;
 import org.apache.cxf.interceptor.InterceptorProvider;
 import org.apache.cxf.ws.rm.RMInInterceptor;
@@ -35,6 +36,7 @@
 /**
  * 
  */
+@NoJSR250Annotations
 public class RMFeature extends AbstractFeature {
 
     private RMAssertion rmAssertion;



Mime
View raw message