You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by re...@apache.org on 2023/03/07 18:22:13 UTC

[cxf] branch 3.4.x-fixes updated (4c1b4983f9 -> d18c346d30)

This is an automated email from the ASF dual-hosted git repository.

reta pushed a change to branch 3.4.x-fixes
in repository https://gitbox.apache.org/repos/asf/cxf.git


    from 4c1b4983f9 Recording .gitmergeinfo Changes
     new 86151aa1c4 Bump cxf.httpcomponents.client.version from 4.5.13 to 4.5.14 (#1159)
     new 584ed31921 Bump plexus-archiver from 4.6.1 to 4.6.2 (#1160)
     new d18c346d30 [CXF-8745] The ApplicationListener, which redirects all ApplicationEvents to the SpringBus, now uses a WeakReference to allow a GC if the SpringBus is no longer in use because it's corresponding context has been closed. (#1077)

The 3 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../java/org/apache/cxf/bus/spring/SpringBus.java  | 27 +++++++++++++++++-----
 distribution/src/main/release/samples/pom.xml      |  2 +-
 parent/pom.xml                                     |  2 +-
 3 files changed, 23 insertions(+), 8 deletions(-)


[cxf] 01/03: Bump cxf.httpcomponents.client.version from 4.5.13 to 4.5.14 (#1159)

Posted by re...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

reta pushed a commit to branch 3.4.x-fixes
in repository https://gitbox.apache.org/repos/asf/cxf.git

commit 86151aa1c4aa9bf342f20b616238ffbc9b862b86
Author: dependabot[bot] <49...@users.noreply.github.com>
AuthorDate: Tue Mar 7 07:35:45 2023 -0500

    Bump cxf.httpcomponents.client.version from 4.5.13 to 4.5.14 (#1159)
    
    Bumps `cxf.httpcomponents.client.version` from 4.5.13 to 4.5.14.
    
    Updates `httpclient` from 4.5.13 to 4.5.14
    
    Updates `httpmime` from 4.5.13 to 4.5.14
    
    ---
    updated-dependencies:
    - dependency-name: org.apache.httpcomponents:httpclient
      dependency-type: direct:production
      update-type: version-update:semver-patch
    - dependency-name: org.apache.httpcomponents:httpmime
      dependency-type: direct:development
      update-type: version-update:semver-patch
    ...
    
    Signed-off-by: dependabot[bot] <su...@github.com>
    Co-authored-by: dependabot[bot] <49...@users.noreply.github.com>
---
 distribution/src/main/release/samples/pom.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/distribution/src/main/release/samples/pom.xml b/distribution/src/main/release/samples/pom.xml
index dc050c32f3..51ae699396 100644
--- a/distribution/src/main/release/samples/pom.xml
+++ b/distribution/src/main/release/samples/pom.xml
@@ -34,7 +34,7 @@
         <spring.cloud.eureka.version>2.2.10.RELEASE</spring.cloud.eureka.version>
         <cxf.jetty9.version>9.4.51.v20230217</cxf.jetty9.version>
         <cxf.netty.version>4.1.89.Final</cxf.netty.version>
-        <cxf.httpcomponents.client.version>4.5.13</cxf.httpcomponents.client.version>
+        <cxf.httpcomponents.client.version>4.5.14</cxf.httpcomponents.client.version>
         <cxf.swagger.ui.version>4.17.0</cxf.swagger.ui.version>
         <cxf.tika.version>1.28.5</cxf.tika.version>
         <cxf.tomcat.version>9.0.73</cxf.tomcat.version>


[cxf] 02/03: Bump plexus-archiver from 4.6.1 to 4.6.2 (#1160)

Posted by re...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

reta pushed a commit to branch 3.4.x-fixes
in repository https://gitbox.apache.org/repos/asf/cxf.git

commit 584ed31921957dfbb6ffdd76807f251a27c60eec
Author: dependabot[bot] <49...@users.noreply.github.com>
AuthorDate: Tue Mar 7 07:35:59 2023 -0500

    Bump plexus-archiver from 4.6.1 to 4.6.2 (#1160)
    
    Bumps [plexus-archiver](https://github.com/codehaus-plexus/plexus-archiver) from 4.6.1 to 4.6.2.
    - [Release notes](https://github.com/codehaus-plexus/plexus-archiver/releases)
    - [Changelog](https://github.com/codehaus-plexus/plexus-archiver/blob/master/ReleaseNotes.md)
    - [Commits](https://github.com/codehaus-plexus/plexus-archiver/compare/plexus-archiver-4.6.1...plexus-archiver-4.6.2)
    
    ---
    updated-dependencies:
    - dependency-name: org.codehaus.plexus:plexus-archiver
      dependency-type: direct:production
      update-type: version-update:semver-patch
    ...
    
    Signed-off-by: dependabot[bot] <su...@github.com>
    Co-authored-by: dependabot[bot] <49...@users.noreply.github.com>
---
 parent/pom.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/parent/pom.xml b/parent/pom.xml
index 8a548ea562..7d3e696917 100644
--- a/parent/pom.xml
+++ b/parent/pom.xml
@@ -190,7 +190,7 @@
         <cxf.opentracing.version>0.33.0</cxf.opentracing.version>
         <cxf.openwebbeans.version>2.0.27</cxf.openwebbeans.version>
         <cxf.persistence-api.version>2.2.3</cxf.persistence-api.version>
-        <cxf.plexus-archiver.version>4.2.0</cxf.plexus-archiver.version>
+        <cxf.plexus-archiver.version>4.6.2</cxf.plexus-archiver.version>
         <cxf.plexus-utils.version>3.5.0</cxf.plexus-utils.version>
         <cxf.reactivestreams.version>1.0.4</cxf.reactivestreams.version>
         <cxf.reactor.version>3.3.22.RELEASE</cxf.reactor.version>


[cxf] 03/03: [CXF-8745] The ApplicationListener, which redirects all ApplicationEvents to the SpringBus, now uses a WeakReference to allow a GC if the SpringBus is no longer in use because it's corresponding context has been closed. (#1077)

Posted by re...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

reta pushed a commit to branch 3.4.x-fixes
in repository https://gitbox.apache.org/repos/asf/cxf.git

commit d18c346d30d491976eab2a6104a64d7340178e49
Author: Eric Giese <er...@googlemail.com>
AuthorDate: Tue Mar 7 14:37:55 2023 +0100

    [CXF-8745] The ApplicationListener, which redirects all ApplicationEvents to the SpringBus, now uses a WeakReference to allow a GC if the SpringBus is no longer in use because it's corresponding context has been closed. (#1077)
---
 .../java/org/apache/cxf/bus/spring/SpringBus.java  | 27 +++++++++++++++++-----
 1 file changed, 21 insertions(+), 6 deletions(-)

diff --git a/core/src/main/java/org/apache/cxf/bus/spring/SpringBus.java b/core/src/main/java/org/apache/cxf/bus/spring/SpringBus.java
index c30b2b3841..34b04b720b 100644
--- a/core/src/main/java/org/apache/cxf/bus/spring/SpringBus.java
+++ b/core/src/main/java/org/apache/cxf/bus/spring/SpringBus.java
@@ -19,6 +19,8 @@
 
 package org.apache.cxf.bus.spring;
 
+import java.lang.ref.WeakReference;
+
 import org.apache.cxf.bus.extension.ExtensionManagerBus;
 import org.apache.cxf.configuration.ConfiguredBeanLocator;
 import org.apache.cxf.configuration.Configurer;
@@ -51,12 +53,7 @@ public class SpringBus extends ExtensionManagerBus
     /** {@inheritDoc}*/
     public void setApplicationContext(ApplicationContext applicationContext) {
         ctx = (AbstractApplicationContext)applicationContext;
-        @SuppressWarnings("rawtypes")
-        ApplicationListener listener = new ApplicationListener() {
-            public void onApplicationEvent(ApplicationEvent event) {
-                SpringBus.this.onApplicationEvent(event);
-            }
-        };
+        SpringBusApplicationListener listener = new SpringBusApplicationListener(this);
         ctx.addApplicationListener(listener);
         ApplicationContext ac = applicationContext.getParent();
         while (ac != null) {
@@ -137,4 +134,22 @@ public class SpringBus extends ExtensionManagerBus
         closeContext = b;
     }
 
+    private static class SpringBusApplicationListener implements ApplicationListener<ApplicationEvent> {
+
+        // Using a WeakReference ensures that the Listener does not prevent a SpringBus from being free'd
+        // This can happen in parent-child context constellations, where the Listener is recursively added
+        private final WeakReference<SpringBus> springBusReference;
+
+        SpringBusApplicationListener(SpringBus springBus) {
+            this.springBusReference = new WeakReference<>(springBus);
+        }
+
+        @Override
+        public void onApplicationEvent(ApplicationEvent event) {
+            final SpringBus springBus = springBusReference.get();
+            if (springBus != null) {
+                springBus.onApplicationEvent(event);
+            }
+        }
+    }
 }