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 15:40:50 UTC
[cxf] branch 3.6.x-fixes updated (a529faa54d -> 897b040405)
This is an automated email from the ASF dual-hosted git repository.
reta pushed a change to branch 3.6.x-fixes
in repository https://gitbox.apache.org/repos/asf/cxf.git
from a529faa54d Update Apache Tomcat to 9.0.73
new 1a1a7aa30b Bump cxf.httpcomponents.client.version from 4.5.13 to 4.5.14 (#1159)
new e3a719290b Bump plexus-archiver from 4.6.1 to 4.6.2 (#1160)
new 897b040405 [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.6.x-fixes
in repository https://gitbox.apache.org/repos/asf/cxf.git
commit e3a719290b5eb18db1609218211a1ce59a332462
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 5793945739..d4ce4d6848 100644
--- a/parent/pom.xml
+++ b/parent/pom.xml
@@ -186,7 +186,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.5.3</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.6.x-fixes
in repository https://gitbox.apache.org/repos/asf/cxf.git
commit 897b0404056adc04e8b1a277132c66e932f30ff5
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..e2a0ca4e37 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) {
+ var springBus = springBusReference.get();
+ if (springBus != null) {
+ springBus.onApplicationEvent(event);
+ }
+ }
+ }
}
[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.6.x-fixes
in repository https://gitbox.apache.org/repos/asf/cxf.git
commit 1a1a7aa30b1f95eff90588181863119df9c9a1e0
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 824b6eca24..9a36deaa4c 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.jetty10.version>10.0.14</cxf.jetty10.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>