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

Added: websites/staging/openejb/trunk/content/common-datasource-configurations.cwiki
==============================================================================
--- websites/staging/openejb/trunk/content/common-datasource-configurations.cwiki (added)
+++ websites/staging/openejb/trunk/content/common-datasource-configurations.cwiki Sun Jul 10 05:37:04 2011
@@ -0,0 +1,87 @@
+h1. Common Vendors
+h2. HSQLDB
+
+The drivers are included with OpenEJB 3.0 and HSQLDB is the default database.
+{code:xml}
+<Resource id="HSQLDB Database" type="DataSource">
+    JdbcDriver org.hsqldb.jdbcDriver
+    JdbcUrl jdbc:hsqldb:file:hsqldb
+    UserName sa
+    Password
+</Resource>
+{code}
+
+h2. Derby (Embedded)
+
+{code:xml}
+<Resource id="Derby Database" type="DataSource">
+    #Embedded Derby example
+
+    JdbcDriver org.apache.derby.jdbc.EmbeddedDriver
+    JdbcUrl jdbc:derby:derbyDB;create=true
+    UserName admin
+    Password pass
+</Resource>
+{code}
+
+h2. MySQL
+
+{code:xml}
+<Resource id="MySQL Database" type="DataSource">
+    #  MySQL example
+    #
+    #  This connector will not work until you download the driver at:
+    #  http://www.mysql.com/downloads/api-jdbc-stable.html
+
+    JdbcDriver  com.mysql.jdbc.Driver
+    JdbcUrl     jdbc:mysql://localhost/test
+    UserName    test
+</Resource>
+{code}
+
+h2. Oracle
+
+{code:xml}
+<Resource id="Oracle Database" type="DataSource">
+    #  Oracle example
+    #
+    #  This connector will not work until you download the driver at:
+    #  http://otn.oracle.com/software/tech/java/sqlj_jdbc/content.html
+    JdbcDriver  oracle.jdbc.OracleDriver
+    JdbcUrl     jdbc:oracle:thin:@localhost:1521:orcl
+    UserName    scott
+    Password    tiger
+</Resource>
+{code}
+
+h2. PosgreSQL
+
+{code:xml}
+<Resource id="PostgreSQL Database" type="DataSource">
+    #  PostgreSQL example
+    #
+    #  This connector will not work until you download the driver at:
+    #  http://jdbc.postgresql.org/download.html
+    JdbcDriver   org.postgresql.Driver
+    JdbcUrl      jdbc:postgresql://localhost/test
+    UserName     postgres
+    Password     pass
+</Resource>
+{code}
+
+h2. InstantDB
+
+{code:xml}
+<Resource id="InstantDB Database" type="DataSource">
+    #  InstantDB example
+    #
+    JdbcDriver   org.enhydra.instantdb.jdbc.idbDriver
+    JdbcUrl      jdbc:idb:conf/instantdb.properties
+    UserName     Admin
+    Password     pass
+</Resource>
+{code}
+
+{info:title=Information}
+Internally, OpenEJB relies on Apache Commons DBCP to manage DataSources. To get the full list of available configuration properties, have a look to [Apache Commons DBCP configuration|http://commons.apache.org/dbcp/configuration.html|Apache Commons DBCP configuration].
+{info} 

Added: websites/staging/openejb/trunk/content/common-datasource-configurations.html
==============================================================================
--- websites/staging/openejb/trunk/content/common-datasource-configurations.html (added)
+++ websites/staging/openejb/trunk/content/common-datasource-configurations.html Sun Jul 10 05:37:04 2011
@@ -0,0 +1,187 @@
+<!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>Common DataSource Configurations</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="CommonDataSourceConfigurations-CommonVendors"></a></p>
+
+<h1>Common Vendors</h1>
+
+<p><a name="CommonDataSourceConfigurations-HSQLDB"></a></p>
+
+<h2>HSQLDB</h2>
+
+<p>The drivers are included with OpenEJB 3.0 and HSQLDB is the default
+database.</p>
+
+<pre><code>&lt;Resource id="HSQLDB Database" type="DataSource"&gt;
+    JdbcDriver org.hsqldb.jdbcDriver
+    JdbcUrl jdbc:hsqldb:file:hsqldb
+    UserName sa
+    Password
+&lt;/Resource&gt;
+</code></pre>
+
+<p><a name="CommonDataSourceConfigurations-Derby(Embedded)"></a></p>
+
+<h2>Derby (Embedded)</h2>
+
+<pre><code>&lt;Resource id="Derby Database" type="DataSource"&gt;
+    #Embedded Derby example
+
+    JdbcDriver org.apache.derby.jdbc.EmbeddedDriver
+    JdbcUrl jdbc:derby:derbyDB;create=true
+    UserName admin
+    Password pass
+&lt;/Resource&gt;
+</code></pre>
+
+<p><a name="CommonDataSourceConfigurations-MySQL"></a></p>
+
+<h2>MySQL</h2>
+
+<pre><code>&lt;Resource id="MySQL Database" type="DataSource"&gt;
+    #  MySQL example
+    #
+    #  This connector will not work until you download the driver at:
+    #  http://www.mysql.com/downloads/api-jdbc-stable.html
+
+    JdbcDriver  com.mysql.jdbc.Driver
+    JdbcUrl jdbc:mysql://localhost/test
+    UserName    test
+&lt;/Resource&gt;
+</code></pre>
+
+<p><a name="CommonDataSourceConfigurations-Oracle"></a></p>
+
+<h2>Oracle</h2>
+
+<pre><code>&lt;Resource id="Oracle Database" type="DataSource"&gt;
+    #  Oracle example
+    #
+    #  This connector will not work until you download the driver at:
+    #  http://otn.oracle.com/software/tech/java/sqlj_jdbc/content.html
+    JdbcDriver  oracle.jdbc.OracleDriver
+    JdbcUrl jdbc:oracle:thin:@localhost:1521:orcl
+    UserName    scott
+    Password    tiger
+&lt;/Resource&gt;
+</code></pre>
+
+<p><a name="CommonDataSourceConfigurations-PosgreSQL"></a></p>
+
+<h2>PosgreSQL</h2>
+
+<pre><code>&lt;Resource id="PostgreSQL Database" type="DataSource"&gt;
+    #  PostgreSQL example
+    #
+    #  This connector will not work until you download the driver at:
+    #  http://jdbc.postgresql.org/download.html
+    JdbcDriver   org.postgresql.Driver
+    JdbcUrl  jdbc:postgresql://localhost/test
+    UserName     postgres
+    Password     pass
+&lt;/Resource&gt;
+</code></pre>
+
+<p><a name="CommonDataSourceConfigurations-InstantDB"></a></p>
+
+<h2>InstantDB</h2>
+
+<pre><code>&lt;Resource id="InstantDB Database" type="DataSource"&gt;
+    #  InstantDB example
+    #
+    JdbcDriver   org.enhydra.instantdb.jdbc.idbDriver
+    JdbcUrl  jdbc:idb:conf/instantdb.properties
+    UserName     Admin
+    Password     pass
+&lt;/Resource&gt;
+</code></pre>
+
+<p>{info:title=Information}
+Internally, OpenEJB relies on Apache Commons DBCP to manage DataSources. To
+get the full list of available configuration properties, have a look to [Apache Commons DBCP configuration](http://commons.apache.org/dbcp/configuration.html|Apache Commons DBCP configuration)
+.
+{info} </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/common-persistenceprovider-properties.cwiki
==============================================================================
--- websites/staging/openejb/trunk/content/common-persistenceprovider-properties.cwiki (added)
+++ websites/staging/openejb/trunk/content/common-persistenceprovider-properties.cwiki Sun Jul 10 05:37:04 2011
@@ -0,0 +1,39 @@
+While not a definitive list, it does help to show a side-by-side view of common properties used by the various persistence providers out there.
+
+h1. TopLink
+
+{code:xml}
+<properties>
+  <!--http://www.oracle.com/technology/products/ias/toplink/JPA/essentials/toplink-jpa-extensions.html-->
+  <property name="toplink.ddl-generation" value="drop-and-create-tables"/>
+  <property name="toplink.logging.level" value="FINEST"/>
+  <property name="toplink.ddl-generation.output-mode" value="both"/>
+  <property name="toplink.target-server" value="pl.zsk.samples.ejbservice.OpenEJBServerPlatform"/>
+</properties>
+{code}
+
+h1. OpenJPA
+
+{code:xml}
+<properties>
+  <!--http://openjpa.apache.org/faq.html-->
+  <!-- does not create foreign keys, creates schema and deletes content of a database 
+       (deleteTableContents - foreign keys are created twice???), use dropDB instead -->
+  <property name="openjpa.jdbc.SynchronizeMappings" value="buildSchema(foreignKeys=true,schemaAction='dropDB,add')"/>
+  <!--Resolves the problem with foreign key integrity - joined entities are persisted sometimes in wrong order??? (verify it)-->
+  <property name="openjpa.jdbc.SchemaFactory" value="native(foreignKeys=true)" />
+  <!--Create foreign keys-->
+  <property name="openjpa.jdbc.MappingDefaults" value="ForeignKeyDeleteAction=restrict, JoinForeignKeyDeleteAction=restrict"/>
+  <property name="openjpa.Log" value="DefaultLevel=TRACE,SQL=TRACE" />
+</properties>
+{code}
+
+h1. Hibernate
+
+{code:xml} 
+<properties>
+  <property name="hibernate.hbm2ddl.auto" value="create-drop"/>
+  <property name="hibernate.transaction.manager_lookup_class"
+     value="org.apache.openejb.hibernate.TransactionManagerLookup"/>
+</properties>
+{code}
\ No newline at end of file

Added: websites/staging/openejb/trunk/content/common-persistenceprovider-properties.html
==============================================================================
--- websites/staging/openejb/trunk/content/common-persistenceprovider-properties.html (added)
+++ websites/staging/openejb/trunk/content/common-persistenceprovider-properties.html Sun Jul 10 05:37:04 2011
@@ -0,0 +1,140 @@
+<!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>Common PersistenceProvider properties</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>While not a definitive list, it does help to show a side-by-side view of
+common properties used by the various persistence providers out there.</p>
+
+<p><a name="CommonPersistenceProviderproperties-TopLink"></a></p>
+
+<h1>TopLink</h1>
+
+<pre><code>&lt;properties&gt;
+</code></pre>
+
+<p><!--http://www.oracle.com/technology/products/ias/toplink/JPA/essentials/toplink-jpa-extensions.html-->
+      <property name="toplink.ddl-generation" value="drop-and-create-tables"/>
+      <property name="toplink.logging.level" value="FINEST"/>
+      <property name="toplink.ddl-generation.output-mode" value="both"/>
+      <property name="toplink.target-server"
+value="pl.zsk.samples.ejbservice.OpenEJBServerPlatform"/>
+    </properties></p>
+
+<p><a name="CommonPersistenceProviderproperties-OpenJPA"></a></p>
+
+<h1>OpenJPA</h1>
+
+<pre><code>&lt;properties&gt;
+  &lt;!--http://openjpa.apache.org/faq.html--&gt;
+  &lt;!-- does not create foreign keys, creates schema and deletes content of
+</code></pre>
+
+<p>a database 
+           (deleteTableContents - foreign keys are created twice???), use
+dropDB instead -->
+      <property name="openjpa.jdbc.SynchronizeMappings"
+value="buildSchema(foreignKeys=true,schemaAction='dropDB,add')"/>
+      <!--Resolves the problem with foreign key integrity - joined entities are
+persisted sometimes in wrong order??? (verify it)-->
+      <property name="openjpa.jdbc.SchemaFactory"
+value="native(foreignKeys=true)" />
+      <!--Create foreign keys-->
+      <property name="openjpa.jdbc.MappingDefaults"
+value="ForeignKeyDeleteAction=restrict,
+JoinForeignKeyDeleteAction=restrict"/>
+      <property name="openjpa.Log" value="DefaultLevel=TRACE,SQL=TRACE" />
+    </properties></p>
+
+<p><a name="CommonPersistenceProviderproperties-Hibernate"></a></p>
+
+<h1>Hibernate</h1>
+
+<pre><code>&lt;properties&gt;
+  &lt;property name="hibernate.hbm2ddl.auto" value="create-drop"/&gt;
+  &lt;property name="hibernate.transaction.manager_lookup_class"
+     value="org.apache.openejb.hibernate.TransactionManagerLookup"/&gt;
+&lt;/properties&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/configuring-containers-in-tests.cwiki
==============================================================================
--- websites/staging/openejb/trunk/content/configuring-containers-in-tests.cwiki (added)
+++ websites/staging/openejb/trunk/content/configuring-containers-in-tests.cwiki Sun Jul 10 05:37:04 2011
@@ -0,0 +1,17 @@
+Like Resources, Containers can also be declared via InitialContext properties as well.  The most useful is to declare a Stateful SessionBean container so that it's guaranteed to passivate and activate on each call to the bean, allowing you to test your callbacks behave as you need them to.
+
+{code}
+Properties p = new Properties();
+p.put(Context.INITIAL_CONTEXT_FACTORY, "org.apache.openejb.client.LocalInitialContextFactory");
+
+p.put("myStatefulContainer", "new://Container?type=STATEFUL");
+p.put("myStatefulContainer.PoolSize", "0");
+p.put("myStatefulContainer.BulkPassivate", "1");
+
+Context context = new InitialContext(p);
+{code}
+
+Note, this only works when using the LocalInitialContextFactory to embed OpenEJB into the vm.  Once embedded, further configuration properties are ignored.
+
+See [Containers and Resources] for a full list of supported Resource types and their properties.
+

Added: websites/staging/openejb/trunk/content/configuring-containers-in-tests.html
==============================================================================
--- websites/staging/openejb/trunk/content/configuring-containers-in-tests.html (added)
+++ websites/staging/openejb/trunk/content/configuring-containers-in-tests.html Sun Jul 10 05:37:04 2011
@@ -0,0 +1,111 @@
+<!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>Configuring Containers in Tests</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>Like Resources, Containers can also be declared via InitialContext
+properties as well.  The most useful is to declare a Stateful SessionBean
+container so that it's guaranteed to passivate and activate on each call to
+the bean, allowing you to test your callbacks behave as you need them to.</p>
+
+<pre><code>Properties p = new Properties();
+p.put(Context.INITIAL_CONTEXT_FACTORY,
+</code></pre>
+
+<p>"org.apache.openejb.client.LocalInitialContextFactory");</p>
+
+<pre><code>p.put("myStatefulContainer", "new://Container?type=STATEFUL");
+p.put("myStatefulContainer.PoolSize", "0");
+p.put("myStatefulContainer.BulkPassivate", "1");
+
+Context context = new InitialContext(p);
+</code></pre>
+
+<p>Note, this only works when using the LocalInitialContextFactory to embed
+OpenEJB into the vm.  Once embedded, further configuration properties are
+ignored.</p>
+
+<p>See <a href="containers-and-resources.html">Containers and Resources</a>
+ for a full list of supported Resource types and their properties.</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/configuring-datasources-in-tests.cwiki
==============================================================================
--- websites/staging/openejb/trunk/content/configuring-datasources-in-tests.cwiki (added)
+++ websites/staging/openejb/trunk/content/configuring-datasources-in-tests.cwiki Sun Jul 10 05:37:04 2011
@@ -0,0 +1,27 @@
+h1. InitialContext properties
+
+You can configure data sources from within your test case (avoiding the need for an openejb.xml entirely) like so:
+
+{code}
+Properties p = new Properties();
+p.put(Context.INITIAL_CONTEXT_FACTORY, "org.apache.openejb.client.LocalInitialContextFactory");
+
+p.put("myDataSource", "new://Resource?type=DataSource");
+p.put("myDataSource.JdbcDriver", "org.apache.derby.jdbc.EmbeddedDriver");
+p.put("myDataSource.JdbcUrl", "jdbc:derby:derbyDB;create=true");
+p.put("myDataSource.JtaManaged", "true");
+
+Context context = new InitialContext(p);
+{code}
+
+See [Embedded Configuration] for details on properties and overrides.
+
+See [Containers and Resources] for a full list of supported Resource types and their properties.
+
+h2. Note on <jta-data-source> and <non-jta-data-source>
+
+When configuring DataSources to be used by persistence.xml files, the DataSource supplied for <jta-data-source> is typically identical to the <non-jta-data-source>, but with the JtaManaged property set differently.  Keeping with our philosophy to free you up from redundant configuration, we will happily auto-create a missing jta-data-source or non-jta-data-source based upon the supplied DataSource.
+
+In the example above, a new DataSource would be generated as an exact copy but with the name "myDataSourceUnmanaged" and its JtaManaged flag set to false.  If the supplied DataSource was not JtaManaged, then the generated DataSource would be called "myDataSourceJta" and have its JtaManaged flag set to true.
+
+When relying on this functionality it is not necessary to specify the name of the generated DataSource in the persistence.xml file.

Added: websites/staging/openejb/trunk/content/configuring-datasources-in-tests.html
==============================================================================
--- websites/staging/openejb/trunk/content/configuring-datasources-in-tests.html (added)
+++ websites/staging/openejb/trunk/content/configuring-datasources-in-tests.html Sun Jul 10 05:37:04 2011
@@ -0,0 +1,133 @@
+<!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>Configuring DataSources in Tests</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="ConfiguringDataSourcesinTests-InitialContextproperties"></a></p>
+
+<h1>InitialContext properties</h1>
+
+<p>You can configure data sources from within your test case (avoiding the
+need for an openejb.xml entirely) like so:</p>
+
+<pre><code>Properties p = new Properties();
+p.put(Context.INITIAL_CONTEXT_FACTORY,
+</code></pre>
+
+<p>"org.apache.openejb.client.LocalInitialContextFactory");</p>
+
+<pre><code>p.put("myDataSource", "new://Resource?type=DataSource");
+p.put("myDataSource.JdbcDriver", "org.apache.derby.jdbc.EmbeddedDriver");
+p.put("myDataSource.JdbcUrl", "jdbc:derby:derbyDB;create=true");
+p.put("myDataSource.JtaManaged", "true");
+
+Context context = new InitialContext(p);
+</code></pre>
+
+<p>See <a href="embedded-configuration.html">Embedded Configuration</a>
+ for details on properties and overrides.</p>
+
+<p>See <a href="containers-and-resources.html">Containers and Resources</a>
+ for a full list of supported Resource types and their properties.</p>
+
+<p><a name="ConfiguringDataSourcesinTests-Noteon<jta-data-source>and<non-jta-data-source>"></a></p>
+
+<h2>Note on <jta-data-source> and <non-jta-data-source></h2>
+
+<p>When configuring DataSources to be used by persistence.xml files, the
+DataSource supplied for <jta-data-source> is typically identical to the
+<non-jta-data-source>, but with the JtaManaged property set differently. 
+Keeping with our philosophy to free you up from redundant configuration, we
+will happily auto-create a missing jta-data-source or non-jta-data-source
+based upon the supplied DataSource.</p>
+
+<p>In the example above, a new DataSource would be generated as an exact copy
+but with the name "myDataSourceUnmanaged" and its JtaManaged flag set to
+false.  If the supplied DataSource was not JtaManaged, then the generated
+DataSource would be called "myDataSourceJta" and have its JtaManaged flag
+set to true.</p>
+
+<p>When relying on this functionality it is not necessary to specify the name
+of the generated DataSource in the persistence.xml file.</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/configuring-datasources.cwiki
==============================================================================
--- websites/staging/openejb/trunk/content/configuring-datasources.cwiki (added)
+++ websites/staging/openejb/trunk/content/configuring-datasources.cwiki Sun Jul 10 05:37:04 2011
@@ -0,0 +1,127 @@
+h2. Configuring DataSources in openejb.xml
+
+The *<Resource>* element is used to configure a *javax.sql.DataSource*. It is also used to configure other resources like Timers, Topics, Queues.  We will see some examples of using <Resource> to configure a DataSource.
+
+The <Resource> element is designed after @Resource annotation and has similar attributes.
+
+For example, this annotation in your bean:
+{code}
+@Resource(name = "myDerbyDatasource", type = javax.sql.DataSource.class)
+{code}
+
+Would map to a Resource declared in your openejb.xml as follows:
+{code}
+<Resource id="myDerbyDatasource" type="javax.sql.DataSource">
+ . . . .
+<Resource>
+{code}
+
+Note that in the xml element, the _type_ value of _javax.sql.DataSource_ can abbreviated to just _DataSource_ as follows:
+{code}
+<Resource id="myDerbyDatasource" type="DataSource">
+ . . . .
+<Resource>
+{code}
+
+See [Containers and Resources] for a complete list of supported DataSource properties.  See [DataSource Password Encryption] for information on specifying non-plain-text database passwords in your openejb.xml file.  See [Common DataSource Configurations] for a list of the commonly used databases and their driver configurations.
+
+You may also need data partitioning per customer or depending on any other business criteria. That's also an available feature. See [Dynamic Datasource] for more details.
+
+h2. JNDI names for configured DataSources
+
+h3. Example 1
+
+{code:xml}
+<Resource id="Default JDBC Database" type="DataSource">
+   . . . . .
+</Resource>
+{code}
+The global jndi name would be *java:openejb/Resource/Default JDBC Database*
+
+h3. Example 2
+
+{code:xml}
+<Resource id="Derby Database"  type="DataSource">
+  . . . . .
+</Resource>
+{code}
+The global jndi name would be *java:openejb/Resource/Derby Database*
+
+h2. Obtaining a DataSource
+
+DataSource references in your ejb should get automatically mapped to the Resource you declare.  The shortest and easiest rule is that *if your reference name matches a Resource in your openejb.xml, that's the one you get*.&nbsp; Essentially, the rules for mapping are as follows.
+# Name Attribute Match - @Resource with a name attribute matching the resource name gets that resource injected
+# Injected Name Match - variable name matching the resource name gets that  resource injected
+# No Match - nothing matches a resource name, so the first resource available gets injected
+
+
+There are various ways one could obtain a DataSource now.  Lets take an example of Derby.
+
+With a Resource declaration in your openejb.xml like this:
+
+{code:xml}
+<Resource id="myDerbyDatabase"  type="DataSource">
+  . . . . .
+</Resource>
+{code}
+There are several possible ways to refer to it, as follows.
+
+
+*BY matching variable name to resource name*
+
+
+{code:java}
+@Stateless
+public class FooBean {
+    @Resource DataSource myDerbyDatabase;
+}
+{code}
+
+*OR BY matching name*
+
+{code:java}
+@Stateless
+public class FooBean {
+    @Resource(name="myDerbyDatabase")
+    DataSource dataSource;
+}
+{code}
+
+*OR BY JNDI lookup*
+{code:java}
+@Resource(name="myDerbyDatabase", type=javax.sql.DataSource.class)
+@Stateless
+public class FooBean {
+
+    public void setSessionContext(SessionContext sessionContext) {
+        DataSource dataSource = (DataSource) sessionContext.lookup("myDerbyDatabase");
+    }
+
+    public void someOtherMethod() throws Exception {
+        InitialContext initialContext = new InitialContext();
+        DataSource dataSource = (DataSource) initialContext.lookup("java:comp/env/myDerbyDatabase");
+    }
+}
+{code}
+*OR*
+{code:xml}
+<resource-ref>
+   <res-ref-name>myDerbyDatabase</res-ref-name>
+   <res-type>javax.sql.DataSource</res-type>
+ </resource-ref>
+{code}
+*OR*
+{code:xml}
+<resource-ref>
+   <res-ref-name>jdbc/myDerbyDatabase</res-ref-name>
+   <res-type>javax.sql.DataSource</res-type>
+ </resource-ref>
+{code}
+*OR*
+{code:xml}
+<resource-ref>
+   <res-ref-name>someOtherName</res-ref-name>
+   <res-type>javax.sql.DataSource</res-type>
+   <mapped-name>myDerbyDatabase</mapped-name>
+ </resource-ref>
+{code}
\ No newline at end of file

Added: websites/staging/openejb/trunk/content/configuring-datasources.html
==============================================================================
--- websites/staging/openejb/trunk/content/configuring-datasources.html (added)
+++ websites/staging/openejb/trunk/content/configuring-datasources.html Sun Jul 10 05:37:04 2011
@@ -0,0 +1,245 @@
+<!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>Configuring DataSources</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="ConfiguringDataSources-ConfiguringDataSourcesinopenejb.xml"></a></p>
+
+<h2>Configuring DataSources in openejb.xml</h2>
+
+<p>The <em><Resource></em> element is used to configure a <em>javax.sql.DataSource</em>. It
+is also used to configure other resources like Timers, Topics, Queues.  We
+will see some examples of using <Resource> to configure a DataSource.</p>
+
+<p>The <Resource> element is designed after @Resource annotation and has
+similar attributes.</p>
+
+<p>For example, this annotation in your bean:</p>
+
+<pre><code>@Resource(name = "myDerbyDatasource", type = javax.sql.DataSource.class)
+</code></pre>
+
+<p>Would map to a Resource declared in your openejb.xml as follows:</p>
+
+<pre><code>&lt;Resource id="myDerbyDatasource" type="javax.sql.DataSource"&gt;
+ . . . .
+&lt;Resource&gt;
+</code></pre>
+
+<p>Note that in the xml element, the <em>type</em> value of <em>javax.sql.DataSource</em>
+can abbreviated to just <em>DataSource</em> as follows:</p>
+
+<pre><code>&lt;Resource id="myDerbyDatasource" type="DataSource"&gt;
+ . . . .
+&lt;Resource&gt;
+</code></pre>
+
+<p>See <a href="containers-and-resources.html">Containers and Resources</a>
+ for a complete list of supported DataSource properties.  See [DataSource Password Encryption]
+ for information on specifying non-plain-text database passwords in your
+openejb.xml file.  See [Common DataSource Configurations]
+ for a list of the commonly used databases and their driver configurations.</p>
+
+<p>You may also need data partitioning per customer or depending on any other
+business criteria. That's also an available feature. See <a href="dynamic-datasource.html">Dynamic Datasource</a>
+ for more details.</p>
+
+<p><a name="ConfiguringDataSources-JNDInamesforconfiguredDataSources"></a></p>
+
+<h2>JNDI names for configured DataSources</h2>
+
+<p><a name="ConfiguringDataSources-Example1"></a></p>
+
+<h3>Example 1</h3>
+
+<pre><code>&lt;Resource id="Default JDBC Database" type="DataSource"&gt;
+   . . . . .
+&lt;/Resource&gt;
+</code></pre>
+
+<p>The global jndi name would be <em>java:openejb/Resource/Default JDBC Database</em></p>
+
+<p><a name="ConfiguringDataSources-Example2"></a></p>
+
+<h3>Example 2</h3>
+
+<pre><code>&lt;Resource id="Derby Database"  type="DataSource"&gt;
+  . . . . .
+&lt;/Resource&gt;
+</code></pre>
+
+<p>The global jndi name would be <em>java:openejb/Resource/Derby Database</em></p>
+
+<p><a name="ConfiguringDataSources-ObtainingaDataSource"></a></p>
+
+<h2>Obtaining a DataSource</h2>
+
+<p>DataSource references in your ejb should get automatically mapped to the
+Resource you declare.  The shortest and easiest rule is that <em>if your
+reference name matches a Resource in your openejb.xml, that's the one you
+get</em>.&nbsp; Essentially, the rules for mapping are as follows.
+1. Name Attribute Match - @Resource with a name attribute matching the
+resource name gets that resource injected
+1. Injected Name Match - variable name matching the resource name gets that 
+resource injected
+1. No Match - nothing matches a resource name, so the first resource
+available gets injected</p>
+
+<p>There are various ways one could obtain a DataSource now.  Lets take an
+example of Derby.</p>
+
+<p>With a Resource declaration in your openejb.xml like this:</p>
+
+<pre><code>&lt;Resource id="myDerbyDatabase"  type="DataSource"&gt;
+  . . . . .
+&lt;/Resource&gt;
+</code></pre>
+
+<p>There are several possible ways to refer to it, as follows.</p>
+
+<p><em>BY matching variable name to resource name</em></p>
+
+<p>{code:java}
+@Stateless
+public class FooBean {
+    @Resource DataSource myDerbyDatabase;
+}</p>
+
+<pre><code>*OR BY matching name*
+
+{code:java}
+@Stateless
+public class FooBean {
+    @Resource(name="myDerbyDatabase")
+    DataSource dataSource;
+}
+</code></pre>
+
+<p><em>OR BY JNDI lookup</em>
+{code:java}
+@Resource(name="myDerbyDatabase", type=javax.sql.DataSource.class)
+@Stateless
+public class FooBean {</p>
+
+<pre><code>public void setSessionContext(SessionContext sessionContext) {
+DataSource dataSource = (DataSource)
+</code></pre>
+
+<p>sessionContext.lookup("myDerbyDatabase");
+    }</p>
+
+<pre><code>public void someOtherMethod() throws Exception {
+InitialContext initialContext = new InitialContext();
+DataSource dataSource = (DataSource)
+</code></pre>
+
+<p>initialContext.lookup("java:comp/env/myDerbyDatabase");
+    }
+}</p>
+
+<pre><code>*OR*
+{code:xml}
+&lt;resource-ref&gt;
+   &lt;res-ref-name&gt;myDerbyDatabase&lt;/res-ref-name&gt;
+   &lt;res-type&gt;javax.sql.DataSource&lt;/res-type&gt;
+ &lt;/resource-ref&gt;
+</code></pre>
+
+<p><em>OR</em></p>
+
+<pre><code>&lt;resource-ref&gt;
+   &lt;res-ref-name&gt;jdbc/myDerbyDatabase&lt;/res-ref-name&gt;
+   &lt;res-type&gt;javax.sql.DataSource&lt;/res-type&gt;
+ &lt;/resource-ref&gt;
+</code></pre>
+
+<p><em>OR</em></p>
+
+<pre><code>&lt;resource-ref&gt;
+   &lt;res-ref-name&gt;someOtherName&lt;/res-ref-name&gt;
+   &lt;res-type&gt;javax.sql.DataSource&lt;/res-type&gt;
+   &lt;mapped-name&gt;myDerbyDatabase&lt;/mapped-name&gt;
+ &lt;/resource-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/configuring-durations.cwiki
==============================================================================
--- websites/staging/openejb/trunk/content/configuring-durations.cwiki (added)
+++ websites/staging/openejb/trunk/content/configuring-durations.cwiki Sun Jul 10 05:37:04 2011
@@ -0,0 +1,52 @@
+The time based configuration properties of containers and beans support plain english, such as:
+
+ - "1 hour" 
+ - "27 minutes"
+ - "10 seconds"
+
+For convenience it is possible to specify a _compound_ form, such as:
+
+ - "3 days and 2 hours"
+ - "1 hour, 45 minutes"
+ - "15 minutes, 23 seconds, and 10 milliseconds"
+
+Abbreviations are accepted as follows:
+
+{code}
+  if (u.equalsIgnoreCase("NANOSECONDS")) return TimeUnit.NANOSECONDS;
+  if (u.equalsIgnoreCase("NANOSECOND")) return TimeUnit.NANOSECONDS;
+  if (u.equalsIgnoreCase("NANOS")) return TimeUnit.NANOSECONDS;
+  if (u.equalsIgnoreCase("NANO")) return TimeUnit.NANOSECONDS;
+  if (u.equalsIgnoreCase("NS")) return TimeUnit.NANOSECONDS;
+
+  if (u.equalsIgnoreCase("MICROSECONDS")) return TimeUnit.MICROSECONDS;
+  if (u.equalsIgnoreCase("MICROSECOND")) return TimeUnit.MICROSECONDS;
+  if (u.equalsIgnoreCase("MICROS")) return TimeUnit.MICROSECONDS;
+  if (u.equalsIgnoreCase("MICRO")) return TimeUnit.MICROSECONDS;
+
+  if (u.equalsIgnoreCase("MILLISECONDS")) return TimeUnit.MILLISECONDS;
+  if (u.equalsIgnoreCase("MILLISECOND")) return TimeUnit.MILLISECONDS;
+  if (u.equalsIgnoreCase("MILLIS")) return TimeUnit.MILLISECONDS;
+  if (u.equalsIgnoreCase("MILLI")) return TimeUnit.MILLISECONDS;
+  if (u.equalsIgnoreCase("MS")) return TimeUnit.MILLISECONDS;
+
+  if (u.equalsIgnoreCase("SECONDS")) return TimeUnit.SECONDS;
+  if (u.equalsIgnoreCase("SECOND")) return TimeUnit.SECONDS;
+  if (u.equalsIgnoreCase("SEC")) return TimeUnit.SECONDS;
+  if (u.equalsIgnoreCase("S")) return TimeUnit.SECONDS;
+
+  if (u.equalsIgnoreCase("MINUTES")) return TimeUnit.MINUTES;
+  if (u.equalsIgnoreCase("MINUTE")) return TimeUnit.MINUTES;
+  if (u.equalsIgnoreCase("MIN")) return TimeUnit.MINUTES;
+  if (u.equalsIgnoreCase("M")) return TimeUnit.MINUTES;
+
+  if (u.equalsIgnoreCase("HOURS")) return TimeUnit.HOURS;
+  if (u.equalsIgnoreCase("HOUR")) return TimeUnit.HOURS;
+  if (u.equalsIgnoreCase("HRS")) return TimeUnit.HOURS;
+  if (u.equalsIgnoreCase("HR")) return TimeUnit.HOURS;
+  if (u.equalsIgnoreCase("H")) return TimeUnit.HOURS;
+
+  if (u.equalsIgnoreCase("DAYS")) return TimeUnit.DAYS;
+  if (u.equalsIgnoreCase("DAY")) return TimeUnit.DAYS;
+  if (u.equalsIgnoreCase("D")) return TimeUnit.DAYS;
+{code}
\ No newline at end of file

Added: websites/staging/openejb/trunk/content/configuring-durations.html
==============================================================================
--- websites/staging/openejb/trunk/content/configuring-durations.html (added)
+++ websites/staging/openejb/trunk/content/configuring-durations.html Sun Jul 10 05:37:04 2011
@@ -0,0 +1,143 @@
+<!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>Configuring Durations</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>The time based configuration properties of containers and beans support
+plain english, such as:</p>
+
+<ul>
+<li>"1 hour" </li>
+<li>"27 minutes"</li>
+<li>"10 seconds"</li>
+</ul>
+
+<p>For convenience it is possible to specify a <em>compound</em> form, such as:</p>
+
+<ul>
+<li>"3 days and 2 hours"</li>
+<li>"1 hour, 45 minutes"</li>
+<li>"15 minutes, 23 seconds, and 10 milliseconds"</li>
+</ul>
+
+<p>Abbreviations are accepted as follows:</p>
+
+<pre><code>  if (u.equalsIgnoreCase("NANOSECONDS")) return TimeUnit.NANOSECONDS;
+  if (u.equalsIgnoreCase("NANOSECOND")) return TimeUnit.NANOSECONDS;
+  if (u.equalsIgnoreCase("NANOS")) return TimeUnit.NANOSECONDS;
+  if (u.equalsIgnoreCase("NANO")) return TimeUnit.NANOSECONDS;
+  if (u.equalsIgnoreCase("NS")) return TimeUnit.NANOSECONDS;
+
+  if (u.equalsIgnoreCase("MICROSECONDS")) return TimeUnit.MICROSECONDS;
+  if (u.equalsIgnoreCase("MICROSECOND")) return TimeUnit.MICROSECONDS;
+  if (u.equalsIgnoreCase("MICROS")) return TimeUnit.MICROSECONDS;
+  if (u.equalsIgnoreCase("MICRO")) return TimeUnit.MICROSECONDS;
+
+  if (u.equalsIgnoreCase("MILLISECONDS")) return TimeUnit.MILLISECONDS;
+  if (u.equalsIgnoreCase("MILLISECOND")) return TimeUnit.MILLISECONDS;
+  if (u.equalsIgnoreCase("MILLIS")) return TimeUnit.MILLISECONDS;
+  if (u.equalsIgnoreCase("MILLI")) return TimeUnit.MILLISECONDS;
+  if (u.equalsIgnoreCase("MS")) return TimeUnit.MILLISECONDS;
+
+  if (u.equalsIgnoreCase("SECONDS")) return TimeUnit.SECONDS;
+  if (u.equalsIgnoreCase("SECOND")) return TimeUnit.SECONDS;
+  if (u.equalsIgnoreCase("SEC")) return TimeUnit.SECONDS;
+  if (u.equalsIgnoreCase("S")) return TimeUnit.SECONDS;
+
+  if (u.equalsIgnoreCase("MINUTES")) return TimeUnit.MINUTES;
+  if (u.equalsIgnoreCase("MINUTE")) return TimeUnit.MINUTES;
+  if (u.equalsIgnoreCase("MIN")) return TimeUnit.MINUTES;
+  if (u.equalsIgnoreCase("M")) return TimeUnit.MINUTES;
+
+  if (u.equalsIgnoreCase("HOURS")) return TimeUnit.HOURS;
+  if (u.equalsIgnoreCase("HOUR")) return TimeUnit.HOURS;
+  if (u.equalsIgnoreCase("HRS")) return TimeUnit.HOURS;
+  if (u.equalsIgnoreCase("HR")) return TimeUnit.HOURS;
+  if (u.equalsIgnoreCase("H")) return TimeUnit.HOURS;
+
+  if (u.equalsIgnoreCase("DAYS")) return TimeUnit.DAYS;
+  if (u.equalsIgnoreCase("DAY")) return TimeUnit.DAYS;
+  if (u.equalsIgnoreCase("D")) return TimeUnit.DAYS;
+</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/configuring-javamail.cwiki
==============================================================================
--- websites/staging/openejb/trunk/content/configuring-javamail.cwiki (added)
+++ websites/staging/openejb/trunk/content/configuring-javamail.cwiki Sun Jul 10 05:37:04 2011
@@ -0,0 +1,30 @@
+h1.  Declaring a JavaMail Resource
+
+The basics are that any properties listed in the <Resource> element are given directly to the javamail provider via javax.mail.Session.getDefaultInstance(Properties props).
+
+Here might be some example properties.
+
+{code:xml|title=openejb.xml}
+<Resource id="SuperbizMail" type="javax.mail.Session">
+   mail.smtp.host=mail.superbiz.org
+   mail.smtp.port=25
+   mail.transport.protocol=smtp
+   mail.smtp.auth=true
+   mail.smtp.user=someuser
+   password=mypassword
+</Resource>
+{code}
+
+You can create as many <Resource> entries like this as you wish, they just have to have a unique 'id'.
+
+{note:whitespace}
+Careful not to add whitespace at the end of your property values.  A java.util.Properties object will leave those in the property values and they will be passed to the JavaMail provider with the whitespace on the end which may cause issues if the provider does not actively trim the values before attempting to use them.
+{note}
+
+h1. Overriding
+
+If you wanted to do a System property or InitialContext property override of the above example mail session, you could do so like this:
+
+java ... -DSuperbizMail.mail.smtp.host=localhost
+
+

Added: websites/staging/openejb/trunk/content/configuring-javamail.html
==============================================================================
--- websites/staging/openejb/trunk/content/configuring-javamail.html (added)
+++ websites/staging/openejb/trunk/content/configuring-javamail.html Sun Jul 10 05:37:04 2011
@@ -0,0 +1,131 @@
+<!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>Configuring JavaMail</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="ConfiguringJavaMail-DeclaringaJavaMailResource"></a></p>
+
+<h1>Declaring a JavaMail Resource</h1>
+
+<p>The basics are that any properties listed in the <Resource> element are
+given directly to the javamail provider via
+javax.mail.Session.getDefaultInstance(Properties props).</p>
+
+<p>Here might be some example properties.</p>
+
+<p>{code:xml|title=openejb.xml}
+<Resource id="SuperbizMail" type="javax.mail.Session">
+   mail.smtp.host=mail.superbiz.org
+   mail.smtp.port=25
+   mail.transport.protocol=smtp
+   mail.smtp.auth=true
+   mail.smtp.user=someuser
+   password=mypassword
+</Resource></p>
+
+<pre><code>You can create as many &lt;Resource&gt; entries like this as you wish, they just
+</code></pre>
+
+<p>have to have a unique 'id'.</p>
+
+<pre><code>{note:whitespace}
+Careful not to add whitespace at the end of your property values.  A
+</code></pre>
+
+<p>java.util.Properties object will leave those in the property values and
+they will be passed to the JavaMail provider with the whitespace on the end
+which may cause issues if the provider does not actively trim the values
+before attempting to use them.
+    {note}</p>
+
+<pre><code>h1. Overriding
+
+If you wanted to do a System property or InitialContext property override
+</code></pre>
+
+<p>of the above example mail session, you could do so like this:</p>
+
+<pre><code>java ... -DSuperbizMail.mail.smtp.host=localhost
+</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/configuring-logging-in-tests.cwiki
==============================================================================
--- websites/staging/openejb/trunk/content/configuring-logging-in-tests.cwiki (added)
+++ websites/staging/openejb/trunk/content/configuring-logging-in-tests.cwiki Sun Jul 10 05:37:04 2011
@@ -0,0 +1,82 @@
+h1. embedded.logging.properties
+
+When in embedded mode OpenEJB uses an embedded.logging.properties file packed in our openejb-core jar which use to configure the logging.  This logging configuration is a bit lighter than the conf/logging.properties file created in a full standalone OpenEJB setup.
+
+When searching for any config file in the classpath, multiple files with the same name may exist.  OpenEJB will always attempt to favor the one closest to the openejb.base variable.  This variable is set by default to the current directory where your vm is executing, which is more than likely the directory of your current module.  So simply adding a file named embedded.logging.properties to your module may be all that you need to specify a new logging configuration for your tests.
+
+Alternatively, you can set "openejb.logger.external" to "true" as a system property (will not work as an InitialContext property).  Then OpenEJB will not attempt to configure logging at all and you can configure logging with Log4j directly using any of its APIs; xml, properties, or code.
+
+There are a couple good reasons for *not* replacing the embedded.logging.properties file.
+
+# If you want to just change 5% of the logging settings, why take control over the other 95% as well.
+# We do occasionally add new logging categories.  If you are not replacing the embedded.logging.properties you will pick these up automatically when you upgrade.
+
+h1. Overriding (recommended)
+
+As mentioned in [Embedded Configuration] much can be done with simple overriding.  The default embedded.logging.properties is quite good and there is really no need to replace it completely if all you want to do is tweak a few values. 
+
+You can also put logging tweaks right in your InitialContext properties like so:
+
+{code}
+Properties p = new Properties();
+p.put(Context.INITIAL_CONTEXT_FACTORY, "org.apache.openejb.client.LocalInitialContextFactory");
+
+p.put("log4j.rootLogger", "fatal,C");
+p.put("log4j.category.OpenEJB", "warn");
+p.put("log4j.category.OpenEJB.options", "info");
+p.put("log4j.category.OpenEJB.server", "info");
+p.put("log4j.category.OpenEJB.startup", "info");
+p.put("log4j.category.OpenEJB.startup.service", "warn");
+p.put("log4j.category.OpenEJB.startup.config", "info");
+p.put("log4j.category.OpenEJB.hsql", "info");
+p.put("log4j.category.CORBA-Adapter", "info");
+p.put("log4j.category.Transaction", "warn");
+p.put("log4j.category.org.apache.activemq", "error");
+p.put("log4j.category.org.apache.geronimo", "error");
+p.put("log4j.category.openjpa", "error");
+p.put("log4j.appender.C", "org.apache.log4j.ConsoleAppender");
+p.put("log4j.appender.C.layout", "org.apache.log4j.SimpleLayout");
+
+Context context = new InitialContext(p);
+{code}
+
+Essentially, everything starting with "log4j." gets applied as overrides on top of the embedded.logging.properties we find in the classpath.  This makes it possible to easily tweak the log levels while debugging a particular test.
+
+Note, that InitialContext properties can also be supplied in a jndi.properties file in the classpath or via system properties. The overriding order is as follows: 1 = highest, 4 = lowest.
+
+# InitialContext properties
+# jndi.properties in classpath
+# system propertes
+# embedded.logging.properties in classpath
+
+By default there are no logging settings in 1-3, so #4 is the only source of logging information.
+
+h1. Default embedded.logging.properties contents
+
+For your purposes, here are the contents of the default embedded.logging.properties file contained in OpenEJB 3.1.1
+
+{code}
+log4j.rootLogger                   = fatal,C
+log4j.category.OpenEJB             = warn
+log4j.category.OpenEJB.server      = info
+log4j.category.OpenEJB.startup     = info
+log4j.category.OpenEJB.startup.service = warn
+log4j.category.OpenEJB.startup.config = info
+log4j.category.OpenEJB.hsql        = info
+log4j.category.CORBA-Adapter       = info
+log4j.category.Transaction         = warn
+log4j.category.org.apache.activemq = error
+log4j.category.org.apache.geronimo = error
+log4j.category.openjpa             = error
+
+log4j.appender.C                   = org.apache.log4j.ConsoleAppender
+log4j.appender.C.layout            = org.apache.log4j.SimpleLayout
+{code}
+
+Here is that file's location in svn as well as all of the previous versions.  Future versions will follow the same pattern.
+
+- [http://svn.apache.org/repos/asf/openejb/tags/openejb-3.1.1/container/openejb-core/src/main/resources/embedded.logging.properties]
+- [http://svn.apache.org/repos/asf/openejb/tags/openejb-3.1/container/openejb-core/src/main/resources/embedded.logging.properties]
+- [http://svn.apache.org/repos/asf/openejb/tags/openejb-3.0/container/openejb-core/src/main/resources/embedded.logging.properties]
+- [http://svn.apache.org/repos/asf/openejb/tags/openejb-3.0-beta-2/container/openejb-core/src/main/resources/embedded.logging.properties]
+- [http://svn.apache.org/repos/asf/openejb/tags/openejb-3.0-beta-1/container/openejb-core/src/main/resources/embedded.logging.properties]

Added: websites/staging/openejb/trunk/content/configuring-logging-in-tests.html
==============================================================================
--- websites/staging/openejb/trunk/content/configuring-logging-in-tests.html (added)
+++ websites/staging/openejb/trunk/content/configuring-logging-in-tests.html Sun Jul 10 05:37:04 2011
@@ -0,0 +1,210 @@
+<!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>Configuring Logging in Tests</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="ConfiguringLogginginTests-embedded.logging.properties"></a></p>
+
+<h1>embedded.logging.properties</h1>
+
+<p>When in embedded mode OpenEJB uses an embedded.logging.properties file
+packed in our openejb-core jar which use to configure the logging.  This
+logging configuration is a bit lighter than the conf/logging.properties
+file created in a full standalone OpenEJB setup.</p>
+
+<p>When searching for any config file in the classpath, multiple files with
+the same name may exist.  OpenEJB will always attempt to favor the one
+closest to the openejb.base variable.  This variable is set by default to
+the current directory where your vm is executing, which is more than likely
+the directory of your current module.  So simply adding a file named
+embedded.logging.properties to your module may be all that you need to
+specify a new logging configuration for your tests.</p>
+
+<p>Alternatively, you can set "openejb.logger.external" to "true" as a system
+property (will not work as an InitialContext property).  Then OpenEJB will
+not attempt to configure logging at all and you can configure logging with
+Log4j directly using any of its APIs; xml, properties, or code.</p>
+
+<p>There are a couple good reasons for <em>not</em> replacing the
+embedded.logging.properties file.</p>
+
+<ol>
+<li>If you want to just change 5% of the logging settings, why take control
+over the other 95% as well.</li>
+<li>We do occasionally add new logging categories.  If you are not replacing
+the embedded.logging.properties you will pick these up automatically when
+you upgrade.</li>
+</ol>
+
+<p><a name="ConfiguringLogginginTests-Overriding(recommended)"></a></p>
+
+<h1>Overriding (recommended)</h1>
+
+<p>As mentioned in <a href="embedded-configuration.html">Embedded Configuration</a>
+ much can be done with simple overriding.  The default
+embedded.logging.properties is quite good and there is really no need to
+replace it completely if all you want to do is tweak a few values. </p>
+
+<p>You can also put logging tweaks right in your InitialContext properties
+like so:</p>
+
+<pre><code>Properties p = new Properties();
+p.put(Context.INITIAL_CONTEXT_FACTORY,
+</code></pre>
+
+<p>"org.apache.openejb.client.LocalInitialContextFactory");</p>
+
+<pre><code>p.put("log4j.rootLogger", "fatal,C");
+p.put("log4j.category.OpenEJB", "warn");
+p.put("log4j.category.OpenEJB.options", "info");
+p.put("log4j.category.OpenEJB.server", "info");
+p.put("log4j.category.OpenEJB.startup", "info");
+p.put("log4j.category.OpenEJB.startup.service", "warn");
+p.put("log4j.category.OpenEJB.startup.config", "info");
+p.put("log4j.category.OpenEJB.hsql", "info");
+p.put("log4j.category.CORBA-Adapter", "info");
+p.put("log4j.category.Transaction", "warn");
+p.put("log4j.category.org.apache.activemq", "error");
+p.put("log4j.category.org.apache.geronimo", "error");
+p.put("log4j.category.openjpa", "error");
+p.put("log4j.appender.C", "org.apache.log4j.ConsoleAppender");
+p.put("log4j.appender.C.layout", "org.apache.log4j.SimpleLayout");
+
+Context context = new InitialContext(p);
+</code></pre>
+
+<p>Essentially, everything starting with "log4j." gets applied as overrides on
+top of the embedded.logging.properties we find in the classpath.  This
+makes it possible to easily tweak the log levels while debugging a
+particular test.</p>
+
+<p>Note, that InitialContext properties can also be supplied in a
+jndi.properties file in the classpath or via system properties. The
+overriding order is as follows: 1 = highest, 4 = lowest.</p>
+
+<ol>
+<li>InitialContext properties</li>
+<li>jndi.properties in classpath</li>
+<li>system propertes</li>
+<li>embedded.logging.properties in classpath</li>
+</ol>
+
+<p>By default there are no logging settings in 1-3, so #4 is the only source
+of logging information.</p>
+
+<p><a name="ConfiguringLogginginTests-Defaultembedded.logging.propertiescontents"></a></p>
+
+<h1>Default embedded.logging.properties contents</h1>
+
+<p>For your purposes, here are the contents of the default
+embedded.logging.properties file contained in OpenEJB 3.1.1</p>
+
+<pre><code>log4j.rootLogger           = fatal,C
+log4j.category.OpenEJB         = warn
+log4j.category.OpenEJB.server      = info
+log4j.category.OpenEJB.startup     = info
+log4j.category.OpenEJB.startup.service = warn
+log4j.category.OpenEJB.startup.config = info
+log4j.category.OpenEJB.hsql    = info
+log4j.category.CORBA-Adapter       = info
+log4j.category.Transaction     = warn
+log4j.category.org.apache.activemq = error
+log4j.category.org.apache.geronimo = error
+log4j.category.openjpa         = error
+
+log4j.appender.C           = org.apache.log4j.ConsoleAppender
+log4j.appender.C.layout        = org.apache.log4j.SimpleLayout
+</code></pre>
+
+<p>Here is that file's location in svn as well as all of the previous
+versions.  Future versions will follow the same pattern.</p>
+
+<ul>
+<li><a href="http://svn.apache.org/repos/asf/openejb/tags/openejb-3.1.1/container/openejb-core/src/main/resources/embedded.logging.properties">http://svn.apache.org/repos/asf/openejb/tags/openejb-3.1.1/container/openejb-core/src/main/resources/embedded.logging.properties</a></li>
+<li><a href="http://svn.apache.org/repos/asf/openejb/tags/openejb-3.1/container/openejb-core/src/main/resources/embedded.logging.properties">http://svn.apache.org/repos/asf/openejb/tags/openejb-3.1/container/openejb-core/src/main/resources/embedded.logging.properties</a></li>
+<li><a href="http://svn.apache.org/repos/asf/openejb/tags/openejb-3.0/container/openejb-core/src/main/resources/embedded.logging.properties">http://svn.apache.org/repos/asf/openejb/tags/openejb-3.0/container/openejb-core/src/main/resources/embedded.logging.properties</a></li>
+<li><a href="http://svn.apache.org/repos/asf/openejb/tags/openejb-3.0-beta-2/container/openejb-core/src/main/resources/embedded.logging.properties">http://svn.apache.org/repos/asf/openejb/tags/openejb-3.0-beta-2/container/openejb-core/src/main/resources/embedded.logging.properties</a></li>
+<li><a href="http://svn.apache.org/repos/asf/openejb/tags/openejb-3.0-beta-1/container/openejb-core/src/main/resources/embedded.logging.properties">http://svn.apache.org/repos/asf/openejb/tags/openejb-3.0-beta-1/container/openejb-core/src/main/resources/embedded.logging.properties</a></li>
+</ul>
+
+        </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/configuring-persistenceunits-in-tests.cwiki
==============================================================================
--- websites/staging/openejb/trunk/content/configuring-persistenceunits-in-tests.cwiki (added)
+++ websites/staging/openejb/trunk/content/configuring-persistenceunits-in-tests.cwiki Sun Jul 10 05:37:04 2011
@@ -0,0 +1,92 @@
+h1. Overriding the persistence.xml
+
+The most common situation in EJB related testing by far is the need to alter your persistence.xml for a test environment.
+
+h2. Overriding the <jta-data-source> and <non-jta-data-source>
+
+OpenEJB will automatically use the DataSources you have setup in your test environment, we're pretty good at guessing the right DataSources you intend even if the names don't match exactly -- or in some cases at all.  If there is only one DataSource configured, it's very easy for us to guess the DataSource to use.
+
+This allows you to keep your persistence.xml configured for your production environment and helps eliminate the need for a "test" persistence.xml (though we do have that functionality).  A log line will be printed saying if we had to adjust the DataSources of your persistence.xml.
+
+h2.  Overriding the persistence-unit <properties>
+
+You can override any property in your test setup via either system properties or the initial context properties.  The format is:
+
+{quote}<unit-name>.<property>=<value>{quote}
+
+So for example with the following persistence.xml:
+
+{code:xml|title=persistence.xml}
+<persistence>
+  <persistence-unit name="movie-unit">
+    <provider>org.hibernate.ejb.HibernatePersistence</provider>
+    <jta-data-source>movieDatabase</jta-data-source>
+    <non-jta-data-source>movieDatabaseUnmanaged</non-jta-data-source>
+    <properties>
+      <property name="hibernate.hbm2ddl.auto" value="create-drop"/>
+      <property name="hibernate.max_fetch_depth" value="3"/>
+    </properties>
+  </persistence-unit>
+</persistence>
+{code}
+
+You can override and add persistence unit properties in your test case.  There are currently no facilities for removing them (if you have a need for that let us know -- it hasn't really come up so far).
+
+{code}
+Properties p = new Properties();
+p.put(Context.INITIAL_CONTEXT_FACTORY,"org.apache.openejb.client.LocalInitialContextFactory");
+
+p.put("movie-unit.hibernate.hbm2ddl.auto", "update");
+p.put("movie-unit.hibernate.dialect", "org.hibernate.dialect.HSQLDialect");
+
+context = new InitialContext(p);
+{code}
+
+The overriding order is as follows: 1 = highest, 4 = lowest.
+
+# InitialContext properties
+# jndi.properties from the classpath
+# System properties
+# persistence.xml properties
+ 
+By default there are no overrides in 1-3, so #4 is the only source of information.  
+
+In the above example there would be exactly three properties for the "movie-unit" persistence unit:
+- hibernate.hbm2ddl.auto = update
+- hibernate.max_fetch_depth = 3
+- hibernate.dialect = org.hibernate.dialect.HSQLDialect
+
+These properties would be passed by OpenEJB directly to the persistence provider (in this case Hibernate).  With one exception OpenEJB does not understand or modify these properties.  Details on that one exception below.
+
+h3.  No need to specify a "transaction lookup" property
+
+All vendors have such a property for getting a reference to the container's TransactionManager and nothing works if this is not set correctly to the OpenEJB specific class.  To make the lives of users easier, OpenEJB will take the liberty of setting it for you.
+
+Here are the persistence provider classes we understand and the defaults we will set for you:
+
+h4. Provider org.hibernate.ejb.HibernatePersistence
+
+When using this provider, the *hibernate.transaction.manager_lookup_class* will be automatically set by OpenEJB to _org.apache.openejb.hibernate.TransactionManagerLookup_.  If the property is already set in the persistence unit it will be overwritten if it starts with the standard "org.hibernate.transaction." prefix.  
+
+Custom lookup implementations will never be overwritten.
+
+h4. Provider oracle.toplink.essentials.PersistenceProvider
+
+Or _oracle.toplink.essentials.ejb.cmp3.EntityManagerFactoryProvider_.
+
+When using this provider, the *toplink.target-server* will be automatically set by OpenEJB to _org.apache.openejb.toplink.JTATransactionController_.  If the property is already set in the persistence unit it will be overwritten if it starts with the standard "oracle.toplink.transaction." prefix.  
+
+Custom transaction controller implementations will never be overwritten.
+
+h4. Provider org.eclipse.persistence.jpa.PersistenceProvider
+
+Or _org.eclipse.persistence.jpa.osgi.PersistenceProvider_.
+
+When using this provider, the *eclipselink.target-server* will be automatically set by OpenEJB to _org.apache.openejb.eclipselink.JTATransactionController_.  If the property is already set in the persistence unit it will be overwritten if it starts with the standard "org.eclipse.persistence.transaction." prefix.  
+
+Custom transaction controller implementations will never be overwritten.
+
+h4. Provider org.apache.openjpa.persistence.PersistenceProviderImpl
+
+OpenJPA is capable of discovering the correct method for locating the TransactionManager without the need for users to specify the specific strategy.  Therefore no specific "magic" is required.
+