6cfc8334f87dfe72bbb9aa184962848009cb428a
[utils] / test / enterprise / src / site / xdoc / index.xml
1 <?xml version="1.0"?>
2 <document xmlns="http://maven.apache.org/XDOC/2.0"
3   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4   xsi:schemaLocation="http://maven.apache.org/XDOC/2.0 http://maven.apache.org/xsd/xdoc-2.0.xsd">
5
6   <properties>
7     <title>user guide</title>
8     <author email="erik@brakkee.org">Erik Brakkee</author>
9   </properties>
10   <body>
11     <section name="Introduction">
12       <p>Several utilities are provide for Java EE testing: </p>
13       <ul>
14         <li><a href="apidocs/org/wamblee/test/inject/package-summary.html">inject</a>: general
15           dependency injection in unit test. </li>
16         <li><a href="apidocs/org/wamblee/test/cdi/package-summary.html">cdi</a>: CDI dependency
17           injection in unit test. </li>
18         <li><a href="apidocs/org/wamblee/test/transactions/package-summary.html">transactions</a>:
19           Transaction support in unit test. </li>
20         <li><a href="apidocs/org/wamblee/test/jndi/package-summary.html">jndi</a>: JNDI support in
21           unit test.</li>
22         <li><a href="apidocs/org/wamblee/test/persistence/package-summary.html">persistence</a>: JPA
23           support in unit test. </li>
24       </ul>
25     </section>
26
27     <section name="Maven POM configuration">
28       <p>To configure your pom, you must configure three dependencies: </p>
29       <ul>
30         <li>The general JPA test support library.</li>
31         <li>A JPA implementation-specific library.</li>
32         <li>The dependency on your specific JPA provider.</li>
33       </ul>
34       <p> The above 'three stage rocket' is necessary because: </p>
35       <ul>
36         <li>Customizations to the persistence unit for different JPA providers might conflict and
37           might require additional JPA provider specific dependencies.</li>
38         <li>Different JPA providers can, in general, not be used within the same application. (an
39           exception is of course an OSGI environment when JPA is used as per the OSGI enterprise
40           spec). </li>
41         <li>The specific JPA implementation and version to use <em>must</em> be determined by you
42           and not by the test support library. </li>
43       </ul>
44
45       <subsection name="The general JPA test support library">
46         <p>Always include the dependency below: </p>
47         <table>
48           <tr>
49             <th>groupId</th>
50             <th>artifactId</th>
51           </tr>
52           <tr>
53             <td>org.wamblee</td>
54             <td>wamblee-test-enterprise</td>
55           </tr>
56         </table>
57       </subsection>
58
59       <subsection name="JPA implementation-specific library">
60         <p>Choose one from the choices below: </p>
61         <table>
62           <tr>
63             <th>Provider</th>
64             <th>groupId</th>
65             <th>artifactId</th>
66           </tr>
67           <tr>
68             <td>Eclipse link</td>
69             <td>org.wamblee</td>
70             <td>wamblee-test-eclipselink</td>
71           </tr>
72           <tr>
73             <td>Toplink</td>
74             <td>org.wamblee</td>
75             <td>wamblee-test-toplink-essentials</td>
76           </tr>
77           <tr>
78             <td>Hibernate (from 3.4.0.GA and higher).</td>
79             <td>org.wamblee</td>
80             <td>wamblee-test-hibernate</td>
81           </tr>
82         </table>
83       </subsection>
84     </section>
85
86   </body>
87 </document>