You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openwebbeans.apache.org by bu...@apache.org on 2016/03/13 20:20:41 UTC

svn commit: r982666 - in /websites/staging/openwebbeans/trunk/content: ./ owbconfig.html

Author: buildbot
Date: Sun Mar 13 19:20:40 2016
New Revision: 982666

Log:
Staging update by buildbot for openwebbeans

Modified:
    websites/staging/openwebbeans/trunk/content/   (props changed)
    websites/staging/openwebbeans/trunk/content/owbconfig.html

Propchange: websites/staging/openwebbeans/trunk/content/
------------------------------------------------------------------------------
--- cms:source-revision (original)
+++ cms:source-revision Sun Mar 13 19:20:40 2016
@@ -1 +1 @@
-1734841
+1734842

Modified: websites/staging/openwebbeans/trunk/content/owbconfig.html
==============================================================================
--- websites/staging/openwebbeans/trunk/content/owbconfig.html (original)
+++ websites/staging/openwebbeans/trunk/content/owbconfig.html Sun Mar 13 19:20:40 2016
@@ -190,12 +190,50 @@ by the integration regarding to the spec
             cannot properly handle Java8 (mostly due to older Eclipse JDT versions).
         </p>
     </li>
+    <li style="border-bottom: dashed; border-width: 1px">
+        <p><code>javax.enterprise.inject.allowProxying.classes</code></p>
+        <p>
+            Environment property which comma separated list of classes which
+            should NOT fail with an UnproxyableResolutionException.
+            You only have to configure additional classes in your openwebbeans.properties file.
+            All the configured values get added together into a big List.
+        </p>
+        <p>By default we allow the following classes: <code>java.util.HashMap</code> and <code>java.util.Calendar</code>
+        </p>
+    </li>
 </ul>
 
 <h2 id="proxy-mapping">Proxy Mapping<a class="headerlink" href="#proxy-mapping" title="Permanent link">&para;</a></h2>
 <p>OpenWebBeans enables the user to define the NormalScope handlers for specific scopes.
-This allows for more aggressive caching than with the generic <code>NormalScopedBeanInterceptorHandler</code>.</p>
-<p>TODO</p>
+This allows for more aggressive caching than with the generic <code>NormalScopedBeanInterceptorHandler</code> which is the default.
+The default NormalScope handler will look up the Contextual Instance in the respective Context for each and every
+method invocation on the proxy.</p>
+<p>But sometimes we can much more aggressively cache the instances.</p>
+<p>E.g. for <code>@ApplicationScoped</code> beans we can keep
+the contextual instance inside the proxy, making it as fast as a pure Java instance - but still gaining
+all the benefits of CDI!</p>
+<p>For <code>@RequestScoped</code> and <code>@SessionScoped</code> we can use a NormalScope handler which caches the Contextual Instance
+in a ThreadLocal.</p>
+<p>By default the following NormalScope handlers get used:
+<pre>
+org.apache.webbeans.proxy.mapping.javax.enterprise.context.ApplicationScoped
+    =org.apache.webbeans.intercept.ApplicationScopedBeanInterceptorHandler
+org.apache.webbeans.proxy.mapping.javax.enterprise.context.RequestScoped
+    =org.apache.webbeans.intercept.RequestScopedBeanInterceptorHandler
+org.apache.webbeans.proxy.mapping.javax.enterprise.context.SessionScoped
+    =org.apache.webbeans.intercept.SessionScopedBeanInterceptorHandler
+</pre></p>
+<p>As you can see we use a prefix <code>org.apache.webbeans.proxy.mapping.</code> followed by the fully qualified
+scope name as key. The value represents the fully qualified name of the handler class. This class must extend
+<code>org.apache.webbeans.intercept.NormalScopedBeanInterceptorHandler</code> and implement the
+<code>Object getContextualInstance()</code> method.</p>
+<p>If you have a custom scope which spans a Request or longer then you can simply reuse the
+<code>RequestScopedBeanInterceptorHandler</code> as shown in the following example:</p>
+<pre>
+org.apache.webbeans.proxy.mapping.org.apache.deltaspike.core.api.scope.ViewAccessScoped
+    =org.apache.webbeans.intercept.RequestScopedBeanInterceptorHandler
+</pre>
+
 <h2 id="enable-failover-session-replication-support">Enable FailOver / Session Replication support<a class="headerlink" href="#enable-failover-session-replication-support" title="Permanent link">&para;</a></h2>
 <h4 id="since-openwebbeans-150">Since OpenWebBeans-1.5.0<a class="headerlink" href="#since-openwebbeans-150" title="Permanent link">&para;</a></h4>
 <p>OWB-1.5.x and later does <em>not</em> need any special module or filter to enable clustering.