This is an automated email from the ASF dual-hosted git repository.
reta pushed a commit to branch 4.0.x-fixes
in repository https://gitbox.apache.org/repos/asf/cxf.git
The following commit(s) were added to refs/heads/4.0.x-fixes by this push:
new 6272979a06 CXF-9071 rework deprecated CDI method (#2113)
6272979a06 is described below
commit 6272979a066a7f40917f73dafeb87a005db5473e
Author: Mark Struberg <[email protected]>
AuthorDate: Sat Oct 19 16:44:50 2024 +0200
CXF-9071 rework deprecated CDI method (#2113)
BeanManager#fireEvent got deprecated in CDI-2.0 (2016) and in CDI-4.0
it gets finally removed.
---
.../src/main/java/org/apache/cxf/cdi/CdiServerConfigurableFactory.java | 2 +-
.../cdi/src/main/java/org/apache/cxf/cdi/JAXRSCdiResourceExtension.java | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git
a/integration/cdi/src/main/java/org/apache/cxf/cdi/CdiServerConfigurableFactory.java
b/integration/cdi/src/main/java/org/apache/cxf/cdi/CdiServerConfigurableFactory.java
index ee6dded54c..846ef24f41 100644
---
a/integration/cdi/src/main/java/org/apache/cxf/cdi/CdiServerConfigurableFactory.java
+++
b/integration/cdi/src/main/java/org/apache/cxf/cdi/CdiServerConfigurableFactory.java
@@ -67,7 +67,7 @@ public class CdiServerConfigurableFactory implements
ServerConfigurableFactory {
final CreationalContext<?> context =
beanManager.createCreationalContext(bean);
if (!beanManager.isNormalScope(bean.getScope())) {
- beanManager.fireEvent(new
DisposableCreationalContext(context));
+ beanManager.getEvent().fire(new
DisposableCreationalContext(context));
}
return beanManager.getReference(bean, cls, context);
diff --git
a/integration/cdi/src/main/java/org/apache/cxf/cdi/JAXRSCdiResourceExtension.java
b/integration/cdi/src/main/java/org/apache/cxf/cdi/JAXRSCdiResourceExtension.java
index 6875afea6e..f2ac1d3c50 100644
---
a/integration/cdi/src/main/java/org/apache/cxf/cdi/JAXRSCdiResourceExtension.java
+++
b/integration/cdi/src/main/java/org/apache/cxf/cdi/JAXRSCdiResourceExtension.java
@@ -165,7 +165,7 @@ public class JAXRSCdiResourceExtension implements Extension
{
"jakarta.servlet.http.HttpServletRequest",
"jakarta.servlet.ServletContext"));
}
- beanManager.fireEvent(this);
+ beanManager.getEvent().fire(this);
}
/**