(no commit message)
authorErik Brakkee <erik@brakkee.org>
Mon, 5 Jul 2010 17:46:25 +0000 (17:46 +0000)
committerErik Brakkee <erik@brakkee.org>
Mon, 5 Jul 2010 17:46:25 +0000 (17:46 +0000)
test/enterprise/src/main/java/org/wamblee/support/jndi/StubInitialContext.java
test/enterprise/src/site/xdoc/index.xml

index d6f90fee5b384ca5c500d69e94bbeb45e236109a..e0fd8079fb8919e5d82a0ab6ff511747260f9149 100644 (file)
@@ -23,7 +23,12 @@ import javax.naming.Name;
 import javax.naming.NameNotFoundException;
 import javax.naming.NamingException;
 
-public class StubInitialContext extends InitialContext {
+/**
+ * Initial context implementation. 
+ * 
+ * @author Erik Brakkee
+ */
+class StubInitialContext extends InitialContext {
     private Map<String, Object> bindings = new HashMap<String, Object>();
 
     public StubInitialContext() throws NamingException {
index 44fc196b604781bf625a1f363cd8b2e2d955a315..42e38bc85060373c5ca69ebec772406f25a19dc6 100644 (file)
@@ -2,50 +2,78 @@
 <document xmlns="http://maven.apache.org/XDOC/2.0"
   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
   xsi:schemaLocation="http://maven.apache.org/XDOC/2.0 http://maven.apache.org/xsd/xdoc-2.0.xsd">
-  
+
   <properties>
     <title>user guide</title>
     <author email="erik@brakkee.org">Erik Brakkee</author>
   </properties>
   <body>
-    <section name="JPA Testing">
-      <p>Part of the wamblee.org utilities library are test utilities for Java EE development.
-        Currently, the following utilities are provided:</p>
+    <section name="Introduction">
+      <p>Several utilities are provide for Java EE testing: </p>
       <ul>
-        <li>JPA testing: Simple out of the box unit testing with JPA connecting to an inmemory
-          database or an external database. </li>
-        <li>JNDI based test support: In particular mocking JNDI in unit test.</li>
+        <li><a href="apidocs/org/wamblee/support/package-summary.html">Basic Support</a></li>
+        <li><a href="apidocs/org/wamblee/support/jndi/package-summary.html">JNDI</a></li>
+        <li><a href="apidocs/org/wamblee/support/persistence/package-summary.html">JPA</a></li>
       </ul>
-      <subsection name="Basic JPA support">
-        
-      </subsection>
-      <subsection name="Testing a service">
-        
-      </subsection>
-      <subsection name="Using JDBC">
-      </subsection>
-      
-      <subsection name="Using DBUnit">
-        
-      </subsection>
-    </section>
-    
-    <section name="JNDI mocking">
-      
     </section>
-    
+
     <section name="Maven POM configuration">
-      <subsection name="Eclipselink">
-        
-      </subsection>
-      <subsection name="Hibernate">
-        
+      <p>To configure your pom, you must configure three dependencies: </p>
+      <ul>
+        <li>The general JPA test support library.</li>
+        <li>A JPA implementation-specific library.</li>
+        <li>The dependency on your specific JPA provider.</li>
+      </ul>
+      <p> The above 'three stage rocket' is necessary because: </p>
+      <ul>
+        <li>Customizations to the persistence unit for different JPA providers might conflict and
+          might require additional JPA provider specific dependencies.</li>
+        <li>Different JPA providers can, in general, not be used within the same application. (an
+          exception is of course an OSGI environment when JPA is used as per the OSGI enterprise
+          spec). </li>
+        <li>You also want to define your own specific JPA version. </li>
+      </ul>
+      
+      <subsection name="The general JPA test support library">
+        <p>Always include the dependency below: </p>
+        <table>
+          <tr>
+            <th>groupId</th>
+            <th>artifactId</th>
+          </tr>
+          <tr>
+            <td>org.wamblee</td>
+            <td>wamblee-test-enterprise</td>
+          </tr>
+        </table>
       </subsection>
-      <subsection name="Toplink essentials">
-        
+      
+      <subsection name="JPA implementation-specific library">
+        <p>Choose one from the choices below: </p>
+        <table>
+          <tr>
+            <th>Provider</th>
+            <th>groupId</th>
+            <th>artifactId</th>
+          </tr>
+          <tr>
+            <td>Eclipse link</td>
+            <td>org.wamblee</td>
+            <td>wamblee-test-eclipselink</td>
+          </tr>
+          <tr>
+            <td>Toplink</td>
+            <td>org.wamblee</td>
+            <td>wamblee-test-toplink</td>
+          </tr>
+          <tr>
+            <td>Hibernate (from 3.4.0.GA and higher).</td>
+            <td>org.wamblee</td>
+            <td>wamblee-test-hibernate</td>
+          </tr>
+        </table>
       </subsection>
     </section>
-    
+
   </body>
 </document>
-