openwebbeans-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rmannibu...@apache.org
Subject svn commit: r1829751 - in /openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans: component/PrincipalBean.java util/WebBeansUtil.java
Date Sat, 21 Apr 2018 21:29:38 GMT
Author: rmannibucau
Date: Sat Apr 21 21:29:38 2018
New Revision: 1829751

URL: http://svn.apache.org/viewvc?rev=1829751&view=rev
Log:
OWB-1242 enable to not proxy the principal

Modified:
    openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/PrincipalBean.java
    openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/util/WebBeansUtil.java

Modified: openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/PrincipalBean.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/PrincipalBean.java?rev=1829751&r1=1829750&r2=1829751&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/PrincipalBean.java
(original)
+++ openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/PrincipalBean.java
Sat Apr 21 21:29:38 2018
@@ -26,12 +26,12 @@ import org.apache.webbeans.portable.Prov
 public class PrincipalBean extends BuiltInOwbBean<Principal>
 {
 
-    public PrincipalBean(WebBeansContext webBeansContext)
+    public PrincipalBean(final WebBeansContext webBeansContext, final boolean proxy)
     {
         super(webBeansContext,
               WebBeansType.PRINCIPAL,
               Principal.class,
-              new SimpleProducerFactory<>(new ProviderBasedProducer<>(webBeansContext,
Principal.class, new PrincipalProvider(webBeansContext), true)));
+              new SimpleProducerFactory<>(new ProviderBasedProducer<>(webBeansContext,
Principal.class, new PrincipalProvider(webBeansContext), proxy)));
     }
 
     @Override

Modified: openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/util/WebBeansUtil.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/util/WebBeansUtil.java?rev=1829751&r1=1829750&r2=1829751&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/util/WebBeansUtil.java
(original)
+++ openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/util/WebBeansUtil.java
Sat Apr 21 21:29:38 2018
@@ -541,7 +541,9 @@ public final class WebBeansUtil
      */
     public PrincipalBean getPrincipalBean()
     {
-        return new PrincipalBean(webBeansContext);
+        return new PrincipalBean(webBeansContext,
+                Boolean.parseBoolean(webBeansContext.getOpenWebBeansConfiguration()
+                        .getProperty("org.apache.webbeans.component.PrincipalBean.proxy",
"true")));
     }
 
     /**



Mime
View raw message