deltaspike-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gpetra...@apache.org
Subject svn commit: r1737505 - in /deltaspike/site/trunk/content/staging/documentation: data.html partial-bean.html proxy.html scheduler.html snapshots.html
Date Sat, 02 Apr 2016 13:50:51 GMT
Author: gpetracek
Date: Sat Apr  2 13:50:51 2016
New Revision: 1737505

URL: http://svn.apache.org/viewvc?rev=1737505&view=rev
Log:
Site checkin for project Apache DeltaSpike Documentation

Modified:
    deltaspike/site/trunk/content/staging/documentation/data.html
    deltaspike/site/trunk/content/staging/documentation/partial-bean.html
    deltaspike/site/trunk/content/staging/documentation/proxy.html
    deltaspike/site/trunk/content/staging/documentation/scheduler.html
    deltaspike/site/trunk/content/staging/documentation/snapshots.html

Modified: deltaspike/site/trunk/content/staging/documentation/data.html
URL: http://svn.apache.org/viewvc/deltaspike/site/trunk/content/staging/documentation/data.html?rev=1737505&r1=1737504&r2=1737505&view=diff
==============================================================================
--- deltaspike/site/trunk/content/staging/documentation/data.html (original)
+++ deltaspike/site/trunk/content/staging/documentation/data.html Sat Apr  2 13:50:51 2016
@@ -749,6 +749,10 @@ generate the query implementation out of
 </ul>
 </div>
 <div class="paragraph">
+<p>You can use the same way for delete an entity:
+* It must start with the <code>removeBy</code> keyword (or related <code>deleteBy</code>).</p>
+</div>
+<div class="paragraph">
 <p>Other assumptions taken by the expression evaluator:</p>
 </div>
 <div class="ulist">

Modified: deltaspike/site/trunk/content/staging/documentation/partial-bean.html
URL: http://svn.apache.org/viewvc/deltaspike/site/trunk/content/staging/documentation/partial-bean.html?rev=1737505&r1=1737504&r2=1737505&view=diff
==============================================================================
--- deltaspike/site/trunk/content/staging/documentation/partial-bean.html (original)
+++ deltaspike/site/trunk/content/staging/documentation/partial-bean.html Sat Apr  2 13:50:51
2016
@@ -314,7 +314,7 @@ table.CodeRay td.code>pre{padding:0}
 <i class="fa icon-important" title="Important"></i>
 </td>
 <td class="content">
-Currently CDI Interceptors applied via @Interceptors and @Decorator are not supported by
partial beans!
+Currently CDI Interceptors applied via @Interceptors, @Intercepted and @Decorator are not
supported by our proxies!
 </td>
 </tr>
 </table>

Modified: deltaspike/site/trunk/content/staging/documentation/proxy.html
URL: http://svn.apache.org/viewvc/deltaspike/site/trunk/content/staging/documentation/proxy.html?rev=1737505&r1=1737504&r2=1737505&view=diff
==============================================================================
--- deltaspike/site/trunk/content/staging/documentation/proxy.html (original)
+++ deltaspike/site/trunk/content/staging/documentation/proxy.html Sat Apr  2 13:50:51 2016
@@ -277,7 +277,19 @@ table.CodeRay td.code>pre{padding:0}
 <div class="paragraph">
 <p>The Proxy Module provides a simple CDI based wrapper for creating dynamic proxies
that can be used within other extensions.<br>
 The benefit of the DeltaSpike Proxy Module (compared to Javassist or any library) is that
the DeltaSpike proxies will execute CDI interceptors.<br>
-The Proxy Module also provides the 'DeltaSpikeProxyContextualLifecycle', which enables you
to dynamically register a proxy as CDI bean via our 'BeanBuilder'.</p>
+The Proxy Module also provides the 'DeltaSpikeProxyContextualLifecycle', which enables you
to dynamically register a proxy as CDI bean via the DeltaSpike 'BeanBuilder'.</p>
+</div>
+<div class="admonitionblock important">
+<table>
+<tr>
+<td class="icon">
+<i class="fa icon-important" title="Important"></i>
+</td>
+<td class="content">
+Currently CDI Interceptors applied via @Interceptors, @Intercepted and @Decorator are not
supported by our proxies!
+</td>
+</tr>
+</table>
 </div>
 <div class="sect2">
 <h3 id="_1_declare_proxy_module_dependencies">1. Declare Proxy Module Dependencies</h3>
@@ -308,7 +320,81 @@ The Proxy Module also provides the 'Delt
 <div class="sect2">
 <h3 id="_2_extend_code_deltaspikeproxyfactory_code">2. Extend <code>DeltaSpikeProxyFactory</code></h3>
 <div class="paragraph">
-<p>The key to making the proxy module work is to provide an implementation of <code>DeltaSpikeProxyFactory</code>
which will do your proxy work for you.  DeltaSpike ships a default one in the PartialBean
module which demonstrates how its meant to work.</p>
+<p>The key to making the proxy module work is to provide an implementation of <code>DeltaSpikeProxyFactory</code>
which will do your proxy work for you.<br>
+DeltaSpike ships 3 implementations which demonstrates how its meant to work:<br></p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>org.apache.deltaspike.partialbean.impl.PartialBeanProxyFactory</p>
+</li>
+<li>
+<p>org.apache.deltaspike.proxy.util.EnableInterceptorsProxyFactory</p>
+</li>
+<li>
+<p>org.apache.deltaspike.jsf.impl.injection.proxy.ConverterAndValidatorProxyFactory</p>
+</li>
+</ul>
+</div>
+</div>
+<div class="sect2">
+<h3 id="_3_using_code_enableinterceptors_code">3. Using <code>@EnableInterceptors</code></h3>
+<div class="paragraph">
+<p><code>@EnableInterceptors</code> allows you to enable your bean interceptors
for @Produces, which is not supported via the CDI API.<br>
+Both interceptors on method and class level are supported.</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="CodeRay highlight"><code data-lang="java"><span class="annotation">@MyCustomInterceptor</span>
+<span class="directive">public</span> SomeServiceImpl <span class="directive">implements</span>
SomeService
+{
+    <span class="annotation">@Transactional</span>
+    <span class="directive">public</span> <span class="type">void</span>
doSomething()
+    {
+        ....
+    }
+}</code></pre>
+</div>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="CodeRay highlight"><code data-lang="java"><span class="annotation">@Produces</span>
+<span class="annotation">@EnableInterceptors</span>
+<span class="directive">public</span> SomeService produce()
+{
+    <span class="keyword">return</span> <span class="keyword">new</span>
SomeServiceImpl();
+}</code></pre>
+</div>
+</div>
+</div>
+<div class="sect2">
+<h3 id="_4_using_code_enableinterceptorsproxyfactory_code">4. Using <code>EnableInterceptorsProxyFactory</code></h3>
+<div class="paragraph">
+<p><code>@EnableInterceptors</code> is just a API for producers which is
built on <code>EnableInterceptorsProxyFactory</code>.<br>
+With <code>EnableInterceptorsProxyFactory</code> you can just proxy an existing
object and let it execute CDI interceptors, if they are defined on the given object class.</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="CodeRay highlight"><code data-lang="java"><span class="annotation">@MyCustomInterceptor</span>
+<span class="directive">public</span> SomeServiceImpl <span class="directive">implements</span>
SomeService
+{
+    <span class="annotation">@Transactional</span>
+    <span class="directive">public</span> <span class="type">void</span>
doSomething()
+    {
+        ....
+    }
+}</code></pre>
+</div>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="CodeRay highlight"><code data-lang="java"><span class="directive">public</span>
<span class="type">void</span> init()
+{
+    SomeServiceImpl myService = <span class="keyword">new</span> SomeServiceImpl();
+    myService = EnableInterceptorsProxyFactory.wrap(myService, BeanManagerProvider.getInstance().getBeanManager());
+    myService.doSomething(); <span class="comment">// will execute the interceptors</span>
+}</code></pre>
+</div>
 </div>
 </div>
 </div>
@@ -341,6 +427,8 @@ The Proxy Module also provides the 'Delt
 <ul class="sectlevel2">
 <li><a href="#_1_declare_proxy_module_dependencies">1. Declare Proxy Module Dependencies</a></li>
 <li><a href="#_2_extend_code_deltaspikeproxyfactory_code">2. Extend <code>DeltaSpikeProxyFactory</code></a></li>
+<li><a href="#_3_using_code_enableinterceptors_code">3. Using <code>@EnableInterceptors</code></a></li>
+<li><a href="#_4_using_code_enableinterceptorsproxyfactory_code">4. Using <code>EnableInterceptorsProxyFactory</code></a></li>
 </ul>
 </li>
 </ul>

Modified: deltaspike/site/trunk/content/staging/documentation/scheduler.html
URL: http://svn.apache.org/viewvc/deltaspike/site/trunk/content/staging/documentation/scheduler.html?rev=1737505&r1=1737504&r2=1737505&view=diff
==============================================================================
--- deltaspike/site/trunk/content/staging/documentation/scheduler.html (original)
+++ deltaspike/site/trunk/content/staging/documentation/scheduler.html Sat Apr  2 13:50:51
2016
@@ -453,10 +453,25 @@ schedule/install jobs dynamically.</p>
 </div>
 </div>
 <div class="sect1">
+<h2 id="_configurable_cron_expressions">Configurable CRON expressions</h2>
+<div class="sectionbody">
+<div class="paragraph">
+<p>In some cases it might be useful to configure a cron-expression e.g. per Project-Stage.
+Therefore, DeltaSpike (v1.6.0+) allows to use keys instead of hardcoded expressions.</p>
+</div>
+<div class="paragraph">
+<p>In the previous examples we had e.g. <code>@Scheduled(cronExpression = "0
0/10 * * * ?")</code>.
+Instead of hardcoding it that way, it&#8217;s possible to use e.g. <code>@Scheduled(cronExpression
= "{myCronExpression}")</code> and
+in one of the active config-sources used by DeltaSpike a concrete expression can be defined
e.g. via <code>myCronExpression=0 0/10 * * * ?</code>.
+Using e.g. <code>myCronExpression.Development=0 0/5 * * * ?</code> would allow
to change the configured expression for Project-Stage development.</p>
+</div>
+</div>
+</div>
+<div class="sect1">
 <h2 id="_manual_scheduler_control">Manual Scheduler Control</h2>
 <div class="sectionbody">
 <div class="paragraph">
-<p>Th SPI allows to control the scheduler (or integrate any other
+<p>The SPI allows to control the scheduler (or integrate any other
 compatible scheduler as an alternative to Quartz2)</p>
 </div>
 <div class="paragraph">
@@ -580,6 +595,7 @@ For more information, see <a href="https
 </ul>
 </li>
 <li><a href="#__scheduled_with_org_quartz_job_or_java_lang_runnable">@Scheduled
with org.quartz.Job or java.lang.Runnable</a></li>
+<li><a href="#_configurable_cron_expressions">Configurable CRON expressions</a></li>
 <li><a href="#_manual_scheduler_control">Manual Scheduler Control</a></li>
 <li><a href="#_execute_java_lang_runnable_with_managedexecutorservice">Execute
java.lang.Runnable with ManagedExecutorService</a></li>
 <li><a href="#_custom_scheduler">Custom Scheduler</a></li>

Modified: deltaspike/site/trunk/content/staging/documentation/snapshots.html
URL: http://svn.apache.org/viewvc/deltaspike/site/trunk/content/staging/documentation/snapshots.html?rev=1737505&r1=1737504&r2=1737505&view=diff
==============================================================================
--- deltaspike/site/trunk/content/staging/documentation/snapshots.html (original)
+++ deltaspike/site/trunk/content/staging/documentation/snapshots.html Sat Apr  2 13:50:51
2016
@@ -343,7 +343,7 @@ Snapshots provide previews of DeltaSpike
 <div class="listingblock">
 <div class="content">
 <pre class="CodeRay highlight"><code data-lang="xml"><span class="tag">&lt;properties&gt;</span>
-    <span class="tag">&lt;deltaspike.version&gt;</span>1.5.5-SNAPSHOT<span
class="tag">&lt;/deltaspike.version&gt;</span>
+    <span class="tag">&lt;deltaspike.version&gt;</span>1.6.0-SNAPSHOT<span
class="tag">&lt;/deltaspike.version&gt;</span>
 <span class="tag">&lt;/properties&gt;</span></code></pre>
 </div>
 </div>



Mime
View raw message