openwebbeans-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject svn commit: r881137 - in /websites/staging/openwebbeans/trunk/content: ./ owbsetup_se.html
Date Fri, 04 Oct 2013 13:00:55 GMT
Author: buildbot
Date: Fri Oct  4 13:00:54 2013
New Revision: 881137

Staging update by buildbot for openwebbeans

    websites/staging/openwebbeans/trunk/content/   (props changed)

Propchange: websites/staging/openwebbeans/trunk/content/
--- cms:source-revision (original)
+++ cms:source-revision Fri Oct  4 13:00:54 2013
@@ -1 +1 @@

Modified: websites/staging/openwebbeans/trunk/content/owbsetup_se.html
--- websites/staging/openwebbeans/trunk/content/owbsetup_se.html (original)
+++ websites/staging/openwebbeans/trunk/content/owbsetup_se.html Fri Oct  4 13:00:54 2013
@@ -74,11 +74,45 @@
         <div id="OwbContent_" class="wiki-content">
-<h1 id="openwebbeans-faq">OpenWebBeans FAQ</h1>
-- where does OWB differ from the CDI-1.0 spec
-- what is the default EL version used in OWB
-- how can I provide own plugins if there is a new spec part (e.g EL-3.0) I like to support</p>
+<h1 id="openwebbeans-and-javase">OpenWebBeans and JavaSE</h1>
+<p>To add OpenWebBeans to your javaSE project you need to take the following steps:</p>
+<li>Add required jars to your project</li>
+<li>Bootstrap OpenWebBeans</li>
+<li>Done! Congratulations.</li>
+<h3 id="adding-required-jars-to-your-project">Adding required jars to your project</h3>
+<p>You can add OpenWebBeans to your project manually by adding jars or with Apache
Maven. How to download is explained here: <a href="/openwebbeans/download.html">download
+<p>For JavaSE you need:</p>
+<p>Those two parts of OpenWeBeans are what you could call "system core". They are the
only OWB artifacts you need for JavaSE capabilities and for the time being the existing plugins
basically just adds JavaEE capabilities. 
+After you have added the jars described above to your project accordingly to the download
page and added them to your projects classpath.</p>
+<h3 id="bootstrapping-openwebbeans">Bootstrapping OpenWebBeans</h3>
+<p>For now we recommend two ways for booting up the OpenWebBeans container: <a href=""><strong>Deltaspike
CdiCtrl</strong></a> or booting it yourself in i.e. a standard main method. For
most projects Deltaspike CdiCtrl will be the smoother choice. Going native and booting it
yourself could however be useful if you need full control to do advanced things. Deltaspike
CdiCtrl is documented in the link provided above.</p>
+<p><strong>Option number two - booting yourself</strong></p>
+<div class="codehilite"><pre><span class="kn">import</span> <span
class="nn">org.apache.deltaspike.cdise.api.CdiContainer</span><span class="o">;</span>
+<span class="kn">import</span> <span class="nn">org.apache.deltaspike.cdise.api.CdiContainerLoader</span><span
+<span class="kn">import</span> <span class="nn">org.apache.deltaspike.cdise.api.ContextControl</span><span
+<span class="kn">import</span> <span class="nn">javax.enterprise.context.ApplicationScoped</span><span
+<span class="kd">public</span> <span class="kd">class</span> <span
class="nc">MainApp</span> <span class="o">{</span>
+    <span class="kd">private</span> <span class="kd">static</span>
<span class="n">ContainerLifecycle</span> <span class="n">lifecycle</span>
<span class="o">=</span> <span class="kc">null</span><span class="o">;</span>
+    <span class="kd">public</span> <span class="kd">static</span>
<span class="kt">void</span> <span class="nf">main</span><span
class="o">(</span><span class="n">String</span><span class="o">[]</span>
<span class="n">args</span><span class="o">)</span> <span class="o">{</span>
+        <span class="n">lifecycle</span> <span class="o">=</span>
<span class="n">WebBeansContext</span><span class="o">.</span><span
class="na">currentInstance</span><span class="o">().</span><span class="na">getService</span><span
class="o">(</span><span class="n">ContainerLifecycle</span><span class="o">.</span><span
class="na">class</span><span class="o">);</span>
+        <span class="n">lifecycle</span><span class="o">.</span><span
class="na">startApplication</span><span class="o">(</span><span class="kc">null</span><span
+    <span class="o">}</span>
+    <span class="kd">public</span> <span class="kd">static</span>
<span class="kt">void</span> <span class="nf">shutdown</span><span
class="o">()</span> <span class="o">{</span>
+        <span class="n">lifecycle</span><span class="o">.</span><span
class="na">stopApplication</span><span class="o">(</span><span class="kc">null</span><span
+    <span class="o">}</span>
+<span class="o">}</span>
+<p>From here you might want to look at our samples selection: <a href="/openwebbeans/samples.html">samples</a>.</p>

View raw message