cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r503919 - in /incubator/cxf/trunk: ./ common/common/src/main/java/org/apache/cxf/common/annotation/ common/common/src/main/java/org/apache/cxf/common/injection/ common/common/src/main/java/org/apache/cxf/resource/ common/common/src/test/jav...
Date Mon, 05 Feb 2007 23:13:08 GMT
Author: dkulp
Date: Mon Feb  5 15:12:58 2007
New Revision: 503919

URL: http://svn.apache.org/viewvc?view=rev&rev=503919
Log:
Fix for CXF-370

* Correct map resource names based on JSR-250
* Add ObjectTypeResolver to resolve based on object type, not name if the name is not specified
* Fix ServerLauncher to actually fail immediately if the server fails to start up (instead
of timing out after 5 minutes)
* Update to eclipse plugin 2.3 (faster -Psetup.eclipse)


Added:
    incubator/cxf/trunk/common/common/src/main/java/org/apache/cxf/resource/ObjectTypeResolver.java
  (with props)
Modified:
    incubator/cxf/trunk/common/common/src/main/java/org/apache/cxf/common/annotation/AbstractAnnotationVisitor.java
    incubator/cxf/trunk/common/common/src/main/java/org/apache/cxf/common/injection/ResourceInjector.java
    incubator/cxf/trunk/common/common/src/test/java/org/apache/cxf/common/injection/ResourceInjectorTest.java
    incubator/cxf/trunk/pom.xml
    incubator/cxf/trunk/rt/bindings/http/src/main/java/org/apache/cxf/binding/http/HttpBindingFactory.java
    incubator/cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/SoapBindingFactory.java
    incubator/cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/SoapTransportFactory.java
    incubator/cxf/trunk/rt/bindings/xml/src/main/java/org/apache/cxf/binding/xml/XMLBindingFactory.java
    incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/bus/extension/ExtensionManagerBus.java
    incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/bus/extension/ExtensionManagerImpl.java
    incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/configuration/spring/ConfigurerImpl.java
    incubator/cxf/trunk/rt/core/src/test/java/org/apache/cxf/bus/extension/MyService.java
    incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/handler/HandlerChainInvoker.java
    incubator/cxf/trunk/rt/management/src/main/java/org/apache/cxf/event/EventProcessorImpl.java
    incubator/cxf/trunk/rt/management/src/main/java/org/apache/cxf/management/InstrumentationManagerImpl.java
    incubator/cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/http/HTTPTransportFactory.java
    incubator/cxf/trunk/rt/transports/http2/src/main/java/org/apache/cxf/transport/http/HTTPTransportFactory.java
    incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/handlers/HandlerTestImpl.java
    incubator/cxf/trunk/testutils/src/main/java/org/apache/cxf/testutil/common/ServerLauncher.java

Modified: incubator/cxf/trunk/common/common/src/main/java/org/apache/cxf/common/annotation/AbstractAnnotationVisitor.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/common/common/src/main/java/org/apache/cxf/common/annotation/AbstractAnnotationVisitor.java?view=diff&rev=503919&r1=503918&r2=503919
==============================================================================
--- incubator/cxf/trunk/common/common/src/main/java/org/apache/cxf/common/annotation/AbstractAnnotationVisitor.java
(original)
+++ incubator/cxf/trunk/common/common/src/main/java/org/apache/cxf/common/annotation/AbstractAnnotationVisitor.java
Mon Feb  5 15:12:58 2007
@@ -26,14 +26,18 @@
 import java.util.List;
 
 public abstract class AbstractAnnotationVisitor implements AnnotationVisitor {
+    protected Object target; 
 
     private final List<Class<? extends Annotation>> targetAnnotations = 
                                  new ArrayList<Class<? extends Annotation>>();

     
-    private Object target; 
     
     protected AbstractAnnotationVisitor(Class<? extends Annotation> ann) {
         addTargetAnnotation(ann);
+    }
+    
+    protected AbstractAnnotationVisitor(List<Class<? extends Annotation>> ann)
{
+        targetAnnotations.addAll(ann);
     }
 
     protected final void addTargetAnnotation(Class<? extends Annotation> ann) { 

Modified: incubator/cxf/trunk/common/common/src/main/java/org/apache/cxf/common/injection/ResourceInjector.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/common/common/src/main/java/org/apache/cxf/common/injection/ResourceInjector.java?view=diff&rev=503919&r1=503918&r2=503919
==============================================================================
--- incubator/cxf/trunk/common/common/src/main/java/org/apache/cxf/common/injection/ResourceInjector.java
(original)
+++ incubator/cxf/trunk/common/common/src/main/java/org/apache/cxf/common/injection/ResourceInjector.java
Mon Feb  5 15:12:58 2007
@@ -24,6 +24,7 @@
 import java.lang.reflect.Field;
 import java.lang.reflect.InvocationTargetException;
 import java.lang.reflect.Method;
+import java.util.ArrayList;
 import java.util.Collection;
 import java.util.LinkedList;
 import java.util.List;
@@ -32,8 +33,9 @@
 import javax.annotation.PostConstruct;
 import javax.annotation.Resource;
 import javax.annotation.Resources;
+
+import org.apache.cxf.common.annotation.AbstractAnnotationVisitor;
 import org.apache.cxf.common.annotation.AnnotationProcessor;
-import org.apache.cxf.common.annotation.AnnotationVisitor;
 import org.apache.cxf.common.logging.LogUtils;
 import org.apache.cxf.resource.ResourceManager;
 import org.apache.cxf.resource.ResourceResolver;
@@ -43,19 +45,26 @@
  * injects references specified using @Resource annotation 
  * 
  */
-public class ResourceInjector implements AnnotationVisitor {
+public class ResourceInjector extends AbstractAnnotationVisitor {
 
     private static final Logger LOG = LogUtils.getL7dLogger(ResourceInjector.class);
-
+    private static final List<Class<? extends Annotation>> ANNOTATIONS = 
+        new ArrayList<Class<? extends Annotation>>();
+    
+    static {
+        ANNOTATIONS.add(Resource.class);
+        ANNOTATIONS.add(Resources.class);
+    }
+    
     private final ResourceManager resourceManager; 
     private final List<ResourceResolver> resourceResolvers;
-    private Object target; 
 
     public ResourceInjector(ResourceManager resMgr) {
         this(resMgr, resMgr.getResourceResolvers());
     }
 
     public ResourceInjector(ResourceManager resMgr, List<ResourceResolver> resolvers)
{
+        super(ANNOTATIONS);
         resourceManager = resMgr;
         resourceResolvers = resolvers;
     }
@@ -128,13 +137,6 @@
         LOG.log(Level.SEVERE, "NO_SETTER_OR_FIELD_FOR_RESOURCE", getTarget().getClass().getName());
     } 
 
-    public final List<Class<? extends Annotation>> getTargetAnnotations() {
-        List<Class<? extends Annotation>> al = new LinkedList<Class<? extends
Annotation>>();
-        al.add(Resource.class); 
-        al.add(Resources.class); 
-        return al;
-    }
-
     public final void visitField(final Field field, final Annotation annotation) {
 
         assert annotation instanceof Resource : annotation;
@@ -145,6 +147,10 @@
         Class<?> type = getResourceType(res, field); 
         
         Object resource = resolveResource(name, type);
+        if (resource == null
+            && "".equals(res.name())) {
+            resource = resolveResource(null, type);
+        }
         if (resource != null) {
             injectField(field, resource);
         } else {
@@ -162,22 +168,19 @@
         Class<?> clz = getResourceType(res, method); 
 
         Object resource = resolveResource(resourceName, clz);
+        if (resource == null
+            && "".equals(res.name())) {
+            resource = resolveResource(null, clz);
+        }
         if (resource != null) {
             invokeSetter(method, resource);
-        } else { 
+        } else {
+            resource = resolveResource(resourceName, clz);
+            
             LOG.log(Level.INFO, "RESOURCE_RESOLVE_FAILED", new Object[] {resourceName, clz});
         }
     }
 
-
-    public final void setTarget(final Object object) {
-        target = object;
-    }
-
-    public final Object getTarget() { 
-        return target; 
-    } 
-
     private Field findFieldForResource(Resource res) {
         assert target != null; 
         assert res.name() != null;
@@ -240,10 +243,9 @@
         assert method.getName().startsWith("set") : method;
 
         if (res.name() == null || "".equals(res.name())) {
-            String name = method.getName(); 
-            name = name.substring(3);
+            String name = method.getName().substring(3); 
             name = Character.toLowerCase(name.charAt(0)) + name.substring(1); 
-            return name;
+            return method.getDeclaringClass().getCanonicalName() + "/" + name;
         }
         return res.name();
     } 
@@ -330,7 +332,7 @@
     private String getFieldNameForResource(Resource res, Field field) {
         assert res != null;
         if (res.name() == null || "".equals(res.name())) {
-            return field.getName();
+            return field.getDeclaringClass().getCanonicalName() + "/" + field.getName();
         }
         return res.name();
     }

Added: incubator/cxf/trunk/common/common/src/main/java/org/apache/cxf/resource/ObjectTypeResolver.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/common/common/src/main/java/org/apache/cxf/resource/ObjectTypeResolver.java?view=auto&rev=503919
==============================================================================
--- incubator/cxf/trunk/common/common/src/main/java/org/apache/cxf/resource/ObjectTypeResolver.java
(added)
+++ incubator/cxf/trunk/common/common/src/main/java/org/apache/cxf/resource/ObjectTypeResolver.java
Mon Feb  5 15:12:58 2007
@@ -0,0 +1,44 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.cxf.resource;
+
+import java.io.InputStream;
+
+public class ObjectTypeResolver implements ResourceResolver {
+   
+    private final Object value;
+ 
+    public ObjectTypeResolver(Object v) {
+        value = v;
+    }
+
+    public InputStream getAsStream(String name) {
+        return null;
+    }
+
+    public <T> T resolve(String resourceName, Class<T> resourceType) {
+        if (resourceName == null
+            && value != null
+            && resourceType.isInstance(value)) {
+            return resourceType.cast(value);
+        }
+        return null;
+    }    
+}

Propchange: incubator/cxf/trunk/common/common/src/main/java/org/apache/cxf/resource/ObjectTypeResolver.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/cxf/trunk/common/common/src/main/java/org/apache/cxf/resource/ObjectTypeResolver.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Modified: incubator/cxf/trunk/common/common/src/test/java/org/apache/cxf/common/injection/ResourceInjectorTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/common/common/src/test/java/org/apache/cxf/common/injection/ResourceInjectorTest.java?view=diff&rev=503919&r1=503918&r2=503919
==============================================================================
--- incubator/cxf/trunk/common/common/src/test/java/org/apache/cxf/common/injection/ResourceInjectorTest.java
(original)
+++ incubator/cxf/trunk/common/common/src/test/java/org/apache/cxf/common/injection/ResourceInjectorTest.java
Mon Feb  5 15:12:58 2007
@@ -40,14 +40,14 @@
 
     private ResourceInjector injector; 
         
-    public void setUp() { 
+    public void setUpResourceManager(String pfx) { 
 
         ResourceManager resMgr = EasyMock.createMock(ResourceManager.class);
         List<ResourceResolver> resolvers = new ArrayList<ResourceResolver>();
         
         resMgr.getResourceResolvers();
         EasyMock.expectLastCall().andReturn(resolvers);
-        resMgr.resolveResource("resource1", String.class, resolvers);
+        resMgr.resolveResource(pfx + "resource1", String.class, resolvers);
         EasyMock.expectLastCall().andReturn(RESOURCE_ONE);
         resMgr.resolveResource("resource2", String.class, resolvers);
         EasyMock.expectLastCall().andReturn(RESOURCE_TWO);
@@ -57,24 +57,27 @@
     } 
 
     public void testFieldInjection() { 
-
+        setUpResourceManager(FieldTarget.class.getCanonicalName() + "/");
         doInjectTest(new FieldTarget()); 
     }
 
     public void testSetterInjection() {
-
+        setUpResourceManager(SetterTarget.class.getCanonicalName() + "/");
         doInjectTest(new SetterTarget()); 
     }
 
     public void testClassLevelInjection() {
+        setUpResourceManager("");
         doInjectTest(new ClassTarget());
     }
 
     public void testResourcesContainer() {
+        setUpResourceManager("");
         doInjectTest(new ResourcesContainerTarget()); 
     }
 
     public void testPostConstruct() { 
+        setUpResourceManager(SetterTarget.class.getCanonicalName() + "/");
 
         SetterTarget target = new SetterTarget(); 
         doInjectTest(target); 
@@ -103,9 +106,11 @@
 
 class FieldTarget implements Target {
 
-    @Resource private String resource1; 
+    @Resource
+    private String resource1; 
 
-    @Resource(name = "resource2") private String resource2foo;
+    @Resource(name = "resource2")
+    private String resource2foo;
 
     public String getResource1() { 
         return resource1; 
@@ -132,7 +137,8 @@
         return this.resource1;
     }
 
-    @Resource public final void setResource1(final String argResource1) {
+    @Resource
+    public final void setResource1(final String argResource1) {
         this.resource1 = argResource1;
     }
     
@@ -140,18 +146,21 @@
         return this.resource2;
     }
     
-    @Resource(name = "resource2") public final void setResource2(final String argResource2)
{
+    @Resource(name = "resource2")
+    public final void setResource2(final String argResource2) {
         this.resource2 = argResource2;
     }
 
-    @PostConstruct public void injectionIsAllFinishedNowThankYouVeryMuch() { 
+    @PostConstruct
+    public void injectionIsAllFinishedNowThankYouVeryMuch() { 
         injectionCompletePublic = true;
 
         // stick this here to keep PMD happy...
         injectionIsAllFinishedNowThankYouVeryMuchPrivate();
     } 
     
-    @PostConstruct private void injectionIsAllFinishedNowThankYouVeryMuchPrivate() { 
+    @PostConstruct
+    private void injectionIsAllFinishedNowThankYouVeryMuchPrivate() { 
         injectionCompletePrivate = true;
     } 
     

Modified: incubator/cxf/trunk/pom.xml
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/pom.xml?view=diff&rev=503919&r1=503918&r2=503919
==============================================================================
--- incubator/cxf/trunk/pom.xml (original)
+++ incubator/cxf/trunk/pom.xml Mon Feb  5 15:12:58 2007
@@ -132,7 +132,7 @@
         <cobertura.version>2.0</cobertura.version>
         <compiler.version>2.0.1</compiler.version>
         <dependency.plugin.version>2.0-alpha-1</dependency.plugin.version>
-        <eclipse.plugin.version>2.2</eclipse.plugin.version>
+        <eclipse.plugin.version>2.3</eclipse.plugin.version>
         <jar.version>2.1</jar.version>
         <javadoc.version>2.2</javadoc.version>
         <jxr.version>2.0</jxr.version>

Modified: incubator/cxf/trunk/rt/bindings/http/src/main/java/org/apache/cxf/binding/http/HttpBindingFactory.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/bindings/http/src/main/java/org/apache/cxf/binding/http/HttpBindingFactory.java?view=diff&rev=503919&r1=503918&r2=503919
==============================================================================
--- incubator/cxf/trunk/rt/bindings/http/src/main/java/org/apache/cxf/binding/http/HttpBindingFactory.java
(original)
+++ incubator/cxf/trunk/rt/bindings/http/src/main/java/org/apache/cxf/binding/http/HttpBindingFactory.java
Mon Feb  5 15:12:58 2007
@@ -40,7 +40,7 @@
     public static final String HTTP_BINDING_ID = "http://apache.org/cxf/binding/http";
     private Collection<String> activationNamespaces;    
     
-    @Resource
+    @Resource(name = "activationNamespaces")
     public void setActivationNamespaces(Collection<String> ans) {
         activationNamespaces = ans;
     }

Modified: incubator/cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/SoapBindingFactory.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/SoapBindingFactory.java?view=diff&rev=503919&r1=503918&r2=503919
==============================================================================
--- incubator/cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/SoapBindingFactory.java
(original)
+++ incubator/cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/SoapBindingFactory.java
Mon Feb  5 15:12:58 2007
@@ -80,7 +80,7 @@
         return activationNamespaces;
     }
 
-    @Resource
+    @Resource(name = "activationNamespaces")
     public void setActivationNamespaces(Collection<String> ans) {
         activationNamespaces = ans;
     }
@@ -278,7 +278,7 @@
         bmsg.addExtensor(bodyInfo);
     }
     
-    @Resource
+    @Resource(name = "mtomEnabled")
     public void setMtomEnabled(boolean mtomEnabled) {
         this.mtomEnabled = mtomEnabled;
     }

Modified: incubator/cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/SoapTransportFactory.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/SoapTransportFactory.java?view=diff&rev=503919&r1=503918&r2=503919
==============================================================================
--- incubator/cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/SoapTransportFactory.java
(original)
+++ incubator/cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/SoapTransportFactory.java
Mon Feb  5 15:12:58 2007
@@ -160,12 +160,12 @@
         return bus;
     }
 
-    @Resource
+    @Resource(name = "bus")
     public void setBus(Bus bus) {
         this.bus = bus;
     }
 
-    @Resource
+    @Resource(name = "activationNamespaces")
     public void setActivationNamespaces(Collection<String> ans) {
         activationNamespaces = ans;
     }

Modified: incubator/cxf/trunk/rt/bindings/xml/src/main/java/org/apache/cxf/binding/xml/XMLBindingFactory.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/bindings/xml/src/main/java/org/apache/cxf/binding/xml/XMLBindingFactory.java?view=diff&rev=503919&r1=503918&r2=503919
==============================================================================
--- incubator/cxf/trunk/rt/bindings/xml/src/main/java/org/apache/cxf/binding/xml/XMLBindingFactory.java
(original)
+++ incubator/cxf/trunk/rt/bindings/xml/src/main/java/org/apache/cxf/binding/xml/XMLBindingFactory.java
Mon Feb  5 15:12:58 2007
@@ -43,7 +43,7 @@
 
     private Collection<String> activationNamespaces;
 
-    @Resource
+    @Resource(name = "activationNamespaces")
     public void setActivationNamespaces(Collection<String> ans) {
         activationNamespaces = ans;
     }

Modified: incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/bus/extension/ExtensionManagerBus.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/bus/extension/ExtensionManagerBus.java?view=diff&rev=503919&r1=503918&r2=503919
==============================================================================
--- incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/bus/extension/ExtensionManagerBus.java
(original)
+++ incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/bus/extension/ExtensionManagerBus.java
Mon Feb  5 15:12:58 2007
@@ -30,6 +30,7 @@
 import org.apache.cxf.configuration.Configurer;
 import org.apache.cxf.configuration.NullConfigurer;
 import org.apache.cxf.resource.DefaultResourceManager;
+import org.apache.cxf.resource.ObjectTypeResolver;
 import org.apache.cxf.resource.PropertiesResolver;
 import org.apache.cxf.resource.ResourceManager;
 import org.apache.cxf.resource.ResourceResolver;
@@ -86,6 +87,7 @@
         
         ResourceResolver busResolver = new SinglePropertyResolver(BUS_PROPERTY_NAME, this);
         resourceManager.addResourceResolver(busResolver);
+        resourceManager.addResourceResolver(new ObjectTypeResolver(this));
         
         e.put(ResourceManager.class, resourceManager);
 

Modified: incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/bus/extension/ExtensionManagerImpl.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/bus/extension/ExtensionManagerImpl.java?view=diff&rev=503919&r1=503918&r2=503919
==============================================================================
--- incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/bus/extension/ExtensionManagerImpl.java
(original)
+++ incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/bus/extension/ExtensionManagerImpl.java
Mon Feb  5 15:12:58 2007
@@ -31,6 +31,7 @@
 
 import org.apache.cxf.common.injection.ResourceInjector;
 import org.apache.cxf.configuration.Configurer;
+import org.apache.cxf.resource.ObjectTypeResolver;
 import org.apache.cxf.resource.ResourceManager;
 import org.apache.cxf.resource.ResourceResolver;
 import org.apache.cxf.resource.SinglePropertyResolver;
@@ -64,6 +65,7 @@
         ResourceResolver extensionManagerResolver =
             new SinglePropertyResolver(EXTENSIONMANAGER_PROPERTY_NAME, this);
         resourceManager.addResourceResolver(extensionManagerResolver);
+        resourceManager.addResourceResolver(new ObjectTypeResolver(this));
 
         deferred = new HashMap<String, Collection<Extension>>();
 

Modified: incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/configuration/spring/ConfigurerImpl.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/configuration/spring/ConfigurerImpl.java?view=diff&rev=503919&r1=503918&r2=503919
==============================================================================
--- incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/configuration/spring/ConfigurerImpl.java
(original)
+++ incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/configuration/spring/ConfigurerImpl.java
Mon Feb  5 15:12:58 2007
@@ -99,8 +99,8 @@
             // users often wonder why the settings in their configuration files seem
             // to have no effect - the most common cause is that they have been using
             // incorrect bean ids
-            if (LOG.isLoggable(Level.INFO)) {
-                LOG.log(Level.INFO, "NO_MATCHING_BEAN_MSG", beanName);
+            if (LOG.isLoggable(Level.FINE)) {
+                LOG.log(Level.FINE, "NO_MATCHING_BEAN_MSG", beanName);
             }
         }
     }

Modified: incubator/cxf/trunk/rt/core/src/test/java/org/apache/cxf/bus/extension/MyService.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/core/src/test/java/org/apache/cxf/bus/extension/MyService.java?view=diff&rev=503919&r1=503918&r2=503919
==============================================================================
--- incubator/cxf/trunk/rt/core/src/test/java/org/apache/cxf/bus/extension/MyService.java
(original)
+++ incubator/cxf/trunk/rt/core/src/test/java/org/apache/cxf/bus/extension/MyService.java
Mon Feb  5 15:12:58 2007
@@ -25,10 +25,10 @@
 import javax.annotation.Resource;
 
 public class MyService {
-    @Resource
+    @Resource(name = "activationNamespaces")
     Collection<String> activationNamespaces;
     
-    @Resource
+    @Resource(name = "extensionManagerTest")
     ExtensionManagerTest extensionManagerTest;
     
     

Modified: incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/handler/HandlerChainInvoker.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/handler/HandlerChainInvoker.java?view=diff&rev=503919&r1=503918&r2=503919
==============================================================================
--- incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/handler/HandlerChainInvoker.java
(original)
+++ incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/handler/HandlerChainInvoker.java
Mon Feb  5 15:12:58 2007
@@ -318,6 +318,7 @@
 
     // REVISIT
     // handleFault() return true\false, throw Exception.
+    @SuppressWarnings("unchecked")
     private boolean callReversedHandlesFault() {
         int index = invokedHandlers.size() - 2;
         while (index >= 0) {

Modified: incubator/cxf/trunk/rt/management/src/main/java/org/apache/cxf/event/EventProcessorImpl.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/management/src/main/java/org/apache/cxf/event/EventProcessorImpl.java?view=diff&rev=503919&r1=503918&r2=503919
==============================================================================
--- incubator/cxf/trunk/rt/management/src/main/java/org/apache/cxf/event/EventProcessorImpl.java
(original)
+++ incubator/cxf/trunk/rt/management/src/main/java/org/apache/cxf/event/EventProcessorImpl.java
Mon Feb  5 15:12:58 2007
@@ -43,7 +43,7 @@
         cache = eventCache == null ? new EventCacheImpl() : eventCache;
     }
     
-    @Resource
+    @Resource(name = "bus")
     public void setBus(Bus bus) {        
         this.bus = bus;
     }

Modified: incubator/cxf/trunk/rt/management/src/main/java/org/apache/cxf/management/InstrumentationManagerImpl.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/management/src/main/java/org/apache/cxf/management/InstrumentationManagerImpl.java?view=diff&rev=503919&r1=503918&r2=503919
==============================================================================
--- incubator/cxf/trunk/rt/management/src/main/java/org/apache/cxf/management/InstrumentationManagerImpl.java
(original)
+++ incubator/cxf/trunk/rt/management/src/main/java/org/apache/cxf/management/InstrumentationManagerImpl.java
Mon Feb  5 15:12:58 2007
@@ -56,7 +56,7 @@
         return bus;
     }
     
-    @Resource
+    @Resource(name = "bus")
     public void setBus(Bus bus) {        
         this.bus = bus;
     }

Modified: incubator/cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/http/HTTPTransportFactory.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/http/HTTPTransportFactory.java?view=diff&rev=503919&r1=503918&r2=503919
==============================================================================
--- incubator/cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/http/HTTPTransportFactory.java
(original)
+++ incubator/cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/http/HTTPTransportFactory.java
Mon Feb  5 15:12:58 2007
@@ -70,7 +70,7 @@
     private Bus bus;
     private Collection<String> activationNamespaces;
 
-    @Resource
+    @Resource(name = "bus")
     public void setBus(Bus b) {
         bus = b;
     }
@@ -79,7 +79,7 @@
         return bus;
     }
 
-    @Resource
+    @Resource(name = "activationNamespaces")
     public void setActivationNamespaces(Collection<String> ans) {
         activationNamespaces = ans;
     }

Modified: incubator/cxf/trunk/rt/transports/http2/src/main/java/org/apache/cxf/transport/http/HTTPTransportFactory.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/transports/http2/src/main/java/org/apache/cxf/transport/http/HTTPTransportFactory.java?view=diff&rev=503919&r1=503918&r2=503919
==============================================================================
--- incubator/cxf/trunk/rt/transports/http2/src/main/java/org/apache/cxf/transport/http/HTTPTransportFactory.java
(original)
+++ incubator/cxf/trunk/rt/transports/http2/src/main/java/org/apache/cxf/transport/http/HTTPTransportFactory.java
Mon Feb  5 15:12:58 2007
@@ -70,7 +70,7 @@
     private Bus bus;
     private Collection<String> activationNamespaces;
 
-    @Resource
+    @Resource(name = "bus")
     public void setBus(Bus b) {
         bus = b;
     }
@@ -79,7 +79,7 @@
         return bus;
     }
 
-    @Resource
+    @Resource(name = "activationNamespaces")
     public void setActivationNamespaces(Collection<String> ans) {
         activationNamespaces = ans;
     }

Modified: incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/handlers/HandlerTestImpl.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/handlers/HandlerTestImpl.java?view=diff&rev=503919&r1=503918&r2=503919
==============================================================================
--- incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/handlers/HandlerTestImpl.java
(original)
+++ incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/handlers/HandlerTestImpl.java
Mon Feb  5 15:12:58 2007
@@ -75,7 +75,8 @@
     }
 
 
-    @Resource public void setWebServiceContext(WebServiceContext ctx) {
+    @Resource
+    public void setWebServiceContext(WebServiceContext ctx) {
         context = ctx;
     }
 

Modified: incubator/cxf/trunk/testutils/src/main/java/org/apache/cxf/testutil/common/ServerLauncher.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/testutils/src/main/java/org/apache/cxf/testutil/common/ServerLauncher.java?view=diff&rev=503919&r1=503918&r2=503919
==============================================================================
--- incubator/cxf/trunk/testutils/src/main/java/org/apache/cxf/testutil/common/ServerLauncher.java
(original)
+++ incubator/cxf/trunk/testutils/src/main/java/org/apache/cxf/testutil/common/ServerLauncher.java
Mon Feb  5 15:12:58 2007
@@ -86,7 +86,7 @@
             while (!serverIsStopped) {
                 try {
                     TimeoutCounter tc = new TimeoutCounter(DEFAULT_TIMEOUT);
-                    mutex.wait(DEFAULT_TIMEOUT);
+                    mutex.wait(1000);
                     if (tc.isTimeoutExpired()) {
                         System.out.println("destroying server process");
                         process.destroy();
@@ -193,7 +193,7 @@
                 do {
                     TimeoutCounter tc = new TimeoutCounter(DEFAULT_TIMEOUT);
                     try {
-                        mutex.wait(DEFAULT_TIMEOUT);
+                        mutex.wait(1000);
                         if (tc.isTimeoutExpired()) {
                             break;
                         }
@@ -203,7 +203,7 @@
                 } while (!serverIsReady && !serverLaunchFailed);
             }
         }
-        return serverIsReady;
+        return serverIsReady && !serverLaunchFailed;
     }
 
     public int waitForServer() {
@@ -297,6 +297,7 @@
     void notifyServerFailed() {
         synchronized (mutex) {
             serverIsStopped = true;
+            serverLaunchFailed = true;
             mutex.notifyAll();
         }
     }



Mime
View raw message