This is an automated email from the ASF dual-hosted git repository.
jungm pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/tomee.git
The following commit(s) were added to refs/heads/main by this push:
new 7634524234 Unwrap InternalApplication before passing to CXF
7634524234 is described below
commit 76345242343cc2dbefc3c84599fc42c06f376595
Author: Markus Jung <[email protected]>
AuthorDate: Wed May 27 08:09:44 2026 +0200
Unwrap InternalApplication before passing to CXF
---
.../org/apache/openejb/server/cxf/rs/CxfRsHttpListener.java | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git
a/server/openejb-cxf-rs/src/main/java/org/apache/openejb/server/cxf/rs/CxfRsHttpListener.java
b/server/openejb-cxf-rs/src/main/java/org/apache/openejb/server/cxf/rs/CxfRsHttpListener.java
index b0e82b19da..861f5b0f83 100644
---
a/server/openejb-cxf-rs/src/main/java/org/apache/openejb/server/cxf/rs/CxfRsHttpListener.java
+++
b/server/openejb-cxf-rs/src/main/java/org/apache/openejb/server/cxf/rs/CxfRsHttpListener.java
@@ -733,8 +733,16 @@ public class CxfRsHttpListener implements RsHttpListener {
*
* Global binding annotations are tested in:
*
com/sun/ts/tests/jaxrs/spec/filter/globalbinding/JAXRSClient#globalBoundResourceTest_from_standalone
+ *
+ * We unwrap any InternalApplication wrapper so CXF inspects the
user's real
+ * Application subclass. Without this, the @ApplicationPath
annotation on the
+ * user's class is invisible to CXF, and
UriInfoImpl#getMatchedResourceTemplate
+ * omits the application path prefix from the returned template.
*/
- factory.setApplication(application);
+ final Application appForFactory = application instanceof
InternalApplication wrapper && wrapper.getOriginal() != null
+ ? wrapper.getOriginal()
+ : application;
+ factory.setApplication(appForFactory);
this.context = webContext;
if (!webContext.startsWith("/")) {