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 [17/19] - /websites/staging/openejb/trunk/content/

Added: websites/staging/openejb/trunk/content/testing-security-example.html
==============================================================================
--- websites/staging/openejb/trunk/content/testing-security-example.html (added)
+++ websites/staging/openejb/trunk/content/testing-security-example.html Sun Jul 10 05:37:04 2011
@@ -0,0 +1,215 @@
+<!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>Testing Security 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="TestingSecurityExample-Overview"></a></p>
+
+<h1>Overview</h1>
+
+<p>Builds upon the <a href="injection-of-entitymanager-example.html">Injection of EntityManager Example</a>
+ but adds the use of <em>@RolesAllowed</em> and <em>@PermitAll</em> in the @Stateful bean
+to restrict who can perform create, persist and remove operations on the
+EntityManager.  Shows a TestCase using the <em>@RunAs</em> annotation to execute
+and test the bean code as various users.</p>
+
+<p>In this example we restrict the ability to create Movie Entities to a
+<em>Manager</em> or an <em>Employee</em>.  Reads are open to anyone, logged in or not. 
+And delete operations are only allowed by a <em>Manager</em>.</p>
+
+<p>See the <a href="security-annotations.html">Security Annotations</a>
+ page for a full description of how the security annotations work.</p>
+
+<p><em>The source for this example is in the "testing-security" directory located
+in the <a href="openejb:download.html">openejb-examples.zip</a>
+ available on the download page.</em></p>
+
+<p><a name="TestingSecurityExample-TheCode"></a></p>
+
+<h1>The Code</h1>
+
+<p>Just as with the <a href="testing-transactions-example.html">Testing Transactions Example</a>
+ the magic of this unit test is in the <em>ManagerBean</em> and <em>EmployeeBean</em>
+@Stateless beans that we've tucked into our TestCase as inner classes. 
+These beans allow us to execute our test code as either a Manager or as an
+Employee and test that Movies @Stateful bean is setup to restrict and
+permit calls according to our intended design.</p>
+
+<p>{snippet:id=code|url=openejb3/examples/testing-security/src/main/java/org/superbiz/injection/secure/MoviesImpl.java|lang=java}</p>
+
+<p><a name="TestingSecurityExample-Writingaunittestfortheexample"></a></p>
+
+<h1>Writing a unit test for the example</h1>
+
+<p>{snippet:id=code|url=openejb3/examples/testing-security/src/test/java/org/superbiz/injection/secure/MovieTest.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="TestingSecurityExample-Running"></a></p>
+
+<h1>Running</h1>
+
+<p>Running the example is fairly simple.  In the "testing-security" 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.secure.MovieTest
+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/testing-security
+    INFO - openejb.base =
+/Users/dblevins/work/openejb-3.0/examples/testing-security
+    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/testing-security/target/classes
+    INFO - Found EjbModule in classpath:
+/Users/dblevins/work/openejb-3.0/examples/testing-security/target/test-classes
+    INFO - Configuring app:
+/Users/dblevins/work/openejb-3.0/examples/testing-security/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/testing-security/target/classes
+    INFO - Configuring app:
+/Users/dblevins/work/openejb-3.0/examples/testing-security/target/test-classes
+    INFO - Configuring Service(id=Default Stateless Container, type=Container,
+provider-id=Default Stateless Container)
+    INFO - Auto-creating a container for bean EmployeeBean:
+Container(type=STATELESS, id=Default Stateless Container)
+    INFO - Loaded Module:
+/Users/dblevins/work/openejb-3.0/examples/testing-security/target/test-classes
+    INFO - Assembling app:
+/Users/dblevins/work/openejb-3.0/examples/testing-security/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/testing-security/target/classes)
+    INFO - Assembling app:
+/Users/dblevins/work/openejb-3.0/examples/testing-security/target/test-classes
+    INFO - Jndi(name=EmployeeBeanLocal) --> Ejb(deployment-id=EmployeeBean)
+    INFO - Jndi(name=ManagerBeanLocal) --> Ejb(deployment-id=ManagerBean)
+    INFO - Created Ejb(deployment-id=EmployeeBean, ejb-name=EmployeeBean,
+container=Default Stateless Container)
+    INFO - Created Ejb(deployment-id=ManagerBean, ejb-name=ManagerBean,
+container=Default Stateless Container)
+    INFO - Deployed
+Application(path=/Users/dblevins/work/openejb-3.0/examples/testing-security/target/test-classes)
+    Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 2.109 sec</p>
+
+<pre><code>Results :
+
+Tests run: 3, 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/testing-transactions-example.cwiki
==============================================================================
--- websites/staging/openejb/trunk/content/testing-transactions-example.cwiki (added)
+++ websites/staging/openejb/trunk/content/testing-transactions-example.cwiki Sun Jul 10 05:37:04 2011
@@ -0,0 +1,79 @@
+h1. Overview
+
+Testing an EntityManager that uses the default, PersistenceContextType.TRANSACTION, can be challenging due to Entities detaching around transaction boundaries.  If you were to take the [Injection of EntityManager Example] which uses an EXTENDED persistence context and switch it to a TRANSACTION persistence context making no other changes, you'd find that the test would fail.  This would be because of the detach.
+
+Generally, when using an EntityManager with TRANSACTION persistence context, your transaction should surround your use of the Entities themselves, not just the use of the EntityManager.  Using a [transaction in your unit test|Unit Testing Transactions] can make testing these scenarios possible.
+
+This example shows use of @PersistenceContext to have an *EntityManager* with an *TRANSACTION* persistence context injected into a *@Stateful* bean using the *@TransactionAttribute* annotation and a TestCase that runs test code in a JTA *Transaction*.  An EJB 3 @Entity bean is used with the EntityManager to create, persist and merge data to a database.
+
+_The source for this example is in the "testing-transactions" directory located in the [openejb-examples.zip|OPENEJB:Download] available on the download page._
+
+h1. The Code
+
+{snippet:id=code|url=openejb3/examples/testing-transactions/src/main/java/org/superbiz/injection/tx/MoviesImpl.java|lang=java}
+
+In the above bean code we see that the transaction attribute for all method of the bean has been changed the default, which is TransactionAttributeType.REQUIRED, to TransactionAttributeType.MANDATORY.  The MANDATORY transaction attribute is similar to REQUIRED in that the bean method is guaranteed to be executed in a transaction, but with the added restriction that if a transaction isn't started by the client before calling the method, an exception will be thrown.  
+
+The benefit of MANDATORY in this example is that it is impossible for the client to get detached Entity issues.  The client either has a transaction and therefore gets Entities which are still attached and persistent, or the client would get an exception stating that the use of a transaction is mandatory.
+
+See the [Transaction Annotations] page for a full description of the available transaction attributes.
+
+h1. Writing a unit test for the example
+
+The magic in the TestCase below is the *TransactionBean* @Stateless bean which is tucked away as an inner class of the TestCase itself.  With this bean, we can call our test code within the scope of a container controlled transaction.  This allows our test code to use the EntityManager and the Entities in the scope of a transaction, avoid any detach issues and satisfying the TransactionAttributeType.MANDATORY requirement of our MoviesImpl @Stateful bean.
+
+{snippet:id=code|url=openejb3/examples/testing-transactions/src/test/java/org/superbiz/injection/tx/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 "testing-transactions" 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.tx.MoviesTest
+Apache OpenEJB 3.0    build: 20080408-04:13
+http://openejb.apache.org/
+INFO - openejb.home = /Users/dblevins/work/openejb-3.0/examples/testing-transactions
+INFO - openejb.base = /Users/dblevins/work/openejb-3.0/examples/testing-transactions
+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/testing-transactions/target/test-classes
+INFO - Found EjbModule in classpath: /Users/dblevins/work/openejb-3.0/examples/testing-transactions/target/classes
+INFO - Configuring app: /Users/dblevins/work/openejb-3.0/examples/testing-transactions/target/test-classes
+INFO - Configuring Service(id=Default Stateless Container, type=Container, provider-id=Default Stateless Container)
+INFO - Auto-creating a container for bean TransactionBean: Container(type=STATELESS, id=Default Stateless Container)
+INFO - Loaded Module: /Users/dblevins/work/openejb-3.0/examples/testing-transactions/target/test-classes
+INFO - Configuring app: /Users/dblevins/work/openejb-3.0/examples/testing-transactions/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/testing-transactions/target/classes
+INFO - Assembling app: /Users/dblevins/work/openejb-3.0/examples/testing-transactions/target/test-classes
+INFO - Jndi(name=TransactionBeanLocal) --> Ejb(deployment-id=TransactionBean)
+INFO - Created Ejb(deployment-id=TransactionBean, ejb-name=TransactionBean, container=Default Stateless Container)
+INFO - Deployed Application(path=/Users/dblevins/work/openejb-3.0/examples/testing-transactions/target/test-classes)
+INFO - Assembling app: /Users/dblevins/work/openejb-3.0/examples/testing-transactions/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/testing-transactions/target/classes)
+Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 2.25 sec
+
+Results :
+
+Tests run: 2, Failures: 0, Errors: 0, Skipped: 0
+{noformat}
+

Added: websites/staging/openejb/trunk/content/testing-transactions-example.html
==============================================================================
--- websites/staging/openejb/trunk/content/testing-transactions-example.html (added)
+++ websites/staging/openejb/trunk/content/testing-transactions-example.html Sun Jul 10 05:37:04 2011
@@ -0,0 +1,236 @@
+<!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>Testing Transactions 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="TestingTransactionsExample-Overview"></a></p>
+
+<h1>Overview</h1>
+
+<p>Testing an EntityManager that uses the default,
+PersistenceContextType.TRANSACTION, can be challenging due to Entities
+detaching around transaction boundaries.  If you were to take the <a href="injection-of-entitymanager-example.html">Injection of EntityManager Example</a>
+ which uses an EXTENDED persistence context and switch it to a TRANSACTION
+persistence context making no other changes, you'd find that the test would
+fail.  This would be because of the detach.</p>
+
+<p>Generally, when using an EntityManager with TRANSACTION persistence
+context, your transaction should surround your use of the Entities
+themselves, not just the use of the EntityManager.  Using a <a href="unit-testing-transactions.html">transaction in your unit test</a>
+ can make testing these scenarios possible.</p>
+
+<p>This example shows use of @PersistenceContext to have an <em>EntityManager</em>
+with an <em>TRANSACTION</em> persistence context injected into a <em>@Stateful</em> bean
+using the <em>@TransactionAttribute</em> annotation and a TestCase that runs test
+code in a JTA <em>Transaction</em>.  An EJB 3 @Entity bean is used with the
+EntityManager to create, persist and merge data to a database.</p>
+
+<p><em>The source for this example is in the "testing-transactions" directory
+located in the <a href="openejb:download.html">openejb-examples.zip</a>
+ available on the download page.</em></p>
+
+<p><a name="TestingTransactionsExample-TheCode"></a></p>
+
+<h1>The Code</h1>
+
+<p>{snippet:id=code|url=openejb3/examples/testing-transactions/src/main/java/org/superbiz/injection/tx/MoviesImpl.java|lang=java}</p>
+
+<p>In the above bean code we see that the transaction attribute for all method
+of the bean has been changed the default, which is
+TransactionAttributeType.REQUIRED, to TransactionAttributeType.MANDATORY. 
+The MANDATORY transaction attribute is similar to REQUIRED in that the bean
+method is guaranteed to be executed in a transaction, but with the added
+restriction that if a transaction isn't started by the client before
+calling the method, an exception will be thrown.  </p>
+
+<p>The benefit of MANDATORY in this example is that it is impossible for the
+client to get detached Entity issues.  The client either has a transaction
+and therefore gets Entities which are still attached and persistent, or the
+client would get an exception stating that the use of a transaction is
+mandatory.</p>
+
+<p>See the <a href="transaction-annotations.html">Transaction Annotations</a>
+ page for a full description of the available transaction attributes.</p>
+
+<p><a name="TestingTransactionsExample-Writingaunittestfortheexample"></a></p>
+
+<h1>Writing a unit test for the example</h1>
+
+<p>The magic in the TestCase below is the <em>TransactionBean</em> @Stateless bean
+which is tucked away as an inner class of the TestCase itself.  With this
+bean, we can call our test code within the scope of a container controlled
+transaction.  This allows our test code to use the EntityManager and the
+Entities in the scope of a transaction, avoid any detach issues and
+satisfying the TransactionAttributeType.MANDATORY requirement of our
+MoviesImpl @Stateful bean.</p>
+
+<p>{snippet:id=code|url=openejb3/examples/testing-transactions/src/test/java/org/superbiz/injection/tx/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="TestingTransactionsExample-Running"></a></p>
+
+<h1>Running</h1>
+
+<p>Running the example is fairly simple.  In the "testing-transactions"
+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.tx.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/testing-transactions
+    INFO - openejb.base =
+/Users/dblevins/work/openejb-3.0/examples/testing-transactions
+    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/testing-transactions/target/test-classes
+    INFO - Found EjbModule in classpath:
+/Users/dblevins/work/openejb-3.0/examples/testing-transactions/target/classes
+    INFO - Configuring app:
+/Users/dblevins/work/openejb-3.0/examples/testing-transactions/target/test-classes
+    INFO - Configuring Service(id=Default Stateless Container, type=Container,
+provider-id=Default Stateless Container)
+    INFO - Auto-creating a container for bean TransactionBean:
+Container(type=STATELESS, id=Default Stateless Container)
+    INFO - Loaded Module:
+/Users/dblevins/work/openejb-3.0/examples/testing-transactions/target/test-classes
+    INFO - Configuring app:
+/Users/dblevins/work/openejb-3.0/examples/testing-transactions/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/testing-transactions/target/classes
+    INFO - Assembling app:
+/Users/dblevins/work/openejb-3.0/examples/testing-transactions/target/test-classes
+    INFO - Jndi(name=TransactionBeanLocal) -->
+Ejb(deployment-id=TransactionBean)
+    INFO - Created Ejb(deployment-id=TransactionBean, ejb-name=TransactionBean,
+container=Default Stateless Container)
+    INFO - Deployed
+Application(path=/Users/dblevins/work/openejb-3.0/examples/testing-transactions/target/test-classes)
+    INFO - Assembling app:
+/Users/dblevins/work/openejb-3.0/examples/testing-transactions/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/testing-transactions/target/classes)
+    Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 2.25 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/tomcat-detailed-instructions.cwiki
==============================================================================
--- websites/staging/openejb/trunk/content/tomcat-detailed-instructions.cwiki (added)
+++ websites/staging/openejb/trunk/content/tomcat-detailed-instructions.cwiki Sun Jul 10 05:37:04 2011
@@ -0,0 +1,259 @@
+{composition-setup}
+
+h1. {anchor:detailed instructions} Detailed Installation Instructions
+
+These instructions assume you have a standard Tomcat installation running on port 8080.  If you do not have an existing Tomcat installation, or want to start with a fresh installation for OpenEJB, the [Tomcat Installation] will show you how to setup and verify a Tomcat installation.
+
+h2. Add openejb.war to Tomcat
+
+The OpenEJB plugin for Tomcat is distributed as a standalone war file containing all of the necessary files and an installer Servlet.  The war can be obtained from the [OpenEJB download page|OPENEJB:download].  Once downloaded, simply copy the file into the Tomcat webapps directory.  
+
+{deck:id=Copy openejb.war}
+{card:label=Windows}{noformat:nopanel=true}
+C:\>copy openejb.war apache-tomcat-6.0.14\webapps\openejb.war
+        1 file(s) copied.
+
+C:\>dir apache-tomcat-6.0.14\webapps
+ Volume in drive C has no label.
+ Volume Serial Number is 0000-0000
+
+ Directory of C:\apache-tomcat-6.0.14\webapps
+
+09/20/2007  03:03 PM    <DIR>          .
+09/20/2007  03:03 PM    <DIR>          ..
+09/20/2007  03:02 PM    <DIR>          docs
+09/20/2007  03:01 PM    <DIR>          examples
+09/20/2007  03:01 PM    <DIR>          host-manager
+09/20/2007  03:03 PM    <DIR>          manager
+09/19/2007  09:31 AM        13,394,733 openejb.war
+09/20/2007  03:01 PM    <DIR>          ROOT
+               1 File(s)     13,394,733 bytes
+               7 Dir(s)   5,100,126,208 bytes free
+{noformat}{card}
+{card:label=Unix}{noformat:nopanel=true}
+$ cp openejb.war apache-tomcat-6.0.14/webapps/openejb.war
+
+$ ls apache-tomcat-6.0.14/webapps/
+ROOT/         docs/         examples/     host-manager/ manager/      openejb.war
+{noformat}{card}
+{deck}
+
+h2. Run Installer Servlet
+
+The OpenEJB Plugin for Tomcat contains an installer servlet which adds the OpenEJB listener and JavaAgent to the Tomcat installation.  To run the installer, you must first start Tomcat.
+
+{deck:id=Start Tomcat}
+{card:label=Windows}{noformat:nopanel=true}
+C:\>set JRE_HOME=C:\Program Files\Java\jre1.5.0_06
+
+C:\>cd apache-tomcat-6.0.14\bin
+
+C:\apache-tomcat-6.0.14\bin>startup.bat
+Using CATALINA_BASE:   C:\apache-tomcat-6.0.14
+Using CATALINA_HOME:   C:\apache-tomcat-6.0.14
+Using CATALINA_TMPDIR: C:\apache-tomcat-6.0.14\temp
+Using JRE_HOME:        C:\your\java\installation
+{noformat}{card}
+{card:label=Unix}{noformat:nopanel=true}
+$ cd apache-tomcat-6.0.14/bin
+
+apache-tomcat-6.0.14/bin$ chmod u+x *.sh
+
+apache-tomcat-6.0.14/bin$ ./startup.sh 
+Using CATALINA_BASE:   /your/tomcat/installation/apache-tomcat-6.0.14
+Using CATALINA_HOME:   /your/tomcat/installation/apache-tomcat-6.0.14
+Using CATALINA_TMPDIR: /your/tomcat/installation/apache-tomcat-6.0.14/temp
+Using JRE_HOME:        /your/java/installation
+{noformat}{card}
+{deck}
+
+*NOTE:* Your output will be different from the example above due to differences in installation locations.
+
+It is a good idea to wait a 5-60 seconds (depending on the speed of your computer) for Tomcat to fully start.  Once Tomcat is fully started, simply visit [http://localhost:8080/openejb/installer] and click the 'install' button to run the installer.  The installer should report that the installation was successful. If it didn't work click [OPENEJB:here|#problems].
+
+{warning}
+The installer servlet adds the OpenEJB JavaAgent declaration to the catalina.sh and catalina.bat files.  If you are using an IDE or some other mechanism to start Tomcat, you will need to [manually|Manual Installation#javaagent] add the JavaAgent declaration to the Java VM options of the launcher you are using. 
+{warning}
+
+h2. Restart Tomcat
+
+OpenEJB uses OpenJPA for persistence and OpenJPA currently requires a JavaAgent to function.  Unfortunately, there is no way to install a JavaAgent at runtime, so you will have to restart Tomcat to enable the JavaAgent.  Simply execute the shutdown command, wait 5-60 seconds (depending on the speed of your computer) for Tomcat to fully stop, and run the startup command to restart Tomcat.
+
+{deck:id=Start Tomcat}
+{card:label=Windows}{noformat:nopanel=true}
+C:\>cd apache-tomcat-6.0.14\bin
+
+C:\apache-tomcat-6.0.14\bin>shutdown.bat
+Using CATALINA_BASE:   C:\apache-tomcat-6.0.14
+Using CATALINA_HOME:   C:\apache-tomcat-6.0.14
+Using CATALINA_TMPDIR: C:\apache-tomcat-6.0.14\temp
+Using JRE_HOME:        C:\your\java\installation
+
+C:\apache-tomcat-6.0.14\bin>startup.bat
+Using CATALINA_BASE:   C:\apache-tomcat-6.0.14
+Using CATALINA_HOME:   C:\apache-tomcat-6.0.14
+Using CATALINA_TMPDIR: C:\apache-tomcat-6.0.14\temp
+Using JRE_HOME:        C:\your\java\installation
+{noformat}{card}
+{card:label=Unix}{noformat:nopanel=true}
+$ cd apache-tomcat-6.0.14/bin
+
+apache-tomcat-6.0.14/bin$ ./shutdown.sh 
+Using CATALINA_BASE:   /your/tomcat/installation/apache-tomcat-6.0.14
+Using CATALINA_HOME:   /your/tomcat/installation/apache-tomcat-6.0.14
+Using CATALINA_TMPDIR: /your/tomcat/installation/apache-tomcat-6.0.14/temp
+Using JRE_HOME:        /your/java/installation
+
+apache-tomcat-6.0.14/bin$ ./startup.sh 
+Using CATALINA_BASE:   /your/tomcat/installation/apache-tomcat-6.0.14
+Using CATALINA_HOME:   /your/tomcat/installation/apache-tomcat-6.0.14
+Using CATALINA_TMPDIR: /your/tomcat/installation/apache-tomcat-6.0.14/temp
+Using JRE_HOME:        /your/java/installation
+{noformat}{card}
+{deck}
+
+*NOTE:* Your output will be different from the example above due to differences in installation locations.
+
+Once Tomcat is fully started, simply visit [http://localhost:8080/openejb/installer] to verify the installation is complete.
+
+h1. Examples, Tutorials and Tests
+
+h2. ejb-examples.war
+
+Download the [ejb-examples.war|http://people.apache.org/~dain/openejb-temp/examples], copy it into the Tomcat webapps directory, and visit [http://localhost:8080/ejb-examples].
+
+h2. OpenEJB iTests
+
+OpenEJB uses a large test suite to verify the final server assembly, and you can use this to verify your OpenEJB installation.  Simply download the [openejb-itests.war and openejb-standalone-client.jar|http://people.apache.org/~dain/openejb-temp/itests] and copy it the war into the Tomcat webapps directory.  It will take a bit to load the application because it contains a huge number of EJBs.  Finally, run the test client executable jar.
+
+{deck:id=Start Tomcat}
+{card:label=Windows}{noformat:nopanel=true}
+C:\>java -jar openejb-itests-standalone-client.jar tomcat
+_________________________________________________
+|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|
+
+Running EJB compliance tests on HTTP/Tomcat Server
+_________________________________________________
+WARNING: No test suite configuration file specified, assuming system properties contain all 
+needed information.  To specify a test suite configuration file by setting its location using
+the system property "openejb.testsuite.properties" 
+test server = org.apache.openejb.test.TomcatRemoteTestServer
+entry = java.naming.provider.url:http://127.0.0.1:8080/openejb/ejb
+entry = java.naming.factory.initial:org.apache.openejb.client.RemoteInitialContextFactory
+.........................................
+.........................................
+.........................................
+.........................................
+.........................................
+.........................................
+.........................................
+.........................................
+.........................................
+.........................................
+.........................................
+.........................................
+.........................................
+.........................................
+.........................................
+.........................................
+.........................................
+.........................................
+.........................................
+.........................................
+.........................................
+............................
+Time: 20.644
+
+OK (889 tests)
+
+
+_________________________________________________
+CLIENT JNDI PROPERTIES
+java.naming.provider.url = http://127.0.0.1:8080/openejb/ejb
+java.naming.factory.initial = org.apache.openejb.client.RemoteInitialContextFactory
+_________________________________________________
+{noformat}{card}
+{card:label=Unix}{noformat:nopanel=true}
+$ java -jar openejb-itests-standalone-client.jar tomcat
+_________________________________________________
+|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|
+
+Running EJB compliance tests on HTTP/Tomcat Server
+_________________________________________________
+WARNING: No test suite configuration file specified, assuming system properties contain all
+needed information.  To specify a test suite configuration file by setting its location using
+the system property "openejb.testsuite.properties"
+test server = org.apache.openejb.test.TomcatRemoteTestServer
+entry = java.naming.provider.url:http://127.0.0.1:8080/openejb/ejb
+entry = java.naming.factory.initial:org.apache.openejb.client.RemoteInitialContextFactory
+.........................................
+.........................................
+.........................................
+.........................................
+.........................................
+.........................................
+.........................................
+.........................................
+.........................................
+.........................................
+.........................................
+.........................................
+.........................................
+.........................................
+.........................................
+.........................................
+.........................................
+.........................................
+.........................................
+.........................................
+.........................................
+............................
+Time: 12.186
+
+OK (889 tests)
+
+
+_________________________________________________
+CLIENT JNDI PROPERTIES
+java.naming.provider.url = http://127.0.0.1:8080/openejb/ejb
+java.naming.factory.initial = org.apache.openejb.client.RemoteInitialContextFactory
+_________________________________________________
+{noformat}{card}
+{deck}
+
+{tip:title=Failures}The tests should completely pass the first time they are run.  If you execute the test client a second time, 21 tests fail for some unknown reason.{tip}
+
+h1. {anchor:problems} Problems?
+
+h2. HTTP Status 403 
+
+Did you get a "HTTP Status 403" error page containing the description "Access to the specified resource () has been forbidden." when visiting [http://localhost:8080/openejb]?
+
+The openejb.war is protected by a Tomcat valve that restricts access to the application to the computer on which Tomcat is running.  If your browser is running on the same computer as Tomcat, try accessing OpenEJB using this link instead [http://127.0.0.1:8080/openejb].
+
+If you want to access the openejb.war from another computer, you will need to either remove the valve, or modify the IP list in the valve declaration.  The easiest way to remove the valve it to simply delete the webapps/openejb/META-INF/context.xml file and and the webapps/openejb.war file *while Tomcat is stopped*.  The openejb.war file must be removed because some versions of Tomcat will use the context.xml file packed in the openejb.war file regardless of what is in the unpacked directory.
+
+h2. Other Issues
+
+If you are having problems with the installation, please send a message to the OpenEJB users [mailing list|OPENEJB:mailing lists] containing any error message(s) and the following information:
+
+* OpenEJB Version
+* Tomcat Version
+* Java Version (execute java -version)
+* Operating System Type and Version
+
+
+h1. Limitations
+
+ *Tomcat 6.x* - Currently, only Tomcat 6.x is supported due to API difference between 5.5.x and 6.x.  It is expected that 5.5 will be supported in the future, but there are no plans to support 5.0.x due to the lack of annotation support in 5.0.x.
+
+ *Security* - Unfortunately, at this time security with Tomcat/OpenEJB is not integrated, but is being worked on.
+
+ *EAR Files* - The integration only supports war (and collapsed-ear) files.  EAR, EJB Jar, and RAR files will be supported in a future release.
+
+ *JavaAgent* - OpenEJB uses OpenJPA to provide JPA and CMP persistence, and OpenJPA currently requires a JavaAgent to function properly.  This requirement is something that the OpenJPA project is working on removing.  Once removed, the OpenEJB plugin for Tomcat will no longer need to modify the startup shell scripts and you will not need to restart Tomcat after the OpenEJB installation.
+
+h1. Misc
+
+This document is a starting point for using OpenEJB in Tomcat and will evolve based on user contributions. If you wish to contribute to this document, feel very welcome to click the 'Edit' link in the upper right and make changes and add new HOWTO's and other docs.  
+

Added: websites/staging/openejb/trunk/content/tomcat-detailed-instructions.html
==============================================================================
--- websites/staging/openejb/trunk/content/tomcat-detailed-instructions.html (added)
+++ websites/staging/openejb/trunk/content/tomcat-detailed-instructions.html Sun Jul 10 05:37:04 2011
@@ -0,0 +1,454 @@
+<!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>Tomcat Detailed Instructions</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>{composition-setup}</p>
+
+<p><a name="TomcatDetailedInstructions-{anchor:detailedinstructions}DetailedInstallationInstructions"></a></p>
+
+<h1>{anchor:detailed instructions} Detailed Installation Instructions</h1>
+
+<p>These instructions assume you have a standard Tomcat installation running
+on port 8080.  If you do not have an existing Tomcat installation, or want
+to start with a fresh installation for OpenEJB, the <a href="tomcat-installation.html">Tomcat Installation</a>
+ will show you how to setup and verify a Tomcat installation.</p>
+
+<p><a name="TomcatDetailedInstructions-Addopenejb.wartoTomcat"></a></p>
+
+<h2>Add openejb.war to Tomcat</h2>
+
+<p>The OpenEJB plugin for Tomcat is distributed as a standalone war file
+containing all of the necessary files and an installer Servlet.  The war
+can be obtained from the <a href="openejb:download.html">OpenEJB download page</a>
+.  Once downloaded, simply copy the file into the Tomcat webapps directory. </p>
+
+<p>{deck:id=Copy openejb.war}
+{card:label=Windows}{noformat:nopanel=true}
+C:>copy openejb.war apache-tomcat-6.0.14\webapps\openejb.war
+    1 file(s) copied.</p>
+
+<p>C:>dir apache-tomcat-6.0.14\webapps
+ Volume in drive C has no label.
+ Volume Serial Number is 0000-0000</p>
+
+<p>Directory of C:\apache-tomcat-6.0.14\webapps</p>
+
+<p>09/20/2007  03:03 PM    <DIR>          .
+09/20/2007  03:03 PM    <DIR>          ..
+09/20/2007  03:02 PM    <DIR>          docs
+09/20/2007  03:01 PM    <DIR>          examples
+09/20/2007  03:01 PM    <DIR>          host-manager
+09/20/2007  03:03 PM    <DIR>          manager
+09/19/2007  09:31 AM        13,394,733 openejb.war
+09/20/2007  03:01 PM    <DIR>          ROOT
+           1 File(s)     13,394,733 bytes
+           7 Dir(s)   5,100,126,208 bytes free</p>
+
+<pre><code>{card:label=Unix}{noformat:nopanel=true}
+$ cp openejb.war apache-tomcat-6.0.14/webapps/openejb.war
+
+$ ls apache-tomcat-6.0.14/webapps/
+ROOT/         docs/     examples/     host-manager/ manager/     
+</code></pre>
+
+<p>openejb.war</p>
+
+<p>{deck}</p>
+
+<p><a name="TomcatDetailedInstructions-RunInstallerServlet"></a></p>
+
+<h2>Run Installer Servlet</h2>
+
+<p>The OpenEJB Plugin for Tomcat contains an installer servlet which adds the
+OpenEJB listener and JavaAgent to the Tomcat installation.  To run the
+installer, you must first start Tomcat.</p>
+
+<p>{deck:id=Start Tomcat}
+{card:label=Windows}{noformat:nopanel=true}
+C:>set JRE_HOME=C:\Program Files\Java\jre1.5.0_06</p>
+
+<p>C:>cd apache-tomcat-6.0.14\bin</p>
+
+<p>C:\apache-tomcat-6.0.14\bin>startup.bat
+Using CATALINA_BASE:   C:\apache-tomcat-6.0.14
+Using CATALINA_HOME:   C:\apache-tomcat-6.0.14
+Using CATALINA_TMPDIR: C:\apache-tomcat-6.0.14\temp
+Using JRE_HOME:        C:\your\java\installation</p>
+
+<pre><code>{card:label=Unix}{noformat:nopanel=true}
+$ cd apache-tomcat-6.0.14/bin
+
+apache-tomcat-6.0.14/bin$ chmod u+x *.sh
+
+apache-tomcat-6.0.14/bin$ ./startup.sh 
+Using CATALINA_BASE:   /your/tomcat/installation/apache-tomcat-6.0.14
+Using CATALINA_HOME:   /your/tomcat/installation/apache-tomcat-6.0.14
+Using CATALINA_TMPDIR: /your/tomcat/installation/apache-tomcat-6.0.14/temp
+Using JRE_HOME:        /your/java/installation
+</code></pre>
+
+<p>{deck}</p>
+
+<p><em>NOTE:</em> Your output will be different from the example above due to
+differences in installation locations.</p>
+
+<p>It is a good idea to wait a 5-60 seconds (depending on the speed of your
+computer) for Tomcat to fully start.  Once Tomcat is fully started, simply
+visit <a href="http://localhost:8080/openejb/installer">http://localhost:8080/openejb/installer</a>
+ and click the 'install' button to run the installer.  The installer should
+report that the installation was successful. If it didn't work click [OPENEJB:here|#problems]
+.</p>
+
+<p>{warning}
+The installer servlet adds the OpenEJB JavaAgent declaration to the
+catalina.sh and catalina.bat files.  If you are using an IDE or some other
+mechanism to start Tomcat, you will need to <a href="manual-installation#javaagent.html">manually</a>
+ add the JavaAgent declaration to the Java VM options of the launcher you
+are using. 
+{warning}</p>
+
+<p><a name="TomcatDetailedInstructions-RestartTomcat"></a></p>
+
+<h2>Restart Tomcat</h2>
+
+<p>OpenEJB uses OpenJPA for persistence and OpenJPA currently requires a
+JavaAgent to function.  Unfortunately, there is no way to install a
+JavaAgent at runtime, so you will have to restart Tomcat to enable the
+JavaAgent.  Simply execute the shutdown command, wait 5-60 seconds
+(depending on the speed of your computer) for Tomcat to fully stop, and run
+the startup command to restart Tomcat.</p>
+
+<p>{deck:id=Start Tomcat}
+{card:label=Windows}{noformat:nopanel=true}
+C:>cd apache-tomcat-6.0.14\bin</p>
+
+<p>C:\apache-tomcat-6.0.14\bin>shutdown.bat
+Using CATALINA_BASE:   C:\apache-tomcat-6.0.14
+Using CATALINA_HOME:   C:\apache-tomcat-6.0.14
+Using CATALINA_TMPDIR: C:\apache-tomcat-6.0.14\temp
+Using JRE_HOME:        C:\your\java\installation</p>
+
+<p>C:\apache-tomcat-6.0.14\bin>startup.bat
+Using CATALINA_BASE:   C:\apache-tomcat-6.0.14
+Using CATALINA_HOME:   C:\apache-tomcat-6.0.14
+Using CATALINA_TMPDIR: C:\apache-tomcat-6.0.14\temp
+Using JRE_HOME:        C:\your\java\installation</p>
+
+<pre><code>{card:label=Unix}{noformat:nopanel=true}
+$ cd apache-tomcat-6.0.14/bin
+
+apache-tomcat-6.0.14/bin$ ./shutdown.sh 
+Using CATALINA_BASE:   /your/tomcat/installation/apache-tomcat-6.0.14
+Using CATALINA_HOME:   /your/tomcat/installation/apache-tomcat-6.0.14
+Using CATALINA_TMPDIR: /your/tomcat/installation/apache-tomcat-6.0.14/temp
+Using JRE_HOME:        /your/java/installation
+
+apache-tomcat-6.0.14/bin$ ./startup.sh 
+Using CATALINA_BASE:   /your/tomcat/installation/apache-tomcat-6.0.14
+Using CATALINA_HOME:   /your/tomcat/installation/apache-tomcat-6.0.14
+Using CATALINA_TMPDIR: /your/tomcat/installation/apache-tomcat-6.0.14/temp
+Using JRE_HOME:        /your/java/installation
+</code></pre>
+
+<p>{deck}</p>
+
+<p><em>NOTE:</em> Your output will be different from the example above due to
+differences in installation locations.</p>
+
+<p>Once Tomcat is fully started, simply visit <a href="http://localhost:8080/openejb/installer">http://localhost:8080/openejb/installer</a>
+ to verify the installation is complete.</p>
+
+<p><a name="TomcatDetailedInstructions-Examples,TutorialsandTests"></a></p>
+
+<h1>Examples, Tutorials and Tests</h1>
+
+<p><a name="TomcatDetailedInstructions-ejb-examples.war"></a></p>
+
+<h2>ejb-examples.war</h2>
+
+<p>Download the <a href="http://people.apache.org/~dain/openejb-temp/examples">ejb-examples.war</a>
+, copy it into the Tomcat webapps directory, and visit [http://localhost:8080/ejb-examples]
+.</p>
+
+<p><a name="TomcatDetailedInstructions-OpenEJBiTests"></a></p>
+
+<h2>OpenEJB iTests</h2>
+
+<p>OpenEJB uses a large test suite to verify the final server assembly, and
+you can use this to verify your OpenEJB installation.  Simply download the <a href="http://people.apache.org/~dain/openejb-temp/itests">openejb-itests.war and openejb-standalone-client.jar</a>
+ and copy it the war into the Tomcat webapps directory.  It will take a bit
+to load the application because it contains a huge number of EJBs. 
+Finally, run the test client executable jar.</p>
+
+<p>{deck:id=Start Tomcat}
+{card:label=Windows}{noformat:nopanel=true}
+C:>java -jar openejb-itests-standalone-client.jar tomcat</p>
+
+<hr />
+
+<table>
+<tr><td>_</td><td>_</td><td>_</td><td>_</td><td>_</td><td>_</td><td>_</td><td>_</td><td>_</td><td>_</td><td>_</td><td>_</td><td>_</td><td>_</td><td>_</td><td>_</td><td>_</td><td>_</td><td>_</td><td>_</td><td>_</td><td>_</td><td>_</td><td>_</td></tr>
+</table>
+
+<p>Running EJB compliance tests on HTTP/Tomcat Server</p>
+
+<hr />
+
+<p>WARNING: No test suite configuration file specified, assuming system
+properties contain all 
+needed information.  To specify a test suite configuration file by setting
+its location using
+the system property "openejb.testsuite.properties" 
+test server = org.apache.openejb.test.TomcatRemoteTestServer
+entry = java.naming.provider.url:http://127.0.0.1:8080/openejb/ejb
+entry =
+java.naming.factory.initial:org.apache.openejb.client.RemoteInitialContextFactory
+.........................................
+.........................................
+.........................................
+.........................................
+.........................................
+.........................................
+.........................................
+.........................................
+.........................................
+.........................................
+.........................................
+.........................................
+.........................................
+.........................................
+.........................................
+.........................................
+.........................................
+.........................................
+.........................................
+.........................................
+.........................................
+............................
+Time: 20.644</p>
+
+<p>OK (889 tests)</p>
+
+<hr />
+
+<p>CLIENT JNDI PROPERTIES
+java.naming.provider.url = http://127.0.0.1:8080/openejb/ejb
+java.naming.factory.initial =
+org.apache.openejb.client.RemoteInitialContextFactory</p>
+
+<hr />
+
+<pre><code>{card:label=Unix}{noformat:nopanel=true}
+$ java -jar openejb-itests-standalone-client.jar tomcat
+_________________________________________________
+|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|
+
+Running EJB compliance tests on HTTP/Tomcat Server
+_________________________________________________
+WARNING: No test suite configuration file specified, assuming system
+</code></pre>
+
+<p>properties contain all
+    needed information.  To specify a test suite configuration file by setting
+its location using
+    the system property "openejb.testsuite.properties"
+    test server = org.apache.openejb.test.TomcatRemoteTestServer
+    entry = java.naming.provider.url:http://127.0.0.1:8080/openejb/ejb
+    entry =
+java.naming.factory.initial:org.apache.openejb.client.RemoteInitialContextFactory
+    .........................................
+    .........................................
+    .........................................
+    .........................................
+    .........................................
+    .........................................
+    .........................................
+    .........................................
+    .........................................
+    .........................................
+    .........................................
+    .........................................
+    .........................................
+    .........................................
+    .........................................
+    .........................................
+    .........................................
+    .........................................
+    .........................................
+    .........................................
+    .........................................
+    ............................
+    Time: 12.186</p>
+
+<pre><code>OK (889 tests)
+
+
+_________________________________________________
+CLIENT JNDI PROPERTIES
+java.naming.provider.url = http://127.0.0.1:8080/openejb/ejb
+java.naming.factory.initial =
+</code></pre>
+
+<p>org.apache.openejb.client.RemoteInitialContextFactory
+    <strong><em><em></em><strong></em>_____________________________________</strong></strong></p>
+
+<p>{deck}</p>
+
+<p>{tip:title=Failures}The tests should completely pass the first time they
+are run.  If you execute the test client a second time, 21 tests fail for
+some unknown reason.{tip}</p>
+
+<p><a name="TomcatDetailedInstructions-{anchor:problems}Problems?"></a></p>
+
+<h1>{anchor:problems} Problems?</h1>
+
+<p><a name="TomcatDetailedInstructions-HTTPStatus403"></a></p>
+
+<h2>HTTP Status 403</h2>
+
+<p>Did you get a "HTTP Status 403" error page containing the description
+"Access to the specified resource () has been forbidden." when visiting <a href="http://localhost:8080/openejb">http://localhost:8080/openejb</a>
+?</p>
+
+<p>The openejb.war is protected by a Tomcat valve that restricts access to the
+application to the computer on which Tomcat is running.  If your browser is
+running on the same computer as Tomcat, try accessing OpenEJB using this
+link instead <a href="http://127.0.0.1:8080/openejb">http://127.0.0.1:8080/openejb</a>
+.</p>
+
+<p>If you want to access the openejb.war from another computer, you will need
+to either remove the valve, or modify the IP list in the valve declaration.
+ The easiest way to remove the valve it to simply delete the
+webapps/openejb/META-INF/context.xml file and and the webapps/openejb.war
+file <em>while Tomcat is stopped</em>.  The openejb.war file must be removed
+because some versions of Tomcat will use the context.xml file packed in the
+openejb.war file regardless of what is in the unpacked directory.</p>
+
+<p><a name="TomcatDetailedInstructions-OtherIssues"></a></p>
+
+<h2>Other Issues</h2>
+
+<p>If you are having problems with the installation, please send a message to
+the OpenEJB users <a href="openejb:mailing-lists.html">mailing list</a>
+ containing any error message(s) and the following information:</p>
+
+<ul>
+<li>OpenEJB Version</li>
+<li>Tomcat Version</li>
+<li>Java Version (execute java -version)</li>
+<li>Operating System Type and Version</li>
+</ul>
+
+<p><a name="TomcatDetailedInstructions-Limitations"></a></p>
+
+<h1>Limitations</h1>
+
+<p><em>Tomcat 6.x</em> - Currently, only Tomcat 6.x is supported due to API
+difference between 5.5.x and 6.x.  It is expected that 5.5 will be
+supported in the future, but there are no plans to support 5.0.x due to the
+lack of annotation support in 5.0.x.</p>
+
+<p><em>Security</em> - Unfortunately, at this time security with Tomcat/OpenEJB is
+not integrated, but is being worked on.</p>
+
+<p><em>EAR Files</em> - The integration only supports war (and collapsed-ear) files.
+ EAR, EJB Jar, and RAR files will be supported in a future release.</p>
+
+<p><em>JavaAgent</em> - OpenEJB uses OpenJPA to provide JPA and CMP persistence, and
+OpenJPA currently requires a JavaAgent to function properly.  This
+requirement is something that the OpenJPA project is working on removing. 
+Once removed, the OpenEJB plugin for Tomcat will no longer need to modify
+the startup shell scripts and you will not need to restart Tomcat after the
+OpenEJB installation.</p>
+
+<p><a name="TomcatDetailedInstructions-Misc"></a></p>
+
+<h1>Misc</h1>
+
+<p>This document is a starting point for using OpenEJB in Tomcat and will
+evolve based on user contributions. If you wish to contribute to this
+document, feel very welcome to click the 'Edit' link in the upper right and
+make changes and add new HOWTO's and other docs.  </p>
+
+        </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/tomcat-ejb-refs.cwiki
==============================================================================
--- websites/staging/openejb/trunk/content/tomcat-ejb-refs.cwiki (added)
+++ websites/staging/openejb/trunk/content/tomcat-ejb-refs.cwiki Sun Jul 10 05:37:04 2011
@@ -0,0 +1,24 @@
+h1. Via @EJB Annotation
+
+Which an be as simple as adding this to your Servlet, Filter, or Listener:
+
+{code}
+@EJB
+private HelloLocal helloLocal;
+{code}
+
+See the [@EJB Injection Example|Injection of other EJBs Example] for a running example.  The example uses one ejb to refer to another ejb, but the same rules apply for servlets.
+
+h1. Adding ejb-ref in your web.xml
+
+Or on the older xml-style:
+
+{code:xml}
+<ejb-ref>
+ <description> EJB Reference to the bean deployed to OpenEJB </description>
+ <ejb-ref-name>ejb/hello</ejb-ref-name>
+ <ejb-ref-type>Session</ejb-ref-type>
+ <home>org.acme.HelloHome</home>
+ <remote>org.acme.Hello</remote> 
+</ejb-ref>
+{code}

Added: websites/staging/openejb/trunk/content/tomcat-ejb-refs.html
==============================================================================
--- websites/staging/openejb/trunk/content/tomcat-ejb-refs.html (added)
+++ websites/staging/openejb/trunk/content/tomcat-ejb-refs.html Sun Jul 10 05:37:04 2011
@@ -0,0 +1,115 @@
+<!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>Tomcat ejb-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">
+          <p><a name="Tomcatejb-refs-Via@EJBAnnotation"></a></p>
+
+<h1>Via @EJB Annotation</h1>
+
+<p>Which an be as simple as adding this to your Servlet, Filter, or Listener:</p>
+
+<pre><code>@EJB
+private HelloLocal helloLocal;
+</code></pre>
+
+<p>See the <a href="injection-of-other-ejbs-example.html">@EJB Injection Example</a>
+ for a running example.  The example uses one ejb to refer to another ejb,
+but the same rules apply for servlets.</p>
+
+<p><a name="Tomcatejb-refs-Addingejb-refinyourweb.xml"></a></p>
+
+<h1>Adding ejb-ref in your web.xml</h1>
+
+<p>Or on the older xml-style:</p>
+
+<pre><code>&lt;ejb-ref&gt;
+ &lt;description&gt; EJB Reference to the bean deployed to OpenEJB &lt;/description&gt;
+ &lt;ejb-ref-name&gt;ejb/hello&lt;/ejb-ref-name&gt;
+ &lt;ejb-ref-type&gt;Session&lt;/ejb-ref-type&gt;
+ &lt;home&gt;org.acme.HelloHome&lt;/home&gt;
+ &lt;remote&gt;org.acme.Hello&lt;/remote&gt; 
+&lt;/ejb-ref&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/tomcat-installation.cwiki
==============================================================================
--- websites/staging/openejb/trunk/content/tomcat-installation.cwiki (added)
+++ websites/staging/openejb/trunk/content/tomcat-installation.cwiki Sun Jul 10 05:37:04 2011
@@ -0,0 +1,141 @@
+{composition-setup}
+{composition-setup}
+
+h1. Overview
+
+Tomcat installation is very simple, and can be describes as "Unpack and Run".  These instructions were written using Tomcat 6.0.14 but any recent 6.x version should work.  If you are comfortable with the CLI, these the following quick instructions will get you going ASAP; otherwise skip to the [OPENEJB:Download Tomcat|#download] section.
+
+# Download Tomcat zip or tar.gz
+# Unpack archive
+# Platform specific setup
+** \[OPENEJB:Unix\] If zip was unpacked, {{chmod u+x bin/*.sh}}
+** \[OPENEJB:Windows\] {{set JAVA_HOME =C:\your\java\installation}} 
+# Run bin/startup.sh or bin/startup.bat
+# Visit http://localhost:8080/
+# Run bin/shutdown.sh or bin/shutdown.bat
+
+h1. {anchor:download} Download Tomcat
+
+Download Tomcat 6 zip file from [here|http://tomcat.apache.org/download-60.cgi#6.0.14].    
+
+h1. Unpack Tomcat
+
+Unpack the Tomcat zip file  which will create a new directory containing the complete Tomcat installation.
+
+{deck:id=unpack tomcat}
+{card:label=Windows}{noformat:nopanel=true}
+C:\>jar -xvf apache-tomcat-6.0.14.zip
+  created: apache-tomcat-6.0.14/
+  created: apache-tomcat-6.0.14/bin/
+  created: apache-tomcat-6.0.14/conf/
+...snip...
+
+C:\>dir apache-tomcat-6.0.14
+ Volume in drive C has no label.
+ Volume Serial Number is 0000-0000
+
+ Directory of C:\apache-tomcat-6.0.14
+
+09/20/2007  09:14 PM    <DIR>          .
+09/20/2007  09:14 PM    <DIR>          ..
+09/20/2007  09:15 PM    <DIR>          bin
+09/20/2007  09:15 PM    <DIR>          conf
+09/20/2007  09:15 PM    <DIR>          lib
+07/20/2007  04:20 AM            11,560 LICENSE
+09/20/2007  09:14 PM    <DIR>          logs
+07/20/2007  04:20 AM               556 NOTICE
+07/20/2007  04:20 AM             6,656 RELEASE-NOTES
+07/20/2007  04:20 AM             5,829 RUNNING.txt
+09/20/2007  09:14 PM    <DIR>          temp
+09/20/2007  09:14 PM    <DIR>          webapps
+09/20/2007  09:14 PM    <DIR>          work
+               4 File(s)         24,601 bytes
+               9 Dir(s)   5,085,085,696 bytes free
+{noformat}{card}
+{card:label=Unix}{noformat:nopanel=true}
+$ jar -xvf apache-tomcat-6.0.14.zip 
+  created: apache-tomcat-6.0.14/
+  created: apache-tomcat-6.0.14/bin/
+  created: apache-tomcat-6.0.14/conf/
+...snip...
+
+$ ls apache-tomcat-6.0.14/  
+LICENSE        RELEASE-NOTES  bin/           lib/           temp/          work/
+NOTICE         RUNNING.txt    conf/          logs/          webapps/
+{noformat}{card}
+{deck}
+
+h1. \[OPENEJB:Windows\] Set JAVA_HOME environment variable
+
+For Windows users, the Tomcat shell scripts must know the location of the Java installation, and this is done with environment variables.  The following command will set the JAVA_HOME environment variable:
+
+{deck:id=unpack tomcat}
+{card:label=Windows}{noformat:nopanel=true}
+C:\>set JAVA_HOME =C:\your\java\installation
+{noformat}{card}
+{deck}
+
+h1. \[OPENEJB:Unix\] Make shell scripts executable
+
+For Unix users, the shell scripts in the Tomcat installation are not executable by default, so in order to execute them, you must set mark them as executable.  If you unpacked the Tomcat tar.gz file, the scripts are already executable.  The following command will make all shell scripts executable:
+
+{deck:id=unpack tomcat}
+{card:label=Unix}{noformat:nopanel=true}
+apache-tomcat-6.0.14$ chmod u+x bin/*.sh
+{noformat}{card}
+{deck}
+
+h1. Start Tomcat
+
+Execute the following command to start the Tomcat server:
+
+{deck:id=Start Tomcat}
+{card:label=Windows}{noformat:nopanel=true}
+C:\>cd apache-tomcat-6.0.14\bin
+
+C:\apache-tomcat-6.0.14\bin>startup.bat
+Using CATALINA_BASE:   C:\apache-tomcat-6.0.14
+Using CATALINA_HOME:   C:\apache-tomcat-6.0.14
+Using CATALINA_TMPDIR: C:\apache-tomcat-6.0.14\temp
+Using JRE_HOME:        C:\your\java\installation
+{noformat}{card}
+{card:label=Unix}{noformat:nopanel=true}
+$ cd apache-tomcat-6.0.14/bin
+
+apache-tomcat-6.0.14/bin$ ./startup.sh 
+Using CATALINA_BASE:   /your/tomcat/installation/apache-tomcat-6.0.14
+Using CATALINA_HOME:   /your/tomcat/installation/apache-tomcat-6.0.14
+Using CATALINA_TMPDIR: /your/tomcat/installation/apache-tomcat-6.0.14/temp
+Using JRE_HOME:        /your/java/installation
+{noformat}{card}
+{deck}
+
+*NOTE:* Your output will be different from the example above due to differences in installation location.
+
+h1. Verify Tomcat is Running
+
+Visit [http://localhost:8080/] and you should see the Tomcat welcome page.
+
+
+h1. Stop Tomcat
+
+Shutdown Tomcat by executing the following command:
+
+{deck:id=Start Tomcat}
+{card:label=Windows}{noformat:nopanel=true}
+C:\apache-tomcat-6.0.14\bin>shutdown.bat
+Using CATALINA_BASE:   C:\apache-tomcat-6.0.14
+Using CATALINA_HOME:   C:\apache-tomcat-6.0.14
+Using CATALINA_TMPDIR: C:\apache-tomcat-6.0.14\temp
+Using JRE_HOME:        C:\your\java\installation
+{noformat}{card}
+{card:label=Unix}{noformat:nopanel=true}
+apache-tomcat-6.0.14/bin$ ./shutdown.sh 
+Using CATALINA_BASE:   /your/tomcat/installation/apache-tomcat-6.0.14
+Using CATALINA_HOME:   /your/tomcat/installation/apache-tomcat-6.0.14
+Using CATALINA_TMPDIR: /your/tomcat/installation/apache-tomcat-6.0.14/temp
+Using JRE_HOME:        /your/java/installation
+{noformat}{card}
+{deck}
+
+*NOTE:* Your output will be different from the example above due to differences in installation locations.

Added: websites/staging/openejb/trunk/content/tomcat-installation.html
==============================================================================
--- websites/staging/openejb/trunk/content/tomcat-installation.html (added)
+++ websites/staging/openejb/trunk/content/tomcat-installation.html Sun Jul 10 05:37:04 2011
@@ -0,0 +1,270 @@
+<!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>Tomcat Installation</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>{composition-setup}
+{composition-setup}</p>
+
+<p><a name="TomcatInstallation-Overview"></a></p>
+
+<h1>Overview</h1>
+
+<p>Tomcat installation is very simple, and can be describes as "Unpack and
+Run".  These instructions were written using Tomcat 6.0.14 but any recent
+6.x version should work.  If you are comfortable with the CLI, these the
+following quick instructions will get you going ASAP; otherwise skip to the <a href="#download.html">OPENEJB:Download Tomcat</a>
+ section.</p>
+
+<ol>
+<li>Download Tomcat zip or tar.gz</li>
+<li>Unpack archive</li>
+<li>Platform specific setup
+<em>* [OPENEJB:Unix](openejb:unix.html)
+If zip was unpacked, <em>chmod u+x bin/</em>.sh</em>
+<em>* [OPENEJB:Windows](openejb:windows.html)
+*set JAVA_HOME =C:\your\java\installation</em> </li>
+<li>Run bin/startup.sh or bin/startup.bat</li>
+<li>Visit http://localhost:8080/</li>
+<li>Run bin/shutdown.sh or bin/shutdown.bat</li>
+</ol>
+
+<p><a name="TomcatInstallation-{anchor:download}DownloadTomcat"></a></p>
+
+<h1>{anchor:download} Download Tomcat</h1>
+
+<p>Download Tomcat 6 zip file from <a href="http://tomcat.apache.org/download-60.cgi#6.0.14">here</a>
+.    </p>
+
+<p><a name="TomcatInstallation-UnpackTomcat"></a></p>
+
+<h1>Unpack Tomcat</h1>
+
+<p>Unpack the Tomcat zip file  which will create a new directory containing
+the complete Tomcat installation.</p>
+
+<p>{deck:id=unpack tomcat}
+{card:label=Windows}{noformat:nopanel=true}
+C:>jar -xvf apache-tomcat-6.0.14.zip
+  created: apache-tomcat-6.0.14/
+  created: apache-tomcat-6.0.14/bin/
+  created: apache-tomcat-6.0.14/conf/
+...snip...</p>
+
+<p>C:>dir apache-tomcat-6.0.14
+ Volume in drive C has no label.
+ Volume Serial Number is 0000-0000</p>
+
+<p>Directory of C:\apache-tomcat-6.0.14</p>
+
+<p>09/20/2007  09:14 PM    <DIR>          .
+09/20/2007  09:14 PM    <DIR>          ..
+09/20/2007  09:15 PM    <DIR>          bin
+09/20/2007  09:15 PM    <DIR>          conf
+09/20/2007  09:15 PM    <DIR>          lib
+07/20/2007  04:20 AM        11,560 LICENSE
+09/20/2007  09:14 PM    <DIR>          logs
+07/20/2007  04:20 AM           556 NOTICE
+07/20/2007  04:20 AM         6,656 RELEASE-NOTES
+07/20/2007  04:20 AM         5,829 RUNNING.txt
+09/20/2007  09:14 PM    <DIR>          temp
+09/20/2007  09:14 PM    <DIR>          webapps
+09/20/2007  09:14 PM    <DIR>          work
+           4 File(s)     24,601 bytes
+           9 Dir(s)   5,085,085,696 bytes free</p>
+
+<pre><code>{card:label=Unix}{noformat:nopanel=true}
+$ jar -xvf apache-tomcat-6.0.14.zip 
+  created: apache-tomcat-6.0.14/
+  created: apache-tomcat-6.0.14/bin/
+  created: apache-tomcat-6.0.14/conf/
+...snip...
+
+$ ls apache-tomcat-6.0.14/  
+LICENSE        RELEASE-NOTES  bin/       lib/       temp/     
+</code></pre>
+
+<p>work/
+    NOTICE         RUNNING.txt    conf/      logs/      webapps/</p>
+
+<p>{deck}</p>
+
+<p>h1. [OPENEJB:Windows](openejb:windows.html)
+ Set JAVA_HOME environment variable</p>
+
+<p>For Windows users, the Tomcat shell scripts must know the location of the
+Java installation, and this is done with environment variables.  The
+following command will set the JAVA_HOME environment variable:</p>
+
+<p>{deck:id=unpack tomcat}
+{card:label=Windows}{noformat:nopanel=true}
+C:>set JAVA_HOME =C:\your\java\installation</p>
+
+<pre><code>{deck}
+
+h1. \[OPENEJB:Unix\]
+</code></pre>
+
+<p>Make shell scripts executable</p>
+
+<pre><code>For Unix users, the shell scripts in the Tomcat installation are not
+</code></pre>
+
+<p>executable by default, so in order to execute them, you must set mark them
+as executable.  If you unpacked the Tomcat tar.gz file, the scripts are
+already executable.  The following command will make all shell scripts
+executable:</p>
+
+<pre><code>{deck:id=unpack tomcat}
+{card:label=Unix}{noformat:nopanel=true}
+apache-tomcat-6.0.14$ chmod u+x bin/*.sh
+</code></pre>
+
+<p>{deck}</p>
+
+<p><a name="TomcatInstallation-StartTomcat"></a></p>
+
+<h1>Start Tomcat</h1>
+
+<p>Execute the following command to start the Tomcat server:</p>
+
+<p>{deck:id=Start Tomcat}
+{card:label=Windows}{noformat:nopanel=true}
+C:>cd apache-tomcat-6.0.14\bin</p>
+
+<p>C:\apache-tomcat-6.0.14\bin>startup.bat
+Using CATALINA_BASE:   C:\apache-tomcat-6.0.14
+Using CATALINA_HOME:   C:\apache-tomcat-6.0.14
+Using CATALINA_TMPDIR: C:\apache-tomcat-6.0.14\temp
+Using JRE_HOME:        C:\your\java\installation</p>
+
+<pre><code>{card:label=Unix}{noformat:nopanel=true}
+$ cd apache-tomcat-6.0.14/bin
+
+apache-tomcat-6.0.14/bin$ ./startup.sh 
+Using CATALINA_BASE:   /your/tomcat/installation/apache-tomcat-6.0.14
+Using CATALINA_HOME:   /your/tomcat/installation/apache-tomcat-6.0.14
+Using CATALINA_TMPDIR: /your/tomcat/installation/apache-tomcat-6.0.14/temp
+Using JRE_HOME:        /your/java/installation
+</code></pre>
+
+<p>{deck}</p>
+
+<p><em>NOTE:</em> Your output will be different from the example above due to
+differences in installation location.</p>
+
+<p><a name="TomcatInstallation-VerifyTomcatisRunning"></a></p>
+
+<h1>Verify Tomcat is Running</h1>
+
+<p>Visit <a href="http://localhost:8080/">http://localhost:8080/</a>
+ and you should see the Tomcat welcome page.</p>
+
+<p><a name="TomcatInstallation-StopTomcat"></a></p>
+
+<h1>Stop Tomcat</h1>
+
+<p>Shutdown Tomcat by executing the following command:</p>
+
+<p>{deck:id=Start Tomcat}
+{card:label=Windows}{noformat:nopanel=true}
+C:\apache-tomcat-6.0.14\bin>shutdown.bat
+Using CATALINA_BASE:   C:\apache-tomcat-6.0.14
+Using CATALINA_HOME:   C:\apache-tomcat-6.0.14
+Using CATALINA_TMPDIR: C:\apache-tomcat-6.0.14\temp
+Using JRE_HOME:        C:\your\java\installation</p>
+
+<pre><code>{card:label=Unix}{noformat:nopanel=true}
+apache-tomcat-6.0.14/bin$ ./shutdown.sh 
+Using CATALINA_BASE:   /your/tomcat/installation/apache-tomcat-6.0.14
+Using CATALINA_HOME:   /your/tomcat/installation/apache-tomcat-6.0.14
+Using CATALINA_TMPDIR: /your/tomcat/installation/apache-tomcat-6.0.14/temp
+Using JRE_HOME:        /your/java/installation
+</code></pre>
+
+<p>{deck}</p>
+
+<p><em>NOTE:</em> Your output will be different from the example above due to
+differences in installation locations.</p>
+
+        </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/tomcat-objectfactory.cwiki
==============================================================================
--- websites/staging/openejb/trunk/content/tomcat-objectfactory.cwiki (added)
+++ websites/staging/openejb/trunk/content/tomcat-objectfactory.cwiki Sun Jul 10 05:37:04 2011
@@ -0,0 +1 @@
+{include:Tomcat Object Factory}
\ No newline at end of file

Added: websites/staging/openejb/trunk/content/tomcat-objectfactory.html
==============================================================================
--- websites/staging/openejb/trunk/content/tomcat-objectfactory.html (added)
+++ websites/staging/openejb/trunk/content/tomcat-objectfactory.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>Tomcat ObjectFactory</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>{include:Tomcat Object Factory}</p>
+
+        </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>