openwebbeans-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From build...@apache.org
Subject svn commit: r982671 - in /websites/staging/openwebbeans/trunk/content: ./ owbconfig.html
Date Sun, 13 Mar 2016 19:47:55 GMT
Author: buildbot
Date: Sun Mar 13 19:47:55 2016
New Revision: 982671

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:47:55 2016
@@ -1 +1 @@
-1734842
+1734847

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:47:55 2016
@@ -204,16 +204,19 @@ by the integration regarding to the spec
 </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>
which is the default.
+<p>OpenWebBeans enables the user to define the NormalScope handlers for specific scopes.</p>
+<p>NormalScope handlers are used by OpenWebBeans' proxies to resolve the 'Contextual
Instance'.
+E.g. for a <code>@SessionScoped User</code> injected into some other class, this
is exactly the piece of code
+which goes into the current Http Session and gets the User instance from there.
+This class must extend <code>org.apache.webbeans.intercept.NormalScopedBeanInterceptorHandler</code>
and overwrite the
+<code>Object getContextualInstance()</code> method.</p>
+<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>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
@@ -223,12 +226,9 @@ org.apache.webbeans.proxy.mapping.javax.
 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>
+<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.</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



Mime
View raw message