This is an automated email from the ASF dual-hosted git repository.

jlmonteiro pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/tomee.git


The following commit(s) were added to refs/heads/master by this push:
     new dd1e1fc  Fix for unit tests because the JVM is reused. TomEE will 
create in a normal usage only one SecurityService at any time so it's fine to 
have replace=true
dd1e1fc is described below

commit dd1e1fc5d200e366bc4bca273f44af0f7f39fa2e
Author: Jean-Louis Monteiro <[email protected]>
AuthorDate: Mon Apr 26 09:38:18 2021 +0200

    Fix for unit tests because the JVM is reused. TomEE will create in a normal 
usage only one SecurityService at any time so it's fine to have replace=true
---
 .../java/org/apache/openejb/core/security/AbstractSecurityService.java  | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git 
a/container/openejb-core/src/main/java/org/apache/openejb/core/security/AbstractSecurityService.java
 
b/container/openejb-core/src/main/java/org/apache/openejb/core/security/AbstractSecurityService.java
index 399096b..e447386 100644
--- 
a/container/openejb-core/src/main/java/org/apache/openejb/core/security/AbstractSecurityService.java
+++ 
b/container/openejb-core/src/main/java/org/apache/openejb/core/security/AbstractSecurityService.java
@@ -105,7 +105,7 @@ public abstract class AbstractSecurityService implements 
DestroyableResource, Se
         // we can register policy handlers and the role mapper
         try {
             for (String key : getKeys()) {
-                PolicyContext.registerHandler(key, this, false);
+                PolicyContext.registerHandler(key, this, true);
             }
         } catch (final PolicyContextException e) {
             // best would probably to fail start if something wrong happens

Reply via email to