-
Notifications
You must be signed in to change notification settings - Fork 81
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[WFLY-19816] EJB: support regex in cointainer interceptors mapping
- Loading branch information
Showing
1 changed file
with
91 additions
and
0 deletions.
There are no files selected for viewing
91 changes: 91 additions & 0 deletions
91
ejb/WFLY-19816-Support-regex-expression-in-cointainer-interceptors-mapping.adoc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,91 @@ | ||
--- | ||
categories: | ||
- ejb | ||
--- | ||
= Support regex expressions in cointainer interceptors mapping | ||
:email: [email protected] | ||
:toc: left | ||
:icons: font | ||
:idprefix: | ||
:idseparator: - | ||
|
||
== Overview | ||
|
||
=== Issue | ||
* https://issues.redhat.com/browse/WFLY-19816 | ||
|
||
=== Dev Contacts | ||
|
||
* mailto:[email protected] | ||
|
||
=== 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] | ||
---- | ||
<subsystem xmlns="urn:jboss:domain:ejb3:10.0"> | ||
(...) | ||
<allow-ejb-name-regex value="true"/> | ||
---- | ||
[source] | ||
|
||
After that there would be possibility to use regular expressions in names of ejb3 container interceptors f.e.: | ||
|
||
[source] | ||
---- | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!-- | ||
~ Copyright The WildFly Authors | ||
~ SPDX-License-Identifier: Apache-2.0 | ||
--> | ||
<jboss xmlns="http://www.jboss.com/xml/ns/javaee" | ||
xmlns:jee="http://java.sun.com/xml/ns/javaee" | ||
xmlns:ci ="urn:container-interceptors:1.0"> | ||
<jee:assembly-descriptor> | ||
<ci:container-interceptors> | ||
<jee:interceptor-binding> | ||
<ejb-name>\.[A-C][^r]*rTest</ejb-name> | ||
<interceptor-class>org.jboss.as.test.integration.ejb.container.interceptor.regex.RegexInterceptor</interceptor-class> | ||
</jee:interceptor-binding> | ||
</ci:container-interceptors> | ||
</jee:assembly-descriptor> | ||
</jboss> | ||
---- | ||
[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. |