You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tomee.apache.org by bu...@apache.org on 2011/07/10 07:37:10 UTC

svn commit: r792466 [10/19] - /websites/staging/openejb/trunk/content/

Added: websites/staging/openejb/trunk/content/injection-of-datasource-example.cwiki
==============================================================================
--- websites/staging/openejb/trunk/content/injection-of-datasource-example.cwiki (added)
+++ websites/staging/openejb/trunk/content/injection-of-datasource-example.cwiki Sun Jul 10 05:37:04 2011
@@ -0,0 +1,104 @@
+h1. Overview
+
+{span:style=float: right; margin-left: 20px;}
+{html}
+
+<object width="400" height="250"><param name="movie" value="http://www.youtube.com/v/g3lIPlegDJk?fs=1&amp;hl=en_US&amp;rel=0"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/g3lIPlegDJk?fs=1&amp;hl=en_US&amp;rel=0" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="400" height="250"></embed></object>
+
+{html}
+{span}
+{div}
+In this example we use the *@Resource* annotation to inject a *javax.sql.DataSource* into our bean.  The trickiest thing about injecting a DataSource is not declaring the annotation, but actually configuring the data source.
+
+In OpenEJB the rules are quite simple.  An declaration like the following in code:
+
+{code}
+@Resource DataSource customerDataSource;
+{code}
+
+Matches a data source declared as follows in the openejb.xml file:
+
+{code}
+<Resource type="DataSource" id="customerDataSource">
+ ....
+</Resource>
+{code}
+
+As seen in this example, the data source can also be declared via properties as follows:
+{code}
+customerDataSource = new://Resource?type=DataSource
+{code}
+
+This style of properties creation can be used in the InitialContext properties, set into the System properties, or passed in on the command line as vm properties.
+
+_The source for this example is in the "injection-of-datasource" directory located in the [openejb-examples.zip|OPENEJB:Download] available on the download page._
+{div}
+{div:style=clear:both;}{div}
+
+h1. The Code
+
+{snippet:id=code|url=openejb3/examples/injection-of-datasource/src/main/java/org/superbiz/injection/MoviesImpl.java|lang=java}
+
+h1. Writing a unit test for the example
+
+{snippet:id=code|url=openejb3/examples/injection-of-datasource/src/test/java/org/superbiz/injection/MoviesTest.java|lang=java}
+
+Note in the above test code the following lines:
+{code}
+p.put("movieDatabase", "new://Resource?type=DataSource");
+p.put("movieDatabase.JdbcDriver", "org.hsqldb.jdbcDriver");
+p.put("movieDatabase.JdbcUrl", "jdbc:hsqldb:mem:moviedb");
+{code}
+
+As mentioned these actually create and configure the data source.  When OpenEJB boots up, these properties will get read and executed allowing you to keep all the configuration required to run your tests right in the test case itself.  No need to keep dozens of openejb.xml config files in your projects or try and create one big configuration that might end up loading a lot of unneeded containers and resources.  
+
+In your production system you can place the properties into the OPENEJB_HOME/conf/system.properties file or add them to your OPENEJB_HOME/conf/openejb.xml with a declaration like so:
+
+{code:xml}
+<Resource type="DataSource" id="movieDatabase">
+ JdbcDriver = org.hsqldb.jdbcDriver
+ JdbcUrl = jdbc:hsqldb:mem:moviedb
+</Resource>
+{code}
+
+h1.  Running
+
+Running the example is fairly simple.  In the "injection-of-datasource" directory of the [examples zip|OPENEJB:Download], just run:
+
+{quote}
+$ mvn clean install
+{quote}
+
+Which should create output like the following.
+
+{noformat}
+-------------------------------------------------------
+ T E S T S
+-------------------------------------------------------
+Running org.superbiz.injection.MoviesTest
+Apache OpenEJB 3.0    build: 20080408-04:13
+http://openejb.apache.org/
+INFO - openejb.home = /Users/dblevins/work/openejb-3.0/examples/injection-of-datasource
+INFO - openejb.base = /Users/dblevins/work/openejb-3.0/examples/injection-of-datasource
+INFO - Configuring Service(id=Default Security Service, type=SecurityService, provider-id=Default Security Service)
+INFO - Configuring Service(id=Default Transaction Manager, type=TransactionManager, provider-id=Default Transaction Manager)
+INFO - Configuring Service(id=movieDatabase, type=Resource, provider-id=Default JDBC Database)
+INFO - Configuring Service(id=Default JDK 1.3 ProxyFactory, type=ProxyFactory, provider-id=Default JDK 1.3 ProxyFactory)
+INFO - Found EjbModule in classpath: /Users/dblevins/work/openejb-3.0/examples/injection-of-datasource/target/classes
+INFO - Configuring app: /Users/dblevins/work/openejb-3.0/examples/injection-of-datasource/target/classes
+INFO - Configuring Service(id=Default Stateful Container, type=Container, provider-id=Default Stateful Container)
+INFO - Auto-creating a container for bean Movies: Container(type=STATEFUL, id=Default Stateful Container)
+INFO - Auto-linking resource-ref 'org.superbiz.injection.MoviesImpl/movieDatabase' in bean Movies to Resource(id=movieDatabase)
+INFO - Loaded Module: /Users/dblevins/work/openejb-3.0/examples/injection-of-datasource/target/classes
+INFO - Assembling app: /Users/dblevins/work/openejb-3.0/examples/injection-of-datasource/target/classes
+INFO - Jndi(name=MoviesLocal) --> Ejb(deployment-id=Movies)
+INFO - Created Ejb(deployment-id=Movies, ejb-name=Movies, container=Default Stateful Container)
+INFO - Deployed Application(path=/Users/dblevins/work/openejb-3.0/examples/injection-of-datasource/target/classes)
+Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.911 sec
+
+Results :
+
+Tests run: 1, Failures: 0, Errors: 0, Skipped: 0
+
+{noformat}
+

Added: websites/staging/openejb/trunk/content/injection-of-datasource-example.html
==============================================================================
--- websites/staging/openejb/trunk/content/injection-of-datasource-example.html (added)
+++ websites/staging/openejb/trunk/content/injection-of-datasource-example.html Sun Jul 10 05:37:04 2011
@@ -0,0 +1,235 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html lang="en">
+  <head>
+    <meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
+    <title>Injection of DataSource Example</title>
+    <link rel="stylesheet" type="text/css" media="screen" href="http://incubator.apache.org/lucy/css/lucy.css">
+  </head>
+
+  <body>
+
+    <div id="lucy-rigid_wrapper">
+
+      <div id="lucy-top" class="container_16 lucy-white_box_3d">
+
+        <div id="lucy-logo_box" class="grid_8">
+          <a href="/OpenEJB/"><img src="http://openejb.apache.org/images/logo_openejb.gif" alt="Apache OpenEJB™"></a>
+        </div> <!-- lucy-logo_box -->
+
+        <div #id="lucy-top_nav_box" class="grid_8">
+          <div id="lucy-top_nav_bar" class="container_8">
+            <ul>
+              <li><a href="http://www.apache.org/" title="Apache Software Foundation">Apache Software Foundation</a></li>
+              <li><a href="http://www.apache.org/licenses/" title="License">License</a></li>
+              <li><a href="http://www.apache.org/foundation/sponsorship.html" title="Sponsorship">Sponsorship</a></li>
+              <li><a href="http://www.apache.org/foundation/thanks.html" title="Thanks">Thanks</a></li>
+              <li><a href="http://www.apache.org/security/ " title="Security">Security</a></li>
+            </ul>
+          </div> <!-- lucy-top_nav_bar -->
+          <p><a href="http://www.apache.org/">Apache</a>&nbsp;&raquo&nbsp;<a href="/">Incubator</a></p>
+          <form name="lucy-top_search_box" id="lucy-top_search_box" action="http://www.google.com/search" method="get">
+            <input value="*.apache.org" name="sitesearch" type="hidden"/>
+            <input type="text" name="q" id="query" style="width:85%">
+            <input type="submit" id="submit" value="Search">
+          </form>
+        </div> <!-- lucy-top_nav_box -->
+
+        <div class="clear"></div>
+
+      </div> <!-- lucy-top -->
+
+      <div id="lucy-main_content" class="container_16 lucy-white_box_3d">
+
+        <div class="grid_4" id="lucy-left_nav_box">
+          <h6>About</h6>
+            <ul>
+              <li><a href="/lucy/">Welcome</a></li>
+              <li><a href="/lucy/faq.html">FAQ</a></li>
+              <li><a href="/lucy/people.html">People</a></li>
+            </ul>
+          <h6>Resources</h6>
+            <ul>
+              <li><a href="/lucy/download.html">Download</a></li>
+              <li><a href="/lucy/mailing_lists.html">Mailing Lists</a></li>
+              <li><a href="/lucy/docs/perl/">Documentation</a></li>
+              <li><a href="http://wiki.apache.org/lucy/">Wiki</a></li>
+              <li><a href="https://issues.apache.org/jira/browse/LUCY">Issue Tracker</a></li>
+              <li><a href="/lucy/version_control.html">Version Control</a></li>
+            </ul>
+          <h6>Related Projects</h6>
+            <ul>
+              <li><a href="http://lucene.apache.org/java/">Lucene</a></li>
+              <li><a href="http://lucene.apache.org/solr/">Solr</a></li>
+              <li><a href="http://incubator.apache.org/lucene.net/">Lucene.NET</a></li>
+              <li><a href="http://lucene.apache.org/pylucene/">PyLucene</a></li>
+              <li><a href="http://lucene.apache.org/openrelevance/">Open Relevance</a></li>
+            </ul>
+        </div> <!-- lucy-left_nav_box -->
+
+        <div id="lucy-main_content_box" class="grid_9">
+          <p><a name="InjectionofDataSourceExample-Overview"></a></p>
+
+<h1>Overview</h1>
+
+<p>{span:style=float: right; margin-left: 20px;}
+{html}</p>
+
+<p><object width="400" height="250"><param name="movie"
+value="http://www.youtube.com/v/g3lIPlegDJk?fs=1&amp;hl=en_US&amp;rel=0"></param><param
+name="allowFullScreen" value="true"></param><param name="allowscriptaccess"
+value="always"></param><embed
+src="http://www.youtube.com/v/g3lIPlegDJk?fs=1&amp;hl=en_US&amp;rel=0"
+type="application/x-shockwave-flash" allowscriptaccess="always"
+allowfullscreen="true" width="400" height="250"></embed></object></p>
+
+<p>{html}
+{span}
+{div}
+In this example we use the <em>@Resource</em> annotation to inject a
+<em>javax.sql.DataSource</em> into our bean.  The trickiest thing about injecting
+a DataSource is not declaring the annotation, but actually configuring the
+data source.</p>
+
+<p>In OpenEJB the rules are quite simple.  An declaration like the following
+in code:</p>
+
+<pre><code>@Resource DataSource customerDataSource;
+</code></pre>
+
+<p>Matches a data source declared as follows in the openejb.xml file:</p>
+
+<pre><code>&lt;Resource type="DataSource" id="customerDataSource"&gt;
+ ....
+&lt;/Resource&gt;
+</code></pre>
+
+<p>As seen in this example, the data source can also be declared via
+properties as follows:</p>
+
+<pre><code>customerDataSource = new://Resource?type=DataSource
+</code></pre>
+
+<p>This style of properties creation can be used in the InitialContext
+properties, set into the System properties, or passed in on the command
+line as vm properties.</p>
+
+<p><em>The source for this example is in the "injection-of-datasource" directory
+located in the <a href="openejb:download.html">openejb-examples.zip</a>
+ available on the download page.</em>
+{div}
+{div:style=clear:both;}{div}</p>
+
+<p><a name="InjectionofDataSourceExample-TheCode"></a></p>
+
+<h1>The Code</h1>
+
+<p>{snippet:id=code|url=openejb3/examples/injection-of-datasource/src/main/java/org/superbiz/injection/MoviesImpl.java|lang=java}</p>
+
+<p><a name="InjectionofDataSourceExample-Writingaunittestfortheexample"></a></p>
+
+<h1>Writing a unit test for the example</h1>
+
+<p>{snippet:id=code|url=openejb3/examples/injection-of-datasource/src/test/java/org/superbiz/injection/MoviesTest.java|lang=java}</p>
+
+<p>Note in the above test code the following lines:</p>
+
+<pre><code>p.put("movieDatabase", "new://Resource?type=DataSource");
+p.put("movieDatabase.JdbcDriver", "org.hsqldb.jdbcDriver");
+p.put("movieDatabase.JdbcUrl", "jdbc:hsqldb:mem:moviedb");
+</code></pre>
+
+<p>As mentioned these actually create and configure the data source.  When
+OpenEJB boots up, these properties will get read and executed allowing you
+to keep all the configuration required to run your tests right in the test
+case itself.  No need to keep dozens of openejb.xml config files in your
+projects or try and create one big configuration that might end up loading
+a lot of unneeded containers and resources.  </p>
+
+<p>In your production system you can place the properties into the
+OPENEJB_HOME/conf/system.properties file or add them to your
+OPENEJB_HOME/conf/openejb.xml with a declaration like so:</p>
+
+<pre><code>&lt;Resource type="DataSource" id="movieDatabase"&gt;
+ JdbcDriver = org.hsqldb.jdbcDriver
+ JdbcUrl = jdbc:hsqldb:mem:moviedb
+&lt;/Resource&gt;
+</code></pre>
+
+<p><a name="InjectionofDataSourceExample-Running"></a></p>
+
+<h1>Running</h1>
+
+<p>Running the example is fairly simple.  In the "injection-of-datasource"
+directory of the <a href="openejb:download.html">examples zip</a>
+, just run:</p>
+
+<p>{quote}
+$ mvn clean install
+{quote}</p>
+
+<p>Which should create output like the following.</p>
+
+<pre><code>-------------------------------------------------------
+ T E S T S
+-------------------------------------------------------
+Running org.superbiz.injection.MoviesTest
+Apache OpenEJB 3.0    build: 20080408-04:13
+http://openejb.apache.org/
+INFO - openejb.home =
+</code></pre>
+
+<p>/Users/dblevins/work/openejb-3.0/examples/injection-of-datasource
+    INFO - openejb.base =
+/Users/dblevins/work/openejb-3.0/examples/injection-of-datasource
+    INFO - Configuring Service(id=Default Security Service,
+type=SecurityService, provider-id=Default Security Service)
+    INFO - Configuring Service(id=Default Transaction Manager,
+type=TransactionManager, provider-id=Default Transaction Manager)
+    INFO - Configuring Service(id=movieDatabase, type=Resource,
+provider-id=Default JDBC Database)
+    INFO - Configuring Service(id=Default JDK 1.3 ProxyFactory,
+type=ProxyFactory, provider-id=Default JDK 1.3 ProxyFactory)
+    INFO - Found EjbModule in classpath:
+/Users/dblevins/work/openejb-3.0/examples/injection-of-datasource/target/classes
+    INFO - Configuring app:
+/Users/dblevins/work/openejb-3.0/examples/injection-of-datasource/target/classes
+    INFO - Configuring Service(id=Default Stateful Container, type=Container,
+provider-id=Default Stateful Container)
+    INFO - Auto-creating a container for bean Movies: Container(type=STATEFUL,
+id=Default Stateful Container)
+    INFO - Auto-linking resource-ref
+'org.superbiz.injection.MoviesImpl/movieDatabase' in bean Movies to
+Resource(id=movieDatabase)
+    INFO - Loaded Module:
+/Users/dblevins/work/openejb-3.0/examples/injection-of-datasource/target/classes
+    INFO - Assembling app:
+/Users/dblevins/work/openejb-3.0/examples/injection-of-datasource/target/classes
+    INFO - Jndi(name=MoviesLocal) --> Ejb(deployment-id=Movies)
+    INFO - Created Ejb(deployment-id=Movies, ejb-name=Movies, container=Default
+Stateful Container)
+    INFO - Deployed
+Application(path=/Users/dblevins/work/openejb-3.0/examples/injection-of-datasource/target/classes)
+    Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.911 sec</p>
+
+<pre><code>Results :
+
+Tests run: 1, Failures: 0, Errors: 0, Skipped: 0
+</code></pre>
+
+        </div> <!-- lucy-main_content_box --> 
+        <div class="clear"></div>
+
+      </div> <!-- lucy-main_content -->
+
+      <div id="lucy-copyright" class="container_16">
+        <p>Copyright &#169; 2010-2011 The Apache Software Foundation, Licensed under the 
+           <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a>.
+           <br/>
+          
+        </p>
+      </div> <!-- lucy-copyright -->
+
+    </div> <!-- lucy-rigid_wrapper -->
+
+  </body>
+</html>

Added: websites/staging/openejb/trunk/content/injection-of-entitymanager-example.cwiki
==============================================================================
--- websites/staging/openejb/trunk/content/injection-of-entitymanager-example.cwiki (added)
+++ websites/staging/openejb/trunk/content/injection-of-entitymanager-example.cwiki Sun Jul 10 05:37:04 2011
@@ -0,0 +1,80 @@
+h1. Overview
+
+{span:style=float: right; margin-left: 20px;}
+{html}
+
+<object width="400" height="250"><param name="movie" value="http://www.youtube.com/v/s4uiIoAehgQ?fs=1&amp;hl=en_US&amp;rel=0"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/s4uiIoAehgQ?fs=1&amp;hl=en_US&amp;rel=0" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="400" height="250"></embed></object>
+
+{html}
+{span}
+{div}
+
+Shows use of *@PersistenceContext* to have an *EntityManager* with an *EXTENDED* persistence context injected into a @Stateful bean.  An EJB 3 *@Entity* bean is used with the EntityManager to create, persist and merge data to a database.
+
+If you need to use a TRANSACTION persistence context, see [this example|Testing Transactions Example].
+
+_The source for this example is in the "injection-of-entitymanager" directory located in the [openejb-examples.zip|OPENEJB:Download] available on the download page._
+
+{div}
+{div:style=clear:both;}{div}
+
+h1. The Code
+
+h2. The Stateful bean
+{snippet:id=code|url=openejb3/examples/injection-of-entitymanager/src/main/java/org/superbiz/injection/jpa/MoviesImpl.java|lang=java}
+
+h2. The Entity bean
+{snippet:id=code|url=openejb3/examples/injection-of-entitymanager/src/main/java/org/superbiz/injection/jpa/Movie.java|lang=java}
+
+h2. The persistence unit
+
+{snippet:id=code|url=openejb3/examples/injection-of-entitymanager/src/main/resources/META-INF/persistence.xml|lang=xml}
+
+h1. Writing a unit test for the example
+
+{snippet:id=code|url=openejb3/examples/injection-of-entitymanager/src/test/java/org/superbiz/injection/jpa/MoviesTest.java|lang=java}
+
+Curious on the InitialContext parameters used?  See the [Injection of DataSource Example] for an explanation of how any Resource can be configured via properties in the TestCase itself or via an openejb.xml file.
+
+h1.  Running
+
+Running the example is fairly simple.  In the "injection-of-entitymanager" directory of the [examples zip|OPENEJB:Download], just run:
+
+$ mvn clean install
+
+Which should create output like the following.
+
+{noformat}
+-------------------------------------------------------
+ T E S T S
+-------------------------------------------------------
+Running org.superbiz.injection.jpa.MoviesTest
+Apache OpenEJB 3.0    build: 20080408-04:13
+http://openejb.apache.org/
+INFO - openejb.home = /Users/dblevins/work/openejb-3.0/examples/injection-of-entitymanager
+INFO - openejb.base = /Users/dblevins/work/openejb-3.0/examples/injection-of-entitymanager
+INFO - Configuring Service(id=Default Security Service, type=SecurityService, provider-id=Default Security Service)
+INFO - Configuring Service(id=Default Transaction Manager, type=TransactionManager, provider-id=Default Transaction Manager)
+INFO - Configuring Service(id=movieDatabaseUnmanaged, type=Resource, provider-id=Default JDBC Database)
+INFO - Configuring Service(id=movieDatabase, type=Resource, provider-id=Default JDBC Database)
+INFO - Configuring Service(id=Default JDK 1.3 ProxyFactory, type=ProxyFactory, provider-id=Default JDK 1.3 ProxyFactory)
+INFO - Found EjbModule in classpath: /Users/dblevins/work/openejb-3.0/examples/injection-of-entitymanager/target/classes
+INFO - Configuring app: /Users/dblevins/work/openejb-3.0/examples/injection-of-entitymanager/target/classes
+INFO - Configuring Service(id=Default Stateful Container, type=Container, provider-id=Default Stateful Container)
+INFO - Auto-creating a container for bean Movies: Container(type=STATEFUL, id=Default Stateful Container)
+INFO - Configuring PersistenceUnit(name=movie-unit)
+INFO - Loaded Module: /Users/dblevins/work/openejb-3.0/examples/injection-of-entitymanager/target/classes
+INFO - Assembling app: /Users/dblevins/work/openejb-3.0/examples/injection-of-entitymanager/target/classes
+INFO - PersistenceUnit(name=movie-unit, provider=org.apache.openjpa.persistence.PersistenceProviderImpl)
+ERROR - JAVA AGENT NOT INSTALLED. The JPA Persistence Provider requested installation of a ClassFileTransformer which requires
+        a JavaAgent.  See http://openejb.apache.org/3.0/javaagent.html
+INFO - Jndi(name=MoviesLocal) --> Ejb(deployment-id=Movies)
+INFO - Created Ejb(deployment-id=Movies, ejb-name=Movies, container=Default Stateful Container)
+INFO - Deployed Application(path=/Users/dblevins/work/openejb-3.0/examples/injection-of-entitymanager/target/classes)
+Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 2.095 sec
+
+Results :
+
+Tests run: 1, Failures: 0, Errors: 0, Skipped: 0
+{noformat}
+

Added: websites/staging/openejb/trunk/content/injection-of-entitymanager-example.html
==============================================================================
--- websites/staging/openejb/trunk/content/injection-of-entitymanager-example.html (added)
+++ websites/staging/openejb/trunk/content/injection-of-entitymanager-example.html Sun Jul 10 05:37:04 2011
@@ -0,0 +1,216 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html lang="en">
+  <head>
+    <meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
+    <title>Injection of EntityManager Example</title>
+    <link rel="stylesheet" type="text/css" media="screen" href="http://incubator.apache.org/lucy/css/lucy.css">
+  </head>
+
+  <body>
+
+    <div id="lucy-rigid_wrapper">
+
+      <div id="lucy-top" class="container_16 lucy-white_box_3d">
+
+        <div id="lucy-logo_box" class="grid_8">
+          <a href="/OpenEJB/"><img src="http://openejb.apache.org/images/logo_openejb.gif" alt="Apache OpenEJB™"></a>
+        </div> <!-- lucy-logo_box -->
+
+        <div #id="lucy-top_nav_box" class="grid_8">
+          <div id="lucy-top_nav_bar" class="container_8">
+            <ul>
+              <li><a href="http://www.apache.org/" title="Apache Software Foundation">Apache Software Foundation</a></li>
+              <li><a href="http://www.apache.org/licenses/" title="License">License</a></li>
+              <li><a href="http://www.apache.org/foundation/sponsorship.html" title="Sponsorship">Sponsorship</a></li>
+              <li><a href="http://www.apache.org/foundation/thanks.html" title="Thanks">Thanks</a></li>
+              <li><a href="http://www.apache.org/security/ " title="Security">Security</a></li>
+            </ul>
+          </div> <!-- lucy-top_nav_bar -->
+          <p><a href="http://www.apache.org/">Apache</a>&nbsp;&raquo&nbsp;<a href="/">Incubator</a></p>
+          <form name="lucy-top_search_box" id="lucy-top_search_box" action="http://www.google.com/search" method="get">
+            <input value="*.apache.org" name="sitesearch" type="hidden"/>
+            <input type="text" name="q" id="query" style="width:85%">
+            <input type="submit" id="submit" value="Search">
+          </form>
+        </div> <!-- lucy-top_nav_box -->
+
+        <div class="clear"></div>
+
+      </div> <!-- lucy-top -->
+
+      <div id="lucy-main_content" class="container_16 lucy-white_box_3d">
+
+        <div class="grid_4" id="lucy-left_nav_box">
+          <h6>About</h6>
+            <ul>
+              <li><a href="/lucy/">Welcome</a></li>
+              <li><a href="/lucy/faq.html">FAQ</a></li>
+              <li><a href="/lucy/people.html">People</a></li>
+            </ul>
+          <h6>Resources</h6>
+            <ul>
+              <li><a href="/lucy/download.html">Download</a></li>
+              <li><a href="/lucy/mailing_lists.html">Mailing Lists</a></li>
+              <li><a href="/lucy/docs/perl/">Documentation</a></li>
+              <li><a href="http://wiki.apache.org/lucy/">Wiki</a></li>
+              <li><a href="https://issues.apache.org/jira/browse/LUCY">Issue Tracker</a></li>
+              <li><a href="/lucy/version_control.html">Version Control</a></li>
+            </ul>
+          <h6>Related Projects</h6>
+            <ul>
+              <li><a href="http://lucene.apache.org/java/">Lucene</a></li>
+              <li><a href="http://lucene.apache.org/solr/">Solr</a></li>
+              <li><a href="http://incubator.apache.org/lucene.net/">Lucene.NET</a></li>
+              <li><a href="http://lucene.apache.org/pylucene/">PyLucene</a></li>
+              <li><a href="http://lucene.apache.org/openrelevance/">Open Relevance</a></li>
+            </ul>
+        </div> <!-- lucy-left_nav_box -->
+
+        <div id="lucy-main_content_box" class="grid_9">
+          <p><a name="InjectionofEntityManagerExample-Overview"></a></p>
+
+<h1>Overview</h1>
+
+<p>{span:style=float: right; margin-left: 20px;}
+{html}</p>
+
+<p><object width="400" height="250"><param name="movie"
+value="http://www.youtube.com/v/s4uiIoAehgQ?fs=1&amp;hl=en_US&amp;rel=0"></param><param
+name="allowFullScreen" value="true"></param><param name="allowscriptaccess"
+value="always"></param><embed
+src="http://www.youtube.com/v/s4uiIoAehgQ?fs=1&amp;hl=en_US&amp;rel=0"
+type="application/x-shockwave-flash" allowscriptaccess="always"
+allowfullscreen="true" width="400" height="250"></embed></object></p>
+
+<p>{html}
+{span}
+{div}</p>
+
+<p>Shows use of <em>@PersistenceContext</em> to have an <em>EntityManager</em> with an
+<em>EXTENDED</em> persistence context injected into a @Stateful bean.  An EJB 3
+<em>@Entity</em> bean is used with the EntityManager to create, persist and merge
+data to a database.</p>
+
+<p>If you need to use a TRANSACTION persistence context, see <a href="testing-transactions-example.html">this example</a>
+.</p>
+
+<p><em>The source for this example is in the "injection-of-entitymanager"
+directory located in the <a href="openejb:download.html">openejb-examples.zip</a>
+ available on the download page.</em></p>
+
+<p>{div}
+{div:style=clear:both;}{div}</p>
+
+<p><a name="InjectionofEntityManagerExample-TheCode"></a></p>
+
+<h1>The Code</h1>
+
+<p><a name="InjectionofEntityManagerExample-TheStatefulbean"></a></p>
+
+<h2>The Stateful bean</h2>
+
+<p>{snippet:id=code|url=openejb3/examples/injection-of-entitymanager/src/main/java/org/superbiz/injection/jpa/MoviesImpl.java|lang=java}</p>
+
+<p><a name="InjectionofEntityManagerExample-TheEntitybean"></a></p>
+
+<h2>The Entity bean</h2>
+
+<p>{snippet:id=code|url=openejb3/examples/injection-of-entitymanager/src/main/java/org/superbiz/injection/jpa/Movie.java|lang=java}</p>
+
+<p><a name="InjectionofEntityManagerExample-Thepersistenceunit"></a></p>
+
+<h2>The persistence unit</h2>
+
+<p>{snippet:id=code|url=openejb3/examples/injection-of-entitymanager/src/main/resources/META-INF/persistence.xml|lang=xml}</p>
+
+<p><a name="InjectionofEntityManagerExample-Writingaunittestfortheexample"></a></p>
+
+<h1>Writing a unit test for the example</h1>
+
+<p>{snippet:id=code|url=openejb3/examples/injection-of-entitymanager/src/test/java/org/superbiz/injection/jpa/MoviesTest.java|lang=java}</p>
+
+<p>Curious on the InitialContext parameters used?  See the <a href="injection-of-datasource-example.html">Injection of DataSource Example</a>
+ for an explanation of how any Resource can be configured via properties in
+the TestCase itself or via an openejb.xml file.</p>
+
+<p><a name="InjectionofEntityManagerExample-Running"></a></p>
+
+<h1>Running</h1>
+
+<p>Running the example is fairly simple.  In the "injection-of-entitymanager"
+directory of the <a href="openejb:download.html">examples zip</a>
+, just run:</p>
+
+<p>$ mvn clean install</p>
+
+<p>Which should create output like the following.</p>
+
+<pre><code>-------------------------------------------------------
+ T E S T S
+-------------------------------------------------------
+Running org.superbiz.injection.jpa.MoviesTest
+Apache OpenEJB 3.0    build: 20080408-04:13
+http://openejb.apache.org/
+INFO - openejb.home =
+</code></pre>
+
+<p>/Users/dblevins/work/openejb-3.0/examples/injection-of-entitymanager
+    INFO - openejb.base =
+/Users/dblevins/work/openejb-3.0/examples/injection-of-entitymanager
+    INFO - Configuring Service(id=Default Security Service,
+type=SecurityService, provider-id=Default Security Service)
+    INFO - Configuring Service(id=Default Transaction Manager,
+type=TransactionManager, provider-id=Default Transaction Manager)
+    INFO - Configuring Service(id=movieDatabaseUnmanaged, type=Resource,
+provider-id=Default JDBC Database)
+    INFO - Configuring Service(id=movieDatabase, type=Resource,
+provider-id=Default JDBC Database)
+    INFO - Configuring Service(id=Default JDK 1.3 ProxyFactory,
+type=ProxyFactory, provider-id=Default JDK 1.3 ProxyFactory)
+    INFO - Found EjbModule in classpath:
+/Users/dblevins/work/openejb-3.0/examples/injection-of-entitymanager/target/classes
+    INFO - Configuring app:
+/Users/dblevins/work/openejb-3.0/examples/injection-of-entitymanager/target/classes
+    INFO - Configuring Service(id=Default Stateful Container, type=Container,
+provider-id=Default Stateful Container)
+    INFO - Auto-creating a container for bean Movies: Container(type=STATEFUL,
+id=Default Stateful Container)
+    INFO - Configuring PersistenceUnit(name=movie-unit)
+    INFO - Loaded Module:
+/Users/dblevins/work/openejb-3.0/examples/injection-of-entitymanager/target/classes
+    INFO - Assembling app:
+/Users/dblevins/work/openejb-3.0/examples/injection-of-entitymanager/target/classes
+    INFO - PersistenceUnit(name=movie-unit,
+provider=org.apache.openjpa.persistence.PersistenceProviderImpl)
+    ERROR - JAVA AGENT NOT INSTALLED. The JPA Persistence Provider requested
+installation of a ClassFileTransformer which requires
+        a JavaAgent.  See http://openejb.apache.org/3.0/javaagent.html
+    INFO - Jndi(name=MoviesLocal) --> Ejb(deployment-id=Movies)
+    INFO - Created Ejb(deployment-id=Movies, ejb-name=Movies, container=Default
+Stateful Container)
+    INFO - Deployed
+Application(path=/Users/dblevins/work/openejb-3.0/examples/injection-of-entitymanager/target/classes)
+    Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 2.095 sec</p>
+
+<pre><code>Results :
+
+Tests run: 1, Failures: 0, Errors: 0, Skipped: 0
+</code></pre>
+
+        </div> <!-- lucy-main_content_box --> 
+        <div class="clear"></div>
+
+      </div> <!-- lucy-main_content -->
+
+      <div id="lucy-copyright" class="container_16">
+        <p>Copyright &#169; 2010-2011 The Apache Software Foundation, Licensed under the 
+           <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a>.
+           <br/>
+          
+        </p>
+      </div> <!-- lucy-copyright -->
+
+    </div> <!-- lucy-rigid_wrapper -->
+
+  </body>
+</html>

Added: websites/staging/openejb/trunk/content/injection-of-env-entry-example.cwiki
==============================================================================
--- websites/staging/openejb/trunk/content/injection-of-env-entry-example.cwiki (added)
+++ websites/staging/openejb/trunk/content/injection-of-env-entry-example.cwiki Sun Jul 10 05:37:04 2011
@@ -0,0 +1,80 @@
+h1. Overview
+
+The EJB 3.0 spec added Dependency Injection as a main feature.  The *@Resource* annotation can be used to inject several things including EntityManagers, DataSources, Topics, Queues, etc.  Most of these are container supplied objects.  It is possible, however, to supply your own values to be injected via an *<env-entry>* in your ejb-jar.xml deployment descriptor.  EJB 3.0 supported env-entry types are limited to the following:
+
+ - java.lang.String
+ - java.lang.Integer
+ - java.lang.Short
+ - java.lang.Float
+ - java.lang.Double
+ - java.lang.Byte
+ - java.lang.Character
+ - java.lang.Boolean
+
+It should be noted that OpenEJB does not restrict you to just these data types and allows for anything convertible from a String to be injected provided there is a java.beans.PropertyEditor installed to handle the type you want.  Additionally, a plain properties file packed in your META-INF directory can be used to supply the injected values instead of using the ejb-jar.xml.  See the [Custom Injection] example for details.
+
+_The source for this example is the "injection-of-env-entry" directory located in the [openejb-examples.zip|OPENEJB:Download] available on the download page._
+
+h1. The Code
+
+h2. Annotated Bean Class
+
+{snippet:id=code|url=openejb3/examples/injection-of-env-entry/src/main/java/org/superbiz/injection/InvoiceBean.java|lang=java}
+
+The use of the *@Resource* annotation isn't limited to setters.  For example, this annotation could have been used on the corresponding *field* like so:
+
+{code}
+@Resource
+private int maxLineItems;
+{code}
+
+h2. ejb-jar.xml
+
+{snippet:id=code|url=openejb3/examples/injection-of-env-entry/src/main/resources/META-INF/ejb-jar.xml|lang=xml}
+
+h1. Test Case
+
+{snippet:id=code|url=openejb3/examples/injection-of-env-entry/src/test/java/org/superbiz/injection/InvoiceBeanTest.java|lang=java}
+
+h1. Running it
+
+Running the example is fairly simple.  In the "injection-of-env-entry" directory of the [examples zip|OPENEJB:Download], just run:
+
+{quote}
+$ mvn clean install
+{quote}
+
+Which should create output like the following.
+
+{noformat}
+-------------------------------------------------------
+ T E S T S
+-------------------------------------------------------
+Running org.superbiz.injection.PurchaseOrderBeanTest
+Apache OpenEJB 3.0    build: 20080408-04:13
+http://openejb.apache.org/
+INFO - openejb.home = /Users/dblevins/work/openejb-3.0/examples/injection-of-env-entry
+INFO - openejb.base = /Users/dblevins/work/openejb-3.0/examples/injection-of-env-entry
+INFO - Configuring Service(id=Default Security Service, type=SecurityService, provider-id=Default Security Service)
+INFO - Configuring Service(id=Default Transaction Manager, type=TransactionManager, provider-id=Default Transaction Manager)
+INFO - Configuring Service(id=Default JDK 1.3 ProxyFactory, type=ProxyFactory, provider-id=Default JDK 1.3 ProxyFactory)
+INFO - Found EjbModule in classpath: /Users/dblevins/work/openejb-3.0/examples/injection-of-env-entry/target/classes
+INFO - Configuring app: /Users/dblevins/work/openejb-3.0/examples/injection-of-env-entry/target/classes
+INFO - Configuring Service(id=Default Stateful Container, type=Container, provider-id=Default Stateful Container)
+INFO - Auto-creating a container for bean InvoiceBean: Container(type=STATEFUL, id=Default Stateful Container)
+INFO - Loaded Module: /Users/dblevins/work/openejb-3.0/examples/injection-of-env-entry/target/classes
+INFO - Assembling app: /Users/dblevins/work/openejb-3.0/examples/injection-of-env-entry/target/classes
+INFO - Jndi(name=InvoiceBeanRemote) --> Ejb(deployment-id=InvoiceBean)
+INFO - Jndi(name=PurchaseOrderBeanRemote) --> Ejb(deployment-id=PurchaseOrderBean)
+INFO - Created Ejb(deployment-id=InvoiceBean, ejb-name=InvoiceBean, container=Default Stateful Container)
+INFO - Created Ejb(deployment-id=PurchaseOrderBean, ejb-name=PurchaseOrderBean, container=Default Stateful Container)
+INFO - Deployed Application(path=/Users/dblevins/work/openejb-3.0/examples/injection-of-env-entry/target/classes)
+Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.331 sec
+Running org.superbiz.injection.InvoiceBeanTest
+Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.068 sec
+
+Results :
+
+Tests run: 4, Failures: 0, Errors: 0, Skipped: 0
+{noformat}
+

Added: websites/staging/openejb/trunk/content/injection-of-env-entry-example.html
==============================================================================
--- websites/staging/openejb/trunk/content/injection-of-env-entry-example.html (added)
+++ websites/staging/openejb/trunk/content/injection-of-env-entry-example.html Sun Jul 10 05:37:04 2011
@@ -0,0 +1,213 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html lang="en">
+  <head>
+    <meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
+    <title>Injection of env-entry Example</title>
+    <link rel="stylesheet" type="text/css" media="screen" href="http://incubator.apache.org/lucy/css/lucy.css">
+  </head>
+
+  <body>
+
+    <div id="lucy-rigid_wrapper">
+
+      <div id="lucy-top" class="container_16 lucy-white_box_3d">
+
+        <div id="lucy-logo_box" class="grid_8">
+          <a href="/OpenEJB/"><img src="http://openejb.apache.org/images/logo_openejb.gif" alt="Apache OpenEJB™"></a>
+        </div> <!-- lucy-logo_box -->
+
+        <div #id="lucy-top_nav_box" class="grid_8">
+          <div id="lucy-top_nav_bar" class="container_8">
+            <ul>
+              <li><a href="http://www.apache.org/" title="Apache Software Foundation">Apache Software Foundation</a></li>
+              <li><a href="http://www.apache.org/licenses/" title="License">License</a></li>
+              <li><a href="http://www.apache.org/foundation/sponsorship.html" title="Sponsorship">Sponsorship</a></li>
+              <li><a href="http://www.apache.org/foundation/thanks.html" title="Thanks">Thanks</a></li>
+              <li><a href="http://www.apache.org/security/ " title="Security">Security</a></li>
+            </ul>
+          </div> <!-- lucy-top_nav_bar -->
+          <p><a href="http://www.apache.org/">Apache</a>&nbsp;&raquo&nbsp;<a href="/">Incubator</a></p>
+          <form name="lucy-top_search_box" id="lucy-top_search_box" action="http://www.google.com/search" method="get">
+            <input value="*.apache.org" name="sitesearch" type="hidden"/>
+            <input type="text" name="q" id="query" style="width:85%">
+            <input type="submit" id="submit" value="Search">
+          </form>
+        </div> <!-- lucy-top_nav_box -->
+
+        <div class="clear"></div>
+
+      </div> <!-- lucy-top -->
+
+      <div id="lucy-main_content" class="container_16 lucy-white_box_3d">
+
+        <div class="grid_4" id="lucy-left_nav_box">
+          <h6>About</h6>
+            <ul>
+              <li><a href="/lucy/">Welcome</a></li>
+              <li><a href="/lucy/faq.html">FAQ</a></li>
+              <li><a href="/lucy/people.html">People</a></li>
+            </ul>
+          <h6>Resources</h6>
+            <ul>
+              <li><a href="/lucy/download.html">Download</a></li>
+              <li><a href="/lucy/mailing_lists.html">Mailing Lists</a></li>
+              <li><a href="/lucy/docs/perl/">Documentation</a></li>
+              <li><a href="http://wiki.apache.org/lucy/">Wiki</a></li>
+              <li><a href="https://issues.apache.org/jira/browse/LUCY">Issue Tracker</a></li>
+              <li><a href="/lucy/version_control.html">Version Control</a></li>
+            </ul>
+          <h6>Related Projects</h6>
+            <ul>
+              <li><a href="http://lucene.apache.org/java/">Lucene</a></li>
+              <li><a href="http://lucene.apache.org/solr/">Solr</a></li>
+              <li><a href="http://incubator.apache.org/lucene.net/">Lucene.NET</a></li>
+              <li><a href="http://lucene.apache.org/pylucene/">PyLucene</a></li>
+              <li><a href="http://lucene.apache.org/openrelevance/">Open Relevance</a></li>
+            </ul>
+        </div> <!-- lucy-left_nav_box -->
+
+        <div id="lucy-main_content_box" class="grid_9">
+          <p><a name="Injectionofenv-entryExample-Overview"></a></p>
+
+<h1>Overview</h1>
+
+<p>The EJB 3.0 spec added Dependency Injection as a main feature.  The
+<em>@Resource</em> annotation can be used to inject several things including
+EntityManagers, DataSources, Topics, Queues, etc.  Most of these are
+container supplied objects.  It is possible, however, to supply your own
+values to be injected via an <em><env-entry></em> in your ejb-jar.xml deployment
+descriptor.  EJB 3.0 supported env-entry types are limited to the
+following:</p>
+
+<ul>
+<li>java.lang.String</li>
+<li>java.lang.Integer</li>
+<li>java.lang.Short</li>
+<li>java.lang.Float</li>
+<li>java.lang.Double</li>
+<li>java.lang.Byte</li>
+<li>java.lang.Character</li>
+<li>java.lang.Boolean</li>
+</ul>
+
+<p>It should be noted that OpenEJB does not restrict you to just these data
+types and allows for anything convertible from a String to be injected
+provided there is a java.beans.PropertyEditor installed to handle the type
+you want.  Additionally, a plain properties file packed in your META-INF
+directory can be used to supply the injected values instead of using the
+ejb-jar.xml.  See the <a href="custom-injection.html">Custom Injection</a>
+ example for details.</p>
+
+<p><em>The source for this example is the "injection-of-env-entry" directory
+located in the <a href="openejb:download.html">openejb-examples.zip</a>
+ available on the download page.</em></p>
+
+<p><a name="Injectionofenv-entryExample-TheCode"></a></p>
+
+<h1>The Code</h1>
+
+<p><a name="Injectionofenv-entryExample-AnnotatedBeanClass"></a></p>
+
+<h2>Annotated Bean Class</h2>
+
+<p>{snippet:id=code|url=openejb3/examples/injection-of-env-entry/src/main/java/org/superbiz/injection/InvoiceBean.java|lang=java}</p>
+
+<p>The use of the <em>@Resource</em> annotation isn't limited to setters.  For
+example, this annotation could have been used on the corresponding <em>field</em>
+like so:</p>
+
+<pre><code>@Resource
+private int maxLineItems;
+</code></pre>
+
+<p><a name="Injectionofenv-entryExample-ejb-jar.xml"></a></p>
+
+<h2>ejb-jar.xml</h2>
+
+<p>{snippet:id=code|url=openejb3/examples/injection-of-env-entry/src/main/resources/META-INF/ejb-jar.xml|lang=xml}</p>
+
+<p><a name="Injectionofenv-entryExample-TestCase"></a></p>
+
+<h1>Test Case</h1>
+
+<p>{snippet:id=code|url=openejb3/examples/injection-of-env-entry/src/test/java/org/superbiz/injection/InvoiceBeanTest.java|lang=java}</p>
+
+<p><a name="Injectionofenv-entryExample-Runningit"></a></p>
+
+<h1>Running it</h1>
+
+<p>Running the example is fairly simple.  In the "injection-of-env-entry"
+directory of the <a href="openejb:download.html">examples zip</a>
+, just run:</p>
+
+<p>{quote}
+$ mvn clean install
+{quote}</p>
+
+<p>Which should create output like the following.</p>
+
+<pre><code>-------------------------------------------------------
+ T E S T S
+-------------------------------------------------------
+Running org.superbiz.injection.PurchaseOrderBeanTest
+Apache OpenEJB 3.0    build: 20080408-04:13
+http://openejb.apache.org/
+INFO - openejb.home =
+</code></pre>
+
+<p>/Users/dblevins/work/openejb-3.0/examples/injection-of-env-entry
+    INFO - openejb.base =
+/Users/dblevins/work/openejb-3.0/examples/injection-of-env-entry
+    INFO - Configuring Service(id=Default Security Service,
+type=SecurityService, provider-id=Default Security Service)
+    INFO - Configuring Service(id=Default Transaction Manager,
+type=TransactionManager, provider-id=Default Transaction Manager)
+    INFO - Configuring Service(id=Default JDK 1.3 ProxyFactory,
+type=ProxyFactory, provider-id=Default JDK 1.3 ProxyFactory)
+    INFO - Found EjbModule in classpath:
+/Users/dblevins/work/openejb-3.0/examples/injection-of-env-entry/target/classes
+    INFO - Configuring app:
+/Users/dblevins/work/openejb-3.0/examples/injection-of-env-entry/target/classes
+    INFO - Configuring Service(id=Default Stateful Container, type=Container,
+provider-id=Default Stateful Container)
+    INFO - Auto-creating a container for bean InvoiceBean:
+Container(type=STATEFUL, id=Default Stateful Container)
+    INFO - Loaded Module:
+/Users/dblevins/work/openejb-3.0/examples/injection-of-env-entry/target/classes
+    INFO - Assembling app:
+/Users/dblevins/work/openejb-3.0/examples/injection-of-env-entry/target/classes
+    INFO - Jndi(name=InvoiceBeanRemote) --> Ejb(deployment-id=InvoiceBean)
+    INFO - Jndi(name=PurchaseOrderBeanRemote) -->
+Ejb(deployment-id=PurchaseOrderBean)
+    INFO - Created Ejb(deployment-id=InvoiceBean, ejb-name=InvoiceBean,
+container=Default Stateful Container)
+    INFO - Created Ejb(deployment-id=PurchaseOrderBean,
+ejb-name=PurchaseOrderBean, container=Default Stateful Container)
+    INFO - Deployed
+Application(path=/Users/dblevins/work/openejb-3.0/examples/injection-of-env-entry/target/classes)
+    Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.331 sec
+    Running org.superbiz.injection.InvoiceBeanTest
+    Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.068 sec</p>
+
+<pre><code>Results :
+
+Tests run: 4, Failures: 0, Errors: 0, Skipped: 0
+</code></pre>
+
+        </div> <!-- lucy-main_content_box --> 
+        <div class="clear"></div>
+
+      </div> <!-- lucy-main_content -->
+
+      <div id="lucy-copyright" class="container_16">
+        <p>Copyright &#169; 2010-2011 The Apache Software Foundation, Licensed under the 
+           <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a>.
+           <br/>
+          
+        </p>
+      </div> <!-- lucy-copyright -->
+
+    </div> <!-- lucy-rigid_wrapper -->
+
+  </body>
+</html>

Added: websites/staging/openejb/trunk/content/injection-of-other-ejbs-example.cwiki
==============================================================================
--- websites/staging/openejb/trunk/content/injection-of-other-ejbs-example.cwiki (added)
+++ websites/staging/openejb/trunk/content/injection-of-other-ejbs-example.cwiki Sun Jul 10 05:37:04 2011
@@ -0,0 +1,113 @@
+h1. Overview
+
+This example shows how to use the *@EJB* annotation in a bean class to refer to other beans.
+
+This functionality is often referred as dependency injection, and has been introduced in Java EE 5.
+
+In this particular example, we will create two session stateless beans:
+
+ - DataStore session bean
+ - DataReader session bean
+
+The DataReader bean uses the DataStore to retrieve some informations, and we will see how we can, inside the DataReader bean, get a reference to the DataStore bean using the @EJB annotation, thus avoiding the use of the JNDI API.
+
+_The source for this example is the "injection-of-ejbs" directory located in the [openejb-examples.zip|OPENEJB:Download] available on the download page._
+
+h1. The Code
+
+In this example we develop two simple session stateless beans (DataReader and DataStore), and show how we can use the @EJB annotation in one of these beans to get the reference to the other session bean
+
+h2. DataStore session bean
+
+h3. Bean
+
+{snippet:id=code|url=openejb3/examples/injection-of-ejbs/src/main/java/org/superbiz/injection/DataStoreImpl.java|lang=java}
+
+h3. Local business interface
+
+{snippet:id=code|url=openejb3/examples/injection-of-ejbs/src/main/java/org/superbiz/injection/DataStoreLocal.java|lang=java}
+
+h3. Remote business interface
+
+{snippet:id=code|url=openejb3/examples/injection-of-ejbs/src/main/java/org/superbiz/injection/DataStoreRemote.java|lang=java}
+
+h2. DataReader session bean
+
+h3. Bean
+
+{snippet:id=code|url=openejb3/examples/injection-of-ejbs/src/main/java/org/superbiz/injection/DataReaderImpl.java|lang=java}
+
+Note the usage of the *@EJB* annotation on the DataStoreRemote and DataStoreLocal fields.  This is the minimum required for EJB ref resolution.  If you have two beans that implement the same business interfaces, you'll want to the *beanName* attribute as follows:
+{code}
+@EJB(beanName = "DataStoreImpl") 
+private DataStoreRemote dataStoreRemote;
+
+@EJB(beanName = "DataStoreImpl") 
+private DataStoreLocal dataStoreLocal;
+{code}
+
+h3. Local business interface
+
+{snippet:id=code|url=openejb3/examples/injection-of-ejbs/src/main/java/org/superbiz/injection/DataReaderLocal.java|lang=java}
+
+(The remote business interface is not shown for the sake of brevity).
+
+{tip:title=@EJB annotation}
+Several components in Java EE can use the @EJB annotation, such as:
+  * Servlets
+  * ServletContextListeners
+  * Servlet Filters
+  * JSF managed beans
+  * EJB interceptors
+  * JAX-WS service endpoints
+{tip}
+
+h1. Writing a unit test for the example
+
+Writing an unit test for this example is quite simple. We need just to write a setup method to create and initialize the InitialContext, and then write our test methods
+
+{snippet:id=code|url=openejb3/examples/injection-of-ejbs/src/test/java/org/superbiz/injection/EjbDependencyTest.java|lang=java}
+
+h1.  Running
+
+Running the example is fairly simple.  In the "injection-of-ejbs" directory of the [examples zip|OPENEJB:Download], just run:
+
+{quote}
+$ mvn clean install
+{quote}
+
+Which should create output like the following.
+
+{noformat}
+-------------------------------------------------------
+ T E S T S
+-------------------------------------------------------
+Running org.superbiz.injection.EjbDependencyTest
+Apache OpenEJB 3.0    build: 20080408-04:13
+http://openejb.apache.org/
+INFO - openejb.home = /Users/dblevins/work/openejb-3.0/examples/injection-of-ejbs
+INFO - openejb.base = /Users/dblevins/work/openejb-3.0/examples/injection-of-ejbs
+INFO - Configuring Service(id=Default Security Service, type=SecurityService, provider-id=Default Security Service)
+INFO - Configuring Service(id=Default Transaction Manager, type=TransactionManager, provider-id=Default Transaction Manager)
+INFO - Configuring Service(id=Default JDK 1.3 ProxyFactory, type=ProxyFactory, provider-id=Default JDK 1.3 ProxyFactory)
+INFO - Found EjbModule in classpath: /Users/dblevins/work/openejb-3.0/examples/injection-of-ejbs/target/classes
+INFO - Configuring app: /Users/dblevins/work/openejb-3.0/examples/injection-of-ejbs/target/classes
+INFO - Configuring Service(id=Default Stateless Container, type=Container, provider-id=Default Stateless Container)
+INFO - Auto-creating a container for bean DataReaderImpl: Container(type=STATELESS, id=Default Stateless Container)
+INFO - Loaded Module: /Users/dblevins/work/openejb-3.0/examples/injection-of-ejbs/target/classes
+INFO - Assembling app: /Users/dblevins/work/openejb-3.0/examples/injection-of-ejbs/target/classes
+INFO - Jndi(name=DataReaderImplLocal) --> Ejb(deployment-id=DataReaderImpl)
+INFO - Jndi(name=DataReaderImplRemote) --> Ejb(deployment-id=DataReaderImpl)
+INFO - Jndi(name=DataStoreImplLocal) --> Ejb(deployment-id=DataStoreImpl)
+INFO - Jndi(name=DataStoreImplRemote) --> Ejb(deployment-id=DataStoreImpl)
+INFO - Created Ejb(deployment-id=DataReaderImpl, ejb-name=DataReaderImpl, container=Default Stateless Container)
+INFO - Created Ejb(deployment-id=DataStoreImpl, ejb-name=DataStoreImpl, container=Default Stateless Container)
+INFO - Deployed Application(path=/Users/dblevins/work/openejb-3.0/examples/injection-of-ejbs/target/classes)
+Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.705 sec
+
+Results :
+
+Tests run: 2, Failures: 0, Errors: 0, Skipped: 0
+{noformat}
+
+

Added: websites/staging/openejb/trunk/content/injection-of-other-ejbs-example.html
==============================================================================
--- websites/staging/openejb/trunk/content/injection-of-other-ejbs-example.html (added)
+++ websites/staging/openejb/trunk/content/injection-of-other-ejbs-example.html Sun Jul 10 05:37:04 2011
@@ -0,0 +1,254 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html lang="en">
+  <head>
+    <meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
+    <title>Injection of other EJBs Example</title>
+    <link rel="stylesheet" type="text/css" media="screen" href="http://incubator.apache.org/lucy/css/lucy.css">
+  </head>
+
+  <body>
+
+    <div id="lucy-rigid_wrapper">
+
+      <div id="lucy-top" class="container_16 lucy-white_box_3d">
+
+        <div id="lucy-logo_box" class="grid_8">
+          <a href="/OpenEJB/"><img src="http://openejb.apache.org/images/logo_openejb.gif" alt="Apache OpenEJB™"></a>
+        </div> <!-- lucy-logo_box -->
+
+        <div #id="lucy-top_nav_box" class="grid_8">
+          <div id="lucy-top_nav_bar" class="container_8">
+            <ul>
+              <li><a href="http://www.apache.org/" title="Apache Software Foundation">Apache Software Foundation</a></li>
+              <li><a href="http://www.apache.org/licenses/" title="License">License</a></li>
+              <li><a href="http://www.apache.org/foundation/sponsorship.html" title="Sponsorship">Sponsorship</a></li>
+              <li><a href="http://www.apache.org/foundation/thanks.html" title="Thanks">Thanks</a></li>
+              <li><a href="http://www.apache.org/security/ " title="Security">Security</a></li>
+            </ul>
+          </div> <!-- lucy-top_nav_bar -->
+          <p><a href="http://www.apache.org/">Apache</a>&nbsp;&raquo&nbsp;<a href="/">Incubator</a></p>
+          <form name="lucy-top_search_box" id="lucy-top_search_box" action="http://www.google.com/search" method="get">
+            <input value="*.apache.org" name="sitesearch" type="hidden"/>
+            <input type="text" name="q" id="query" style="width:85%">
+            <input type="submit" id="submit" value="Search">
+          </form>
+        </div> <!-- lucy-top_nav_box -->
+
+        <div class="clear"></div>
+
+      </div> <!-- lucy-top -->
+
+      <div id="lucy-main_content" class="container_16 lucy-white_box_3d">
+
+        <div class="grid_4" id="lucy-left_nav_box">
+          <h6>About</h6>
+            <ul>
+              <li><a href="/lucy/">Welcome</a></li>
+              <li><a href="/lucy/faq.html">FAQ</a></li>
+              <li><a href="/lucy/people.html">People</a></li>
+            </ul>
+          <h6>Resources</h6>
+            <ul>
+              <li><a href="/lucy/download.html">Download</a></li>
+              <li><a href="/lucy/mailing_lists.html">Mailing Lists</a></li>
+              <li><a href="/lucy/docs/perl/">Documentation</a></li>
+              <li><a href="http://wiki.apache.org/lucy/">Wiki</a></li>
+              <li><a href="https://issues.apache.org/jira/browse/LUCY">Issue Tracker</a></li>
+              <li><a href="/lucy/version_control.html">Version Control</a></li>
+            </ul>
+          <h6>Related Projects</h6>
+            <ul>
+              <li><a href="http://lucene.apache.org/java/">Lucene</a></li>
+              <li><a href="http://lucene.apache.org/solr/">Solr</a></li>
+              <li><a href="http://incubator.apache.org/lucene.net/">Lucene.NET</a></li>
+              <li><a href="http://lucene.apache.org/pylucene/">PyLucene</a></li>
+              <li><a href="http://lucene.apache.org/openrelevance/">Open Relevance</a></li>
+            </ul>
+        </div> <!-- lucy-left_nav_box -->
+
+        <div id="lucy-main_content_box" class="grid_9">
+          <p><a name="InjectionofotherEJBsExample-Overview"></a></p>
+
+<h1>Overview</h1>
+
+<p>This example shows how to use the <em>@EJB</em> annotation in a bean class to
+refer to other beans.</p>
+
+<p>This functionality is often referred as dependency injection, and has been
+introduced in Java EE 5.</p>
+
+<p>In this particular example, we will create two session stateless beans:</p>
+
+<ul>
+<li>DataStore session bean</li>
+<li>DataReader session bean</li>
+</ul>
+
+<p>The DataReader bean uses the DataStore to retrieve some informations, and
+we will see how we can, inside the DataReader bean, get a reference to the
+DataStore bean using the @EJB annotation, thus avoiding the use of the JNDI
+API.</p>
+
+<p><em>The source for this example is the "injection-of-ejbs" directory located
+in the <a href="openejb:download.html">openejb-examples.zip</a>
+ available on the download page.</em></p>
+
+<p><a name="InjectionofotherEJBsExample-TheCode"></a></p>
+
+<h1>The Code</h1>
+
+<p>In this example we develop two simple session stateless beans (DataReader
+and DataStore), and show how we can use the @EJB annotation in one of these
+beans to get the reference to the other session bean</p>
+
+<p><a name="InjectionofotherEJBsExample-DataStoresessionbean"></a></p>
+
+<h2>DataStore session bean</h2>
+
+<p><a name="InjectionofotherEJBsExample-Bean"></a></p>
+
+<h3>Bean</h3>
+
+<p>{snippet:id=code|url=openejb3/examples/injection-of-ejbs/src/main/java/org/superbiz/injection/DataStoreImpl.java|lang=java}</p>
+
+<p><a name="InjectionofotherEJBsExample-Localbusinessinterface"></a></p>
+
+<h3>Local business interface</h3>
+
+<p>{snippet:id=code|url=openejb3/examples/injection-of-ejbs/src/main/java/org/superbiz/injection/DataStoreLocal.java|lang=java}</p>
+
+<p><a name="InjectionofotherEJBsExample-Remotebusinessinterface"></a></p>
+
+<h3>Remote business interface</h3>
+
+<p>{snippet:id=code|url=openejb3/examples/injection-of-ejbs/src/main/java/org/superbiz/injection/DataStoreRemote.java|lang=java}</p>
+
+<p><a name="InjectionofotherEJBsExample-DataReadersessionbean"></a></p>
+
+<h2>DataReader session bean</h2>
+
+<p><a name="InjectionofotherEJBsExample-Bean"></a></p>
+
+<h3>Bean</h3>
+
+<p>{snippet:id=code|url=openejb3/examples/injection-of-ejbs/src/main/java/org/superbiz/injection/DataReaderImpl.java|lang=java}</p>
+
+<p>Note the usage of the <em>@EJB</em> annotation on the DataStoreRemote and
+DataStoreLocal fields.  This is the minimum required for EJB ref
+resolution.  If you have two beans that implement the same business
+interfaces, you'll want to the <em>beanName</em> attribute as follows:</p>
+
+<pre><code>@EJB(beanName = "DataStoreImpl") 
+private DataStoreRemote dataStoreRemote;
+
+@EJB(beanName = "DataStoreImpl") 
+private DataStoreLocal dataStoreLocal;
+</code></pre>
+
+<p><a name="InjectionofotherEJBsExample-Localbusinessinterface"></a></p>
+
+<h3>Local business interface</h3>
+
+<p>{snippet:id=code|url=openejb3/examples/injection-of-ejbs/src/main/java/org/superbiz/injection/DataReaderLocal.java|lang=java}</p>
+
+<p>(The remote business interface is not shown for the sake of brevity).</p>
+
+<p>{tip:title=@EJB annotation}
+Several components in Java EE can use the @EJB annotation, such as:
+  * Servlets
+  * ServletContextListeners
+  * Servlet Filters
+  * JSF managed beans
+  * EJB interceptors
+  * JAX-WS service endpoints
+{tip}</p>
+
+<p><a name="InjectionofotherEJBsExample-Writingaunittestfortheexample"></a></p>
+
+<h1>Writing a unit test for the example</h1>
+
+<p>Writing an unit test for this example is quite simple. We need just to
+write a setup method to create and initialize the InitialContext, and then
+write our test methods</p>
+
+<p>{snippet:id=code|url=openejb3/examples/injection-of-ejbs/src/test/java/org/superbiz/injection/EjbDependencyTest.java|lang=java}</p>
+
+<p><a name="InjectionofotherEJBsExample-Running"></a></p>
+
+<h1>Running</h1>
+
+<p>Running the example is fairly simple.  In the "injection-of-ejbs" directory
+of the <a href="openejb:download.html">examples zip</a>
+, just run:</p>
+
+<p>{quote}
+$ mvn clean install
+{quote}</p>
+
+<p>Which should create output like the following.</p>
+
+<pre><code>-------------------------------------------------------
+ T E S T S
+-------------------------------------------------------
+Running org.superbiz.injection.EjbDependencyTest
+Apache OpenEJB 3.0    build: 20080408-04:13
+http://openejb.apache.org/
+INFO - openejb.home =
+</code></pre>
+
+<p>/Users/dblevins/work/openejb-3.0/examples/injection-of-ejbs
+    INFO - openejb.base =
+/Users/dblevins/work/openejb-3.0/examples/injection-of-ejbs
+    INFO - Configuring Service(id=Default Security Service,
+type=SecurityService, provider-id=Default Security Service)
+    INFO - Configuring Service(id=Default Transaction Manager,
+type=TransactionManager, provider-id=Default Transaction Manager)
+    INFO - Configuring Service(id=Default JDK 1.3 ProxyFactory,
+type=ProxyFactory, provider-id=Default JDK 1.3 ProxyFactory)
+    INFO - Found EjbModule in classpath:
+/Users/dblevins/work/openejb-3.0/examples/injection-of-ejbs/target/classes
+    INFO - Configuring app:
+/Users/dblevins/work/openejb-3.0/examples/injection-of-ejbs/target/classes
+    INFO - Configuring Service(id=Default Stateless Container, type=Container,
+provider-id=Default Stateless Container)
+    INFO - Auto-creating a container for bean DataReaderImpl:
+Container(type=STATELESS, id=Default Stateless Container)
+    INFO - Loaded Module:
+/Users/dblevins/work/openejb-3.0/examples/injection-of-ejbs/target/classes
+    INFO - Assembling app:
+/Users/dblevins/work/openejb-3.0/examples/injection-of-ejbs/target/classes
+    INFO - Jndi(name=DataReaderImplLocal) --> Ejb(deployment-id=DataReaderImpl)
+    INFO - Jndi(name=DataReaderImplRemote) -->
+Ejb(deployment-id=DataReaderImpl)
+    INFO - Jndi(name=DataStoreImplLocal) --> Ejb(deployment-id=DataStoreImpl)
+    INFO - Jndi(name=DataStoreImplRemote) --> Ejb(deployment-id=DataStoreImpl)
+    INFO - Created Ejb(deployment-id=DataReaderImpl, ejb-name=DataReaderImpl,
+container=Default Stateless Container)
+    INFO - Created Ejb(deployment-id=DataStoreImpl, ejb-name=DataStoreImpl,
+container=Default Stateless Container)
+    INFO - Deployed
+Application(path=/Users/dblevins/work/openejb-3.0/examples/injection-of-ejbs/target/classes)
+    Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.705 sec</p>
+
+<pre><code>Results :
+
+Tests run: 2, Failures: 0, Errors: 0, Skipped: 0
+</code></pre>
+
+        </div> <!-- lucy-main_content_box --> 
+        <div class="clear"></div>
+
+      </div> <!-- lucy-main_content -->
+
+      <div id="lucy-copyright" class="container_16">
+        <p>Copyright &#169; 2010-2011 The Apache Software Foundation, Licensed under the 
+           <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a>.
+           <br/>
+          
+        </p>
+      </div> <!-- lucy-copyright -->
+
+    </div> <!-- lucy-rigid_wrapper -->
+
+  </body>
+</html>

Added: websites/staging/openejb/trunk/content/interceptor-example.cwiki
==============================================================================
    (empty)

Added: websites/staging/openejb/trunk/content/interceptor-example.html
==============================================================================
--- websites/staging/openejb/trunk/content/interceptor-example.html (added)
+++ websites/staging/openejb/trunk/content/interceptor-example.html Sun Jul 10 05:37:04 2011
@@ -0,0 +1,88 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html lang="en">
+  <head>
+    <meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
+    <title>Interceptor Example</title>
+    <link rel="stylesheet" type="text/css" media="screen" href="http://incubator.apache.org/lucy/css/lucy.css">
+  </head>
+
+  <body>
+
+    <div id="lucy-rigid_wrapper">
+
+      <div id="lucy-top" class="container_16 lucy-white_box_3d">
+
+        <div id="lucy-logo_box" class="grid_8">
+          <a href="/OpenEJB/"><img src="http://openejb.apache.org/images/logo_openejb.gif" alt="Apache OpenEJB™"></a>
+        </div> <!-- lucy-logo_box -->
+
+        <div #id="lucy-top_nav_box" class="grid_8">
+          <div id="lucy-top_nav_bar" class="container_8">
+            <ul>
+              <li><a href="http://www.apache.org/" title="Apache Software Foundation">Apache Software Foundation</a></li>
+              <li><a href="http://www.apache.org/licenses/" title="License">License</a></li>
+              <li><a href="http://www.apache.org/foundation/sponsorship.html" title="Sponsorship">Sponsorship</a></li>
+              <li><a href="http://www.apache.org/foundation/thanks.html" title="Thanks">Thanks</a></li>
+              <li><a href="http://www.apache.org/security/ " title="Security">Security</a></li>
+            </ul>
+          </div> <!-- lucy-top_nav_bar -->
+          <p><a href="http://www.apache.org/">Apache</a>&nbsp;&raquo&nbsp;<a href="/">Incubator</a></p>
+          <form name="lucy-top_search_box" id="lucy-top_search_box" action="http://www.google.com/search" method="get">
+            <input value="*.apache.org" name="sitesearch" type="hidden"/>
+            <input type="text" name="q" id="query" style="width:85%">
+            <input type="submit" id="submit" value="Search">
+          </form>
+        </div> <!-- lucy-top_nav_box -->
+
+        <div class="clear"></div>
+
+      </div> <!-- lucy-top -->
+
+      <div id="lucy-main_content" class="container_16 lucy-white_box_3d">
+
+        <div class="grid_4" id="lucy-left_nav_box">
+          <h6>About</h6>
+            <ul>
+              <li><a href="/lucy/">Welcome</a></li>
+              <li><a href="/lucy/faq.html">FAQ</a></li>
+              <li><a href="/lucy/people.html">People</a></li>
+            </ul>
+          <h6>Resources</h6>
+            <ul>
+              <li><a href="/lucy/download.html">Download</a></li>
+              <li><a href="/lucy/mailing_lists.html">Mailing Lists</a></li>
+              <li><a href="/lucy/docs/perl/">Documentation</a></li>
+              <li><a href="http://wiki.apache.org/lucy/">Wiki</a></li>
+              <li><a href="https://issues.apache.org/jira/browse/LUCY">Issue Tracker</a></li>
+              <li><a href="/lucy/version_control.html">Version Control</a></li>
+            </ul>
+          <h6>Related Projects</h6>
+            <ul>
+              <li><a href="http://lucene.apache.org/java/">Lucene</a></li>
+              <li><a href="http://lucene.apache.org/solr/">Solr</a></li>
+              <li><a href="http://incubator.apache.org/lucene.net/">Lucene.NET</a></li>
+              <li><a href="http://lucene.apache.org/pylucene/">PyLucene</a></li>
+              <li><a href="http://lucene.apache.org/openrelevance/">Open Relevance</a></li>
+            </ul>
+        </div> <!-- lucy-left_nav_box -->
+
+        <div id="lucy-main_content_box" class="grid_9">
+          
+
+        </div> <!-- lucy-main_content_box --> 
+        <div class="clear"></div>
+
+      </div> <!-- lucy-main_content -->
+
+      <div id="lucy-copyright" class="container_16">
+        <p>Copyright &#169; 2010-2011 The Apache Software Foundation, Licensed under the 
+           <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a>.
+           <br/>
+          
+        </p>
+      </div> <!-- lucy-copyright -->
+
+    </div> <!-- lucy-rigid_wrapper -->
+
+  </body>
+</html>

Added: websites/staging/openejb/trunk/content/introduction-to-the-command-line-tools.cwiki
==============================================================================
    (empty)

Added: websites/staging/openejb/trunk/content/introduction-to-the-command-line-tools.html
==============================================================================
--- websites/staging/openejb/trunk/content/introduction-to-the-command-line-tools.html (added)
+++ websites/staging/openejb/trunk/content/introduction-to-the-command-line-tools.html Sun Jul 10 05:37:04 2011
@@ -0,0 +1,88 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html lang="en">
+  <head>
+    <meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
+    <title>Introduction to the command line tools</title>
+    <link rel="stylesheet" type="text/css" media="screen" href="http://incubator.apache.org/lucy/css/lucy.css">
+  </head>
+
+  <body>
+
+    <div id="lucy-rigid_wrapper">
+
+      <div id="lucy-top" class="container_16 lucy-white_box_3d">
+
+        <div id="lucy-logo_box" class="grid_8">
+          <a href="/OpenEJB/"><img src="http://openejb.apache.org/images/logo_openejb.gif" alt="Apache OpenEJB™"></a>
+        </div> <!-- lucy-logo_box -->
+
+        <div #id="lucy-top_nav_box" class="grid_8">
+          <div id="lucy-top_nav_bar" class="container_8">
+            <ul>
+              <li><a href="http://www.apache.org/" title="Apache Software Foundation">Apache Software Foundation</a></li>
+              <li><a href="http://www.apache.org/licenses/" title="License">License</a></li>
+              <li><a href="http://www.apache.org/foundation/sponsorship.html" title="Sponsorship">Sponsorship</a></li>
+              <li><a href="http://www.apache.org/foundation/thanks.html" title="Thanks">Thanks</a></li>
+              <li><a href="http://www.apache.org/security/ " title="Security">Security</a></li>
+            </ul>
+          </div> <!-- lucy-top_nav_bar -->
+          <p><a href="http://www.apache.org/">Apache</a>&nbsp;&raquo&nbsp;<a href="/">Incubator</a></p>
+          <form name="lucy-top_search_box" id="lucy-top_search_box" action="http://www.google.com/search" method="get">
+            <input value="*.apache.org" name="sitesearch" type="hidden"/>
+            <input type="text" name="q" id="query" style="width:85%">
+            <input type="submit" id="submit" value="Search">
+          </form>
+        </div> <!-- lucy-top_nav_box -->
+
+        <div class="clear"></div>
+
+      </div> <!-- lucy-top -->
+
+      <div id="lucy-main_content" class="container_16 lucy-white_box_3d">
+
+        <div class="grid_4" id="lucy-left_nav_box">
+          <h6>About</h6>
+            <ul>
+              <li><a href="/lucy/">Welcome</a></li>
+              <li><a href="/lucy/faq.html">FAQ</a></li>
+              <li><a href="/lucy/people.html">People</a></li>
+            </ul>
+          <h6>Resources</h6>
+            <ul>
+              <li><a href="/lucy/download.html">Download</a></li>
+              <li><a href="/lucy/mailing_lists.html">Mailing Lists</a></li>
+              <li><a href="/lucy/docs/perl/">Documentation</a></li>
+              <li><a href="http://wiki.apache.org/lucy/">Wiki</a></li>
+              <li><a href="https://issues.apache.org/jira/browse/LUCY">Issue Tracker</a></li>
+              <li><a href="/lucy/version_control.html">Version Control</a></li>
+            </ul>
+          <h6>Related Projects</h6>
+            <ul>
+              <li><a href="http://lucene.apache.org/java/">Lucene</a></li>
+              <li><a href="http://lucene.apache.org/solr/">Solr</a></li>
+              <li><a href="http://incubator.apache.org/lucene.net/">Lucene.NET</a></li>
+              <li><a href="http://lucene.apache.org/pylucene/">PyLucene</a></li>
+              <li><a href="http://lucene.apache.org/openrelevance/">Open Relevance</a></li>
+            </ul>
+        </div> <!-- lucy-left_nav_box -->
+
+        <div id="lucy-main_content_box" class="grid_9">
+          
+
+        </div> <!-- lucy-main_content_box --> 
+        <div class="clear"></div>
+
+      </div> <!-- lucy-main_content -->
+
+      <div id="lucy-copyright" class="container_16">
+        <p>Copyright &#169; 2010-2011 The Apache Software Foundation, Licensed under the 
+           <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a>.
+           <br/>
+          
+        </p>
+      </div> <!-- lucy-copyright -->
+
+    </div> <!-- lucy-rigid_wrapper -->
+
+  </body>
+</html>

Added: websites/staging/openejb/trunk/content/java-ee-refs.cwiki
==============================================================================
    (empty)

Added: websites/staging/openejb/trunk/content/java-ee-refs.html
==============================================================================
--- websites/staging/openejb/trunk/content/java-ee-refs.html (added)
+++ websites/staging/openejb/trunk/content/java-ee-refs.html Sun Jul 10 05:37:04 2011
@@ -0,0 +1,88 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html lang="en">
+  <head>
+    <meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
+    <title>Java EE Refs</title>
+    <link rel="stylesheet" type="text/css" media="screen" href="http://incubator.apache.org/lucy/css/lucy.css">
+  </head>
+
+  <body>
+
+    <div id="lucy-rigid_wrapper">
+
+      <div id="lucy-top" class="container_16 lucy-white_box_3d">
+
+        <div id="lucy-logo_box" class="grid_8">
+          <a href="/OpenEJB/"><img src="http://openejb.apache.org/images/logo_openejb.gif" alt="Apache OpenEJB™"></a>
+        </div> <!-- lucy-logo_box -->
+
+        <div #id="lucy-top_nav_box" class="grid_8">
+          <div id="lucy-top_nav_bar" class="container_8">
+            <ul>
+              <li><a href="http://www.apache.org/" title="Apache Software Foundation">Apache Software Foundation</a></li>
+              <li><a href="http://www.apache.org/licenses/" title="License">License</a></li>
+              <li><a href="http://www.apache.org/foundation/sponsorship.html" title="Sponsorship">Sponsorship</a></li>
+              <li><a href="http://www.apache.org/foundation/thanks.html" title="Thanks">Thanks</a></li>
+              <li><a href="http://www.apache.org/security/ " title="Security">Security</a></li>
+            </ul>
+          </div> <!-- lucy-top_nav_bar -->
+          <p><a href="http://www.apache.org/">Apache</a>&nbsp;&raquo&nbsp;<a href="/">Incubator</a></p>
+          <form name="lucy-top_search_box" id="lucy-top_search_box" action="http://www.google.com/search" method="get">
+            <input value="*.apache.org" name="sitesearch" type="hidden"/>
+            <input type="text" name="q" id="query" style="width:85%">
+            <input type="submit" id="submit" value="Search">
+          </form>
+        </div> <!-- lucy-top_nav_box -->
+
+        <div class="clear"></div>
+
+      </div> <!-- lucy-top -->
+
+      <div id="lucy-main_content" class="container_16 lucy-white_box_3d">
+
+        <div class="grid_4" id="lucy-left_nav_box">
+          <h6>About</h6>
+            <ul>
+              <li><a href="/lucy/">Welcome</a></li>
+              <li><a href="/lucy/faq.html">FAQ</a></li>
+              <li><a href="/lucy/people.html">People</a></li>
+            </ul>
+          <h6>Resources</h6>
+            <ul>
+              <li><a href="/lucy/download.html">Download</a></li>
+              <li><a href="/lucy/mailing_lists.html">Mailing Lists</a></li>
+              <li><a href="/lucy/docs/perl/">Documentation</a></li>
+              <li><a href="http://wiki.apache.org/lucy/">Wiki</a></li>
+              <li><a href="https://issues.apache.org/jira/browse/LUCY">Issue Tracker</a></li>
+              <li><a href="/lucy/version_control.html">Version Control</a></li>
+            </ul>
+          <h6>Related Projects</h6>
+            <ul>
+              <li><a href="http://lucene.apache.org/java/">Lucene</a></li>
+              <li><a href="http://lucene.apache.org/solr/">Solr</a></li>
+              <li><a href="http://incubator.apache.org/lucene.net/">Lucene.NET</a></li>
+              <li><a href="http://lucene.apache.org/pylucene/">PyLucene</a></li>
+              <li><a href="http://lucene.apache.org/openrelevance/">Open Relevance</a></li>
+            </ul>
+        </div> <!-- lucy-left_nav_box -->
+
+        <div id="lucy-main_content_box" class="grid_9">
+          
+
+        </div> <!-- lucy-main_content_box --> 
+        <div class="clear"></div>
+
+      </div> <!-- lucy-main_content -->
+
+      <div id="lucy-copyright" class="container_16">
+        <p>Copyright &#169; 2010-2011 The Apache Software Foundation, Licensed under the 
+           <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a>.
+           <br/>
+          
+        </p>
+      </div> <!-- lucy-copyright -->
+
+    </div> <!-- lucy-rigid_wrapper -->
+
+  </body>
+</html>

Added: websites/staging/openejb/trunk/content/javaagent-with-maven-surefire.cwiki
==============================================================================
--- websites/staging/openejb/trunk/content/javaagent-with-maven-surefire.cwiki (added)
+++ websites/staging/openejb/trunk/content/javaagent-with-maven-surefire.cwiki Sun Jul 10 05:37:04 2011
@@ -0,0 +1,47 @@
+h2.  Maven2
+
+In maven2 you can enable the javaagent for your tests by adding this to your pom.xml file:
+
+{code:xml}
+<build>
+  <plugins>
+    <!-- this configures the surefire plugin to run your tests with the javaagent enabled -->
+    <plugin>
+      <groupId>org.apache.maven.plugins</groupId>
+      <artifactId>maven-surefire-plugin</artifactId>
+      <configuration>
+        <forkMode>pertest</forkMode>
+        <argLine>-javaagent:${basedir}/target/openejb-javaagent-3.0.jar</argLine>
+        <workingDirectory>${basedir}/target</workingDirectory>
+      </configuration>
+    </plugin>
+
+    <!-- this tells maven to copy the openejb-javaagent jar into your target/ directory -->
+    <!-- where surefire can see it -->
+    <plugin>
+      <groupId>org.apache.maven.plugins</groupId>
+      <artifactId>maven-dependency-plugin</artifactId>
+      <executions>
+        <execution>
+          <id>copy</id>
+          <phase>process-resources</phase>
+          <goals>
+            <goal>copy</goal>
+          </goals>
+          <configuration>
+            <artifactItems>
+              <artifactItem>
+                <groupId>org.apache.openejb</groupId>
+                <artifactId>openejb-javaagent</artifactId>
+                <version>3.0</version>
+                <outputDirectory>${project.build.directory}</outputDirectory>
+              </artifactItem>
+            </artifactItems>
+          </configuration>
+        </execution>
+      </executions>
+    </plugin>
+
+  </plugins>
+</build>
+{code}
\ No newline at end of file

Added: websites/staging/openejb/trunk/content/javaagent-with-maven-surefire.html
==============================================================================
--- websites/staging/openejb/trunk/content/javaagent-with-maven-surefire.html (added)
+++ websites/staging/openejb/trunk/content/javaagent-with-maven-surefire.html Sun Jul 10 05:37:04 2011
@@ -0,0 +1,144 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html lang="en">
+  <head>
+    <meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
+    <title>JavaAgent with Maven Surefire</title>
+    <link rel="stylesheet" type="text/css" media="screen" href="http://incubator.apache.org/lucy/css/lucy.css">
+  </head>
+
+  <body>
+
+    <div id="lucy-rigid_wrapper">
+
+      <div id="lucy-top" class="container_16 lucy-white_box_3d">
+
+        <div id="lucy-logo_box" class="grid_8">
+          <a href="/OpenEJB/"><img src="http://openejb.apache.org/images/logo_openejb.gif" alt="Apache OpenEJB™"></a>
+        </div> <!-- lucy-logo_box -->
+
+        <div #id="lucy-top_nav_box" class="grid_8">
+          <div id="lucy-top_nav_bar" class="container_8">
+            <ul>
+              <li><a href="http://www.apache.org/" title="Apache Software Foundation">Apache Software Foundation</a></li>
+              <li><a href="http://www.apache.org/licenses/" title="License">License</a></li>
+              <li><a href="http://www.apache.org/foundation/sponsorship.html" title="Sponsorship">Sponsorship</a></li>
+              <li><a href="http://www.apache.org/foundation/thanks.html" title="Thanks">Thanks</a></li>
+              <li><a href="http://www.apache.org/security/ " title="Security">Security</a></li>
+            </ul>
+          </div> <!-- lucy-top_nav_bar -->
+          <p><a href="http://www.apache.org/">Apache</a>&nbsp;&raquo&nbsp;<a href="/">Incubator</a></p>
+          <form name="lucy-top_search_box" id="lucy-top_search_box" action="http://www.google.com/search" method="get">
+            <input value="*.apache.org" name="sitesearch" type="hidden"/>
+            <input type="text" name="q" id="query" style="width:85%">
+            <input type="submit" id="submit" value="Search">
+          </form>
+        </div> <!-- lucy-top_nav_box -->
+
+        <div class="clear"></div>
+
+      </div> <!-- lucy-top -->
+
+      <div id="lucy-main_content" class="container_16 lucy-white_box_3d">
+
+        <div class="grid_4" id="lucy-left_nav_box">
+          <h6>About</h6>
+            <ul>
+              <li><a href="/lucy/">Welcome</a></li>
+              <li><a href="/lucy/faq.html">FAQ</a></li>
+              <li><a href="/lucy/people.html">People</a></li>
+            </ul>
+          <h6>Resources</h6>
+            <ul>
+              <li><a href="/lucy/download.html">Download</a></li>
+              <li><a href="/lucy/mailing_lists.html">Mailing Lists</a></li>
+              <li><a href="/lucy/docs/perl/">Documentation</a></li>
+              <li><a href="http://wiki.apache.org/lucy/">Wiki</a></li>
+              <li><a href="https://issues.apache.org/jira/browse/LUCY">Issue Tracker</a></li>
+              <li><a href="/lucy/version_control.html">Version Control</a></li>
+            </ul>
+          <h6>Related Projects</h6>
+            <ul>
+              <li><a href="http://lucene.apache.org/java/">Lucene</a></li>
+              <li><a href="http://lucene.apache.org/solr/">Solr</a></li>
+              <li><a href="http://incubator.apache.org/lucene.net/">Lucene.NET</a></li>
+              <li><a href="http://lucene.apache.org/pylucene/">PyLucene</a></li>
+              <li><a href="http://lucene.apache.org/openrelevance/">Open Relevance</a></li>
+            </ul>
+        </div> <!-- lucy-left_nav_box -->
+
+        <div id="lucy-main_content_box" class="grid_9">
+          <p><a name="JavaAgentwithMavenSurefire-Maven2"></a></p>
+
+<h2>Maven2</h2>
+
+<p>In maven2 you can enable the javaagent for your tests by adding this to
+your pom.xml file:</p>
+
+<pre><code>&lt;build&gt;
+  &lt;plugins&gt;
+    &lt;!-- this configures the surefire plugin to run your tests with the
+</code></pre>
+
+<p>javaagent enabled -->
+        <plugin>
+          <groupId>org.apache.maven.plugins</groupId>
+          <artifactId>maven-surefire-plugin</artifactId>
+          <configuration>
+        <forkMode>pertest</forkMode></p>
+
+<p><argLine>-javaagent:${basedir}/target/openejb-javaagent-3.0.jar</argLine>
+        <workingDirectory>${basedir}/target</workingDirectory>
+          </configuration>
+        </plugin></p>
+
+<pre><code>    &lt;!-- this tells maven to copy the openejb-javaagent jar into your
+</code></pre>
+
+<p>target/ directory -->
+        <!-- where surefire can see it -->
+        <plugin>
+          <groupId>org.apache.maven.plugins</groupId>
+          <artifactId>maven-dependency-plugin</artifactId>
+          <executions>
+        <execution>
+          <id>copy</id>
+          <phase>process-resources</phase>
+          <goals>
+            <goal>copy</goal>
+          </goals>
+          <configuration>
+            <artifactItems>
+              <artifactItem>
+            <groupId>org.apache.openejb</groupId>
+            <artifactId>openejb-javaagent</artifactId>
+            <version>3.0</version></p>
+
+<p><outputDirectory>${project.build.directory}</outputDirectory>
+              </artifactItem>
+            </artifactItems>
+          </configuration>
+        </execution>
+          </executions>
+        </plugin></p>
+
+<pre><code>  &lt;/plugins&gt;
+&lt;/build&gt;
+</code></pre>
+
+        </div> <!-- lucy-main_content_box --> 
+        <div class="clear"></div>
+
+      </div> <!-- lucy-main_content -->
+
+      <div id="lucy-copyright" class="container_16">
+        <p>Copyright &#169; 2010-2011 The Apache Software Foundation, Licensed under the 
+           <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a>.
+           <br/>
+          
+        </p>
+      </div> <!-- lucy-copyright -->
+
+    </div> <!-- lucy-rigid_wrapper -->
+
+  </body>
+</html>

Added: websites/staging/openejb/trunk/content/javaagent.cwiki
==============================================================================
--- websites/staging/openejb/trunk/content/javaagent.cwiki (added)
+++ websites/staging/openejb/trunk/content/javaagent.cwiki Sun Jul 10 05:37:04 2011
@@ -0,0 +1,58 @@
+h1.  Adding a JavaAgent
+
+Adding a java agent is done via a vm parameter as follows:
+
+{panel}
+java -javaagent:openejb-javaagent-3.0-beta-2.jar _\[other params...]_
+{panel}
+
+{note:title=Need the JavaAgent?}
+The java agent is only required if using OpenJPA as your persistence provider or if using CMP.
+{note}
+h2.  Maven2
+
+In maven2 you can enable the javaagent for your tests by adding this to your pom.xml file:
+
+{code:xml}
+<build>
+  <plugins>
+    <!-- this configures the surefire plugin to run your tests with the javaagent enabled -->
+    <plugin>
+      <groupId>org.apache.maven.plugins</groupId>
+      <artifactId>maven-surefire-plugin</artifactId>
+      <configuration>
+        <forkMode>pertest</forkMode>
+        <argLine>-javaagent:${basedir}/target/openejb-javaagent-3.0-beta-2.jar</argLine>
+        <workingDirectory>${basedir}/target</workingDirectory>
+      </configuration>
+    </plugin>
+
+    <!-- this tells maven to copy the openejb-javaagent jar into your target/ directory -->
+    <!-- where surefire can see it -->
+    <plugin>
+      <groupId>org.apache.maven.plugins</groupId>
+      <artifactId>maven-dependency-plugin</artifactId>
+      <executions>
+        <execution>
+          <id>copy</id>
+          <phase>process-resources</phase>
+          <goals>
+            <goal>copy</goal>
+          </goals>
+          <configuration>
+            <artifactItems>
+              <artifactItem>
+                <groupId>org.apache.openejb</groupId>
+                <artifactId>openejb-javaagent</artifactId>
+                <version>3.0-beta-2</version>
+                <outputDirectory>${project.build.directory}</outputDirectory>
+              </artifactItem>
+            </artifactItems>
+          </configuration>
+        </execution>
+      </executions>
+    </plugin>
+
+  </plugins>
+</build>
+{code}
\ No newline at end of file