Return-Path: X-Original-To: apmail-cxf-commits-archive@www.apache.org Delivered-To: apmail-cxf-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 8F6179EA6 for ; Thu, 12 Apr 2012 16:14:43 +0000 (UTC) Received: (qmail 93146 invoked by uid 500); 12 Apr 2012 16:14:43 -0000 Delivered-To: apmail-cxf-commits-archive@cxf.apache.org Received: (qmail 93096 invoked by uid 500); 12 Apr 2012 16:14:43 -0000 Mailing-List: contact commits-help@cxf.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cxf.apache.org Delivered-To: mailing list commits@cxf.apache.org Received: (qmail 93089 invoked by uid 99); 12 Apr 2012 16:14:43 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 12 Apr 2012 16:14:43 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 12 Apr 2012 16:14:32 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 5FA5F2388860; Thu, 12 Apr 2012 16:14:09 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1325346 - in /cxf/branches/2.5.x-fixes: ./ distribution/src/main/release/samples/corba/hello_world/src/main/idl/ distribution/src/main/release/samples/ws_security/ut_policy/src/demo/wssec/client/ distribution/src/main/release/samples/ws_se... Date: Thu, 12 Apr 2012 16:14:08 -0000 To: commits@cxf.apache.org From: dkulp@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20120412161409.5FA5F2388860@eris.apache.org> Author: dkulp Date: Thu Apr 12 16:14:07 2012 New Revision: 1325346 URL: http://svn.apache.org/viewvc?rev=1325346&view=rev Log: Merged revisions 1325343 via svn merge from https://svn.apache.org/repos/asf/cxf/trunk ........ r1325343 | dkulp | 2012-04-12 12:09:53 -0400 (Thu, 12 Apr 2012) | 1 line Fix some spring2 compat issues ........ Modified: cxf/branches/2.5.x-fixes/ (props changed) cxf/branches/2.5.x-fixes/distribution/src/main/release/samples/corba/hello_world/src/main/idl/HelloWorld.idl cxf/branches/2.5.x-fixes/distribution/src/main/release/samples/ws_security/ut_policy/src/demo/wssec/client/wssec.xml cxf/branches/2.5.x-fixes/distribution/src/main/release/samples/ws_security/ut_policy/src/demo/wssec/server/wssec.xml cxf/branches/2.5.x-fixes/distribution/src/main/release/samples/ws_security/ut_policy/wsdl/hello_world.wsdl cxf/branches/2.5.x-fixes/distribution/src/main/release/samples/ws_security/ut_policy/wsdl/hello_world_no_policy.wsdl cxf/branches/2.5.x-fixes/rt/core/src/main/java/org/apache/cxf/bus/spring/BusDefinitionParser.java cxf/branches/2.5.x-fixes/rt/core/src/main/java/org/apache/cxf/bus/spring/BusWiringBeanFactoryPostProcessor.java cxf/branches/2.5.x-fixes/rt/transports/http/src/main/java/org/apache/cxf/transport/servlet/CXFServlet.java cxf/branches/2.5.x-fixes/testutils/src/main/java/org/apache/cxf/testutil/common/AbstractBusTestServerBase.java cxf/branches/2.5.x-fixes/tools/wsdlto/test/src/test/resources/wsdl2java_wsdl/cxf-3290/bug.wsdl cxf/branches/2.5.x-fixes/tools/wsdlto/test/src/test/resources/wsdl2java_wsdl/cxf-3290/bug2.wsdl cxf/branches/2.5.x-fixes/tools/wsdlto/test/src/test/resources/wsdl2java_wsdl/cxf3105/cxf3105.wsdl cxf/branches/2.5.x-fixes/tools/wsdlto/test/src/test/resources/wsdl2java_wsdl/cxf3105/ws-binding.xml Propchange: cxf/branches/2.5.x-fixes/ ('svn:mergeinfo' removed) Propchange: cxf/branches/2.5.x-fixes/ ------------------------------------------------------------------------------ Binary property 'svnmerge-integrated' - no diff available. Modified: cxf/branches/2.5.x-fixes/distribution/src/main/release/samples/corba/hello_world/src/main/idl/HelloWorld.idl URL: http://svn.apache.org/viewvc/cxf/branches/2.5.x-fixes/distribution/src/main/release/samples/corba/hello_world/src/main/idl/HelloWorld.idl?rev=1325346&r1=1325345&r2=1325346&view=diff ============================================================================== --- cxf/branches/2.5.x-fixes/distribution/src/main/release/samples/corba/hello_world/src/main/idl/HelloWorld.idl (original) +++ cxf/branches/2.5.x-fixes/distribution/src/main/release/samples/corba/hello_world/src/main/idl/HelloWorld.idl Thu Apr 12 16:14:07 2012 @@ -1,25 +1,25 @@ -/* - * 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. -*/ - -interface HelloWorld { - string - greetMe( - in string return_message - ); -}; +/* + * 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. +*/ + +interface HelloWorld { + string + greetMe( + in string return_message + ); +}; Modified: cxf/branches/2.5.x-fixes/distribution/src/main/release/samples/ws_security/ut_policy/src/demo/wssec/client/wssec.xml URL: http://svn.apache.org/viewvc/cxf/branches/2.5.x-fixes/distribution/src/main/release/samples/ws_security/ut_policy/src/demo/wssec/client/wssec.xml?rev=1325346&r1=1325345&r2=1325346&view=diff ============================================================================== --- cxf/branches/2.5.x-fixes/distribution/src/main/release/samples/ws_security/ut_policy/src/demo/wssec/client/wssec.xml (original) +++ cxf/branches/2.5.x-fixes/distribution/src/main/release/samples/ws_security/ut_policy/src/demo/wssec/client/wssec.xml Thu Apr 12 16:14:07 2012 @@ -1,86 +1,86 @@ - - - - - - - - - - - - - - - - - - - - - - - - .*_EXPORT_.* - .*_EXPORT1024_.* - .*_WITH_DES_.* - .*_WITH_AES_.* - .*_WITH_NULL_.* - .*_DH_anon_.* - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + .*_EXPORT_.* + .*_EXPORT1024_.* + .*_WITH_DES_.* + .*_WITH_AES_.* + .*_WITH_NULL_.* + .*_DH_anon_.* + + + + + + + + + + + + + + + + + Modified: cxf/branches/2.5.x-fixes/distribution/src/main/release/samples/ws_security/ut_policy/src/demo/wssec/server/wssec.xml URL: http://svn.apache.org/viewvc/cxf/branches/2.5.x-fixes/distribution/src/main/release/samples/ws_security/ut_policy/src/demo/wssec/server/wssec.xml?rev=1325346&r1=1325345&r2=1325346&view=diff ============================================================================== --- cxf/branches/2.5.x-fixes/distribution/src/main/release/samples/ws_security/ut_policy/src/demo/wssec/server/wssec.xml (original) +++ cxf/branches/2.5.x-fixes/distribution/src/main/release/samples/ws_security/ut_policy/src/demo/wssec/server/wssec.xml Thu Apr 12 16:14:07 2012 @@ -1,106 +1,106 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - .*_EXPORT_.* - .*_EXPORT1024_.* - .*_WITH_DES_.* - .*_WITH_AES_.* - .*_WITH_NULL_.* - .*_DH_anon_.* - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + .*_EXPORT_.* + .*_EXPORT1024_.* + .*_WITH_DES_.* + .*_WITH_AES_.* + .*_WITH_NULL_.* + .*_DH_anon_.* + + + + + + Modified: cxf/branches/2.5.x-fixes/distribution/src/main/release/samples/ws_security/ut_policy/wsdl/hello_world.wsdl URL: http://svn.apache.org/viewvc/cxf/branches/2.5.x-fixes/distribution/src/main/release/samples/ws_security/ut_policy/wsdl/hello_world.wsdl?rev=1325346&r1=1325345&r2=1325346&view=diff ============================================================================== --- cxf/branches/2.5.x-fixes/distribution/src/main/release/samples/ws_security/ut_policy/wsdl/hello_world.wsdl (original) +++ cxf/branches/2.5.x-fixes/distribution/src/main/release/samples/ws_security/ut_policy/wsdl/hello_world.wsdl Thu Apr 12 16:14:07 2012 @@ -1,106 +1,106 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Modified: cxf/branches/2.5.x-fixes/distribution/src/main/release/samples/ws_security/ut_policy/wsdl/hello_world_no_policy.wsdl URL: http://svn.apache.org/viewvc/cxf/branches/2.5.x-fixes/distribution/src/main/release/samples/ws_security/ut_policy/wsdl/hello_world_no_policy.wsdl?rev=1325346&r1=1325345&r2=1325346&view=diff ============================================================================== --- cxf/branches/2.5.x-fixes/distribution/src/main/release/samples/ws_security/ut_policy/wsdl/hello_world_no_policy.wsdl (original) +++ cxf/branches/2.5.x-fixes/distribution/src/main/release/samples/ws_security/ut_policy/wsdl/hello_world_no_policy.wsdl Thu Apr 12 16:14:07 2012 @@ -1,93 +1,93 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Modified: cxf/branches/2.5.x-fixes/rt/core/src/main/java/org/apache/cxf/bus/spring/BusDefinitionParser.java URL: http://svn.apache.org/viewvc/cxf/branches/2.5.x-fixes/rt/core/src/main/java/org/apache/cxf/bus/spring/BusDefinitionParser.java?rev=1325346&r1=1325345&r2=1325346&view=diff ============================================================================== --- cxf/branches/2.5.x-fixes/rt/core/src/main/java/org/apache/cxf/bus/spring/BusDefinitionParser.java (original) +++ cxf/branches/2.5.x-fixes/rt/core/src/main/java/org/apache/cxf/bus/spring/BusDefinitionParser.java Thu Apr 12 16:14:07 2012 @@ -96,7 +96,7 @@ public class BusDefinitionParser extends private void copyProps(BeanDefinitionBuilder src, BeanDefinition def) { for (PropertyValue v : src.getBeanDefinition().getPropertyValues().getPropertyValues()) { if (!"bus".equals(v.getName())) { - def.getPropertyValues().add(v.getName(), v.getValue()); + def.getPropertyValues().addPropertyValue(v.getName(), v.getValue()); } src.getBeanDefinition().getPropertyValues().removePropertyValue(v); } Modified: cxf/branches/2.5.x-fixes/rt/core/src/main/java/org/apache/cxf/bus/spring/BusWiringBeanFactoryPostProcessor.java URL: http://svn.apache.org/viewvc/cxf/branches/2.5.x-fixes/rt/core/src/main/java/org/apache/cxf/bus/spring/BusWiringBeanFactoryPostProcessor.java?rev=1325346&r1=1325345&r2=1325346&view=diff ============================================================================== --- cxf/branches/2.5.x-fixes/rt/core/src/main/java/org/apache/cxf/bus/spring/BusWiringBeanFactoryPostProcessor.java (original) +++ cxf/branches/2.5.x-fixes/rt/core/src/main/java/org/apache/cxf/bus/spring/BusWiringBeanFactoryPostProcessor.java Thu Apr 12 16:14:07 2012 @@ -74,7 +74,7 @@ public class BusWiringBeanFactoryPostPro ConfigurableApplicationContext cctx = (ConfigurableApplicationContext)context; cctx.getBeanFactory().registerSingleton(name, b); } - return context.getBean(name, Bus.class); + return (Bus)context.getBean(name, Bus.class); } private Object getBusForName(String name, ConfigurableListableBeanFactory factory, @@ -89,7 +89,7 @@ public class BusWiringBeanFactoryPostPro df.registerBeanDefinition(name, rbd); } else if (cn != null) { BeanDefinition bd = factory.getBeanDefinition(name); - bd.getPropertyValues().add("busConfig", new RuntimeBeanReference(cn)); + bd.getPropertyValues().addPropertyValue("busConfig", new RuntimeBeanReference(cn)); } return new RuntimeBeanReference(name); } Modified: cxf/branches/2.5.x-fixes/rt/transports/http/src/main/java/org/apache/cxf/transport/servlet/CXFServlet.java URL: http://svn.apache.org/viewvc/cxf/branches/2.5.x-fixes/rt/transports/http/src/main/java/org/apache/cxf/transport/servlet/CXFServlet.java?rev=1325346&r1=1325345&r2=1325346&view=diff ============================================================================== --- cxf/branches/2.5.x-fixes/rt/transports/http/src/main/java/org/apache/cxf/transport/servlet/CXFServlet.java (original) +++ cxf/branches/2.5.x-fixes/rt/transports/http/src/main/java/org/apache/cxf/transport/servlet/CXFServlet.java Thu Apr 12 16:14:07 2012 @@ -20,12 +20,16 @@ package org.apache.cxf.transport.servlet import java.io.IOException; import java.io.InputStream; +import java.lang.reflect.Method; +import java.util.Collection; import javax.servlet.ServletConfig; import javax.servlet.ServletException; import org.apache.cxf.Bus; import org.apache.cxf.BusFactory; +import org.apache.cxf.common.util.ReflectionUtil; +import org.apache.cxf.helpers.CastUtils; import org.springframework.context.ApplicationContext; import org.springframework.context.ApplicationListener; import org.springframework.context.event.ContextRefreshedEvent; @@ -49,7 +53,7 @@ public class CXFServlet extends CXFNonSp getWebApplicationContext(sc.getServletContext()); if (wac instanceof AbstractApplicationContext) { - ((AbstractApplicationContext)wac).getApplicationListeners().add(this); + addListener((AbstractApplicationContext)wac); } String configLocation = sc.getInitParameter("config-location"); @@ -68,13 +72,25 @@ public class CXFServlet extends CXFNonSp wac = createSpringContext(wac, sc, configLocation); } if (wac != null) { - setBus(wac.getBean("cxf", Bus.class)); + setBus((Bus)wac.getBean("cxf", Bus.class)); } else { busCreated = true; setBus(BusFactory.newInstance().createBus()); } } + protected void addListener(AbstractApplicationContext wac) { + try { + //spring 2 vs spring 3 return type is different + Method m = wac.getClass().getMethod("getApplicationListeners"); + Collection c = CastUtils.cast((Collection)ReflectionUtil + .setAccessible(m).invoke(wac)); + c.add(this); + } catch (Throwable t) { + //ignore. + } + } + /** * Try to create a spring application context from the config location. * Will first try to resolve the location using the servlet context. Modified: cxf/branches/2.5.x-fixes/testutils/src/main/java/org/apache/cxf/testutil/common/AbstractBusTestServerBase.java URL: http://svn.apache.org/viewvc/cxf/branches/2.5.x-fixes/testutils/src/main/java/org/apache/cxf/testutil/common/AbstractBusTestServerBase.java?rev=1325346&r1=1325345&r2=1325346&view=diff ============================================================================== --- cxf/branches/2.5.x-fixes/testutils/src/main/java/org/apache/cxf/testutil/common/AbstractBusTestServerBase.java (original) +++ cxf/branches/2.5.x-fixes/testutils/src/main/java/org/apache/cxf/testutil/common/AbstractBusTestServerBase.java Thu Apr 12 16:14:07 2012 @@ -28,7 +28,11 @@ public abstract class AbstractBusTestSer public boolean stopInProcess() throws Exception { boolean ret = super.stopInProcess(); if (bus != null) { - bus.shutdown(true); + try { + bus.shutdown(true); + } catch (Throwable t) { + //ignore, we're shutting down + } } return ret; } Modified: cxf/branches/2.5.x-fixes/tools/wsdlto/test/src/test/resources/wsdl2java_wsdl/cxf-3290/bug.wsdl URL: http://svn.apache.org/viewvc/cxf/branches/2.5.x-fixes/tools/wsdlto/test/src/test/resources/wsdl2java_wsdl/cxf-3290/bug.wsdl?rev=1325346&r1=1325345&r2=1325346&view=diff ============================================================================== --- cxf/branches/2.5.x-fixes/tools/wsdlto/test/src/test/resources/wsdl2java_wsdl/cxf-3290/bug.wsdl (original) +++ cxf/branches/2.5.x-fixes/tools/wsdlto/test/src/test/resources/wsdl2java_wsdl/cxf-3290/bug.wsdl Thu Apr 12 16:14:07 2012 @@ -1,51 +1,51 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + Modified: cxf/branches/2.5.x-fixes/tools/wsdlto/test/src/test/resources/wsdl2java_wsdl/cxf-3290/bug2.wsdl URL: http://svn.apache.org/viewvc/cxf/branches/2.5.x-fixes/tools/wsdlto/test/src/test/resources/wsdl2java_wsdl/cxf-3290/bug2.wsdl?rev=1325346&r1=1325345&r2=1325346&view=diff ============================================================================== --- cxf/branches/2.5.x-fixes/tools/wsdlto/test/src/test/resources/wsdl2java_wsdl/cxf-3290/bug2.wsdl (original) +++ cxf/branches/2.5.x-fixes/tools/wsdlto/test/src/test/resources/wsdl2java_wsdl/cxf-3290/bug2.wsdl Thu Apr 12 16:14:07 2012 @@ -1,65 +1,65 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Modified: cxf/branches/2.5.x-fixes/tools/wsdlto/test/src/test/resources/wsdl2java_wsdl/cxf3105/cxf3105.wsdl URL: http://svn.apache.org/viewvc/cxf/branches/2.5.x-fixes/tools/wsdlto/test/src/test/resources/wsdl2java_wsdl/cxf3105/cxf3105.wsdl?rev=1325346&r1=1325345&r2=1325346&view=diff ============================================================================== --- cxf/branches/2.5.x-fixes/tools/wsdlto/test/src/test/resources/wsdl2java_wsdl/cxf3105/cxf3105.wsdl (original) +++ cxf/branches/2.5.x-fixes/tools/wsdlto/test/src/test/resources/wsdl2java_wsdl/cxf3105/cxf3105.wsdl Thu Apr 12 16:14:07 2012 @@ -1,89 +1,89 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file Modified: cxf/branches/2.5.x-fixes/tools/wsdlto/test/src/test/resources/wsdl2java_wsdl/cxf3105/ws-binding.xml URL: http://svn.apache.org/viewvc/cxf/branches/2.5.x-fixes/tools/wsdlto/test/src/test/resources/wsdl2java_wsdl/cxf3105/ws-binding.xml?rev=1325346&r1=1325345&r2=1325346&view=diff ============================================================================== --- cxf/branches/2.5.x-fixes/tools/wsdlto/test/src/test/resources/wsdl2java_wsdl/cxf3105/ws-binding.xml (original) +++ cxf/branches/2.5.x-fixes/tools/wsdlto/test/src/test/resources/wsdl2java_wsdl/cxf3105/ws-binding.xml Thu Apr 12 16:14:07 2012 @@ -1,49 +1,49 @@ - - - - - - - - - - - - - - - - - - - - - - - true - + + + + + + + + + + + + + + + + + + + + + + + true +