cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r997892 - in /cxf/trunk/rt/core/src: main/java/org/apache/cxf/bus/spring/BusDefinitionParser.java test/java/org/apache/cxf/bus/spring/BusDefinitionParserTest.java test/java/org/apache/cxf/bus/spring/lazyInitBus.xml
Date Thu, 16 Sep 2010 19:45:53 GMT
Author: dkulp
Date: Thu Sep 16 19:45:52 2010
New Revision: 997892

URL: http://svn.apache.org/viewvc?rev=997892&view=rev
Log:
[CXF-2995] Patch use of cxf with lazy inits.
Patch from Adam Lewandowski applied

Added:
    cxf/trunk/rt/core/src/test/java/org/apache/cxf/bus/spring/lazyInitBus.xml   (with props)
Modified:
    cxf/trunk/rt/core/src/main/java/org/apache/cxf/bus/spring/BusDefinitionParser.java
    cxf/trunk/rt/core/src/test/java/org/apache/cxf/bus/spring/BusDefinitionParserTest.java

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=997892&r1=997891&r2=997892&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
Sep 16 19:45:52 2010
@@ -58,6 +58,7 @@ public class BusDefinitionParser extends
             bean.addConstructorArgReference(bus);
             element.removeAttribute("bus");
         }
+        bean.setLazyInit(false);
         super.doParse(element, ctx, bean);
     }
     

Modified: cxf/trunk/rt/core/src/test/java/org/apache/cxf/bus/spring/BusDefinitionParserTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/core/src/test/java/org/apache/cxf/bus/spring/BusDefinitionParserTest.java?rev=997892&r1=997891&r2=997892&view=diff
==============================================================================
--- cxf/trunk/rt/core/src/test/java/org/apache/cxf/bus/spring/BusDefinitionParserTest.java
(original)
+++ cxf/trunk/rt/core/src/test/java/org/apache/cxf/bus/spring/BusDefinitionParserTest.java
Thu Sep 16 19:45:52 2010
@@ -86,7 +86,22 @@ public class BusDefinitionParserTest ext
             }
         }
     }
-    
+
+    @Test
+    public void testLazyInit() {
+        String cfgFile = "org/apache/cxf/bus/spring/lazyInitBus.xml";
+        Bus bus = new SpringBusFactory().createBus(cfgFile, true);
+
+        List<Interceptor<? extends Message>> in = bus.getInInterceptors();
+        boolean found = false;
+        for (Interceptor i : in) {
+            if (i instanceof LoggingInInterceptor) {
+                found = true;
+            }
+        }
+        assertTrue("could not find logging interceptor.", found);
+    }
+
     static class TestBean {
 
         boolean initialised;

Added: cxf/trunk/rt/core/src/test/java/org/apache/cxf/bus/spring/lazyInitBus.xml
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/core/src/test/java/org/apache/cxf/bus/spring/lazyInitBus.xml?rev=997892&view=auto
==============================================================================
--- cxf/trunk/rt/core/src/test/java/org/apache/cxf/bus/spring/lazyInitBus.xml (added)
+++ cxf/trunk/rt/core/src/test/java/org/apache/cxf/bus/spring/lazyInitBus.xml Thu Sep 16 19:45:52
2010
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  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.
+-->
+<beans xmlns="http://www.springframework.org/schema/beans"
+  xmlns:c="http://cxf.apache.org/core"
+  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+  xsi:schemaLocation="
+http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
+http://cxf.apache.org/core http://cxf.apache.org/schemas/core.xsd"
+default-lazy-init="true">
+
+  <c:bus>
+    <c:features>
+      <c:logging />
+    </c:features>
+  </c:bus>  
+
+</beans>
+

Propchange: cxf/trunk/rt/core/src/test/java/org/apache/cxf/bus/spring/lazyInitBus.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cxf/trunk/rt/core/src/test/java/org/apache/cxf/bus/spring/lazyInitBus.xml
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: cxf/trunk/rt/core/src/test/java/org/apache/cxf/bus/spring/lazyInitBus.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml



Mime
View raw message