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 17:15:39 UTC
[cxf] branch 3.5.x-fixes updated (3be7a952f3 -> 4145645ffe)
This is an automated email from the ASF dual-hosted git repository.
reta pushed a change to branch 3.5.x-fixes
in repository https://gitbox.apache.org/repos/asf/cxf.git
from 3be7a952f3 Update Apache Tomcat to 9.0.73
new 899efeb291 Bump cxf.httpcomponents.client.version from 4.5.13 to 4.5.14 (#1159)
new 62677e74f5 Bump plexus-archiver from 4.6.1 to 4.6.2 (#1160)
new 4145645ffe [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] 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.5.x-fixes
in repository https://gitbox.apache.org/repos/asf/cxf.git
commit 62677e74f557cc7b77802a85d8b865733c30651f
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 bfd8af61fc..7b8a3020f2 100644
--- a/parent/pom.xml
+++ b/parent/pom.xml
@@ -187,7 +187,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.6.1</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.4.27</cxf.reactor.version>
[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.5.x-fixes
in repository https://gitbox.apache.org/repos/asf/cxf.git
commit 899efeb291fda5da4f577e7a90f14b0dfb5cb4d5
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 ae76c50507..b329cf8b1c 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>3.1.4</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>2.7.0</cxf.tika.version>
<cxf.tomcat.version>9.0.73</cxf.tomcat.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.5.x-fixes
in repository https://gitbox.apache.org/repos/asf/cxf.git
commit 4145645ffe25b0f0ffb334ab538e8b74a6d1c72b
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 0c625e4fc6..4f6caace4b 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;
@@ -60,12 +62,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) {
@@ -150,4 +147,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);
+ }
+ }
+ }
}