e16f40b6e91ae7f2aa95a1e24ceba3e79baf211c
[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       <div class="infoMessage"><strong>Note</strong>:
45           This library includes the JSF API (1.2) as a transitive dependency. This is required to 
46           get CDI support working in a Java SE environment. If you are using a different version of 
47           JSF you must exclude this dependency and/or override it. 
48       </div>
49       
50
51       <subsection name="The general JPA test support library">
52         <p>Always include the dependency below: </p>
53         <table>
54           <tr>
55             <th>groupId</th>
56             <th>artifactId</th>
57           </tr>
58           <tr>
59             <td>org.wamblee</td>
60             <td>wamblee-test-enterprise</td>
61           </tr>
62         </table>
63       </subsection>
64
65       <subsection name="JPA implementation-specific library">
66         <p>Choose one from the choices below: </p>
67         <table>
68           <tr>
69             <th>Provider</th>
70             <th>groupId</th>
71             <th>artifactId</th>
72           </tr>
73           <tr>
74             <td>Eclipse link</td>
75             <td>org.wamblee</td>
76             <td>wamblee-test-eclipselink</td>
77           </tr>
78           <tr>
79             <td>Toplink</td>
80             <td>org.wamblee</td>
81             <td>wamblee-test-toplink-essentials</td>
82           </tr>
83           <tr>
84             <td>Hibernate (from 3.4.0.GA and higher).</td>
85             <td>org.wamblee</td>
86             <td>wamblee-test-hibernate</td>
87           </tr>
88         </table>
89       </subsection>
90     </section>
91
92   </body>
93 </document>