From 01a3690ba75c8a5610b58022372e6ca7991f3854 Mon Sep 17 00:00:00 2001 From: Tomasz Adamski Date: Sat, 12 Oct 2024 21:49:40 +0200 Subject: [PATCH] [WFLY-19816] EJB: support regex in cointainer interceptors mapping --- ...on-in-cointainer-interceptors-mapping.adoc | 91 +++++++++++++++++++ 1 file changed, 91 insertions(+) create mode 100644 ejb/WFLY-19816-Support-regex-expression-in-cointainer-interceptors-mapping.adoc diff --git a/ejb/WFLY-19816-Support-regex-expression-in-cointainer-interceptors-mapping.adoc b/ejb/WFLY-19816-Support-regex-expression-in-cointainer-interceptors-mapping.adoc new file mode 100644 index 00000000..3f5deeba --- /dev/null +++ b/ejb/WFLY-19816-Support-regex-expression-in-cointainer-interceptors-mapping.adoc @@ -0,0 +1,91 @@ +--- +categories: + - ejb +--- += Support regex expressions in cointainer interceptors mapping +:email: tomasz.adamski@redhat.com +:toc: left +:icons: font +:idprefix: +:idseparator: - + +== Overview + +=== Issue +* https://issues.redhat.com/browse/WFLY-19816 + +=== Dev Contacts + +* mailto:tadamski@redhat.com + +=== QE Contacts + +=== Testing By +[x] Engineering + +[] QE + +=== Affected Projects or Components +EJBs + +== Introduction + +Apart from Jakarta EE interceptors, which are mandated by the spec and run after all server specific interceptors, WildFly allows for configuration of container interceptors, which are run before those server specific interceptors. WildFly support for regular expression in Jakarta EE interceptors is already implemented and supported. Such functionality is not supported for container interceptors though. This seems an oversight as there is no reason why regular expressions should be not supported for container interceptors. + + +== Proposed solution + +The proposed solution is to clone regular interceptor support from Jakarta EE interceptors to container interceptors. + +The behavior of those interceptors would be as follows: + +Users would have to enable regular expressions in ejb3 subsystems: + +[source] +---- + + (...) + +---- +[source] + +After that there would be possibility to use regular expressions in names of ejb3 container interceptors f.e.: + +[source] +---- + + + + + + + + \.[A-C][^r]*rTest + org.jboss.as.test.integration.ejb.container.interceptor.regex.RegexInterceptor + + + + +---- +[source] + +== Implementation + +The draft implementation is present in the following branches: +https://issues.redhat.com/browse/WFCORE-7025 +https://issues.redhat.com/browse/WFLY-19816 + +== Test Plan + +Jakarta EE interceptors support for regular expression is already well tested (_org.jboss.as.test.integration.ejb.interceptor.regex_ package of WildFly's basic integration testsuite). Those tests should be cloned for cointainer interceptors. + +Test implementation is also present in: +https://issues.redhat.com/browse/WFLY-19816 + +== Community Documentation +There is no need for community documentation.