From a48ae7f175655650b8b077236518977767ae63a4 Mon Sep 17 00:00:00 2001 From: Erik Brakkee Date: Mon, 5 Jul 2010 17:46:25 +0000 Subject: [PATCH] --- .../support/jndi/StubInitialContext.java | 7 +- test/enterprise/src/site/xdoc/index.xml | 94 ++++++++++++------- 2 files changed, 67 insertions(+), 34 deletions(-) diff --git a/test/enterprise/src/main/java/org/wamblee/support/jndi/StubInitialContext.java b/test/enterprise/src/main/java/org/wamblee/support/jndi/StubInitialContext.java index d6f90fee..e0fd8079 100644 --- a/test/enterprise/src/main/java/org/wamblee/support/jndi/StubInitialContext.java +++ b/test/enterprise/src/main/java/org/wamblee/support/jndi/StubInitialContext.java @@ -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 bindings = new HashMap(); public StubInitialContext() throws NamingException { diff --git a/test/enterprise/src/site/xdoc/index.xml b/test/enterprise/src/site/xdoc/index.xml index 44fc196b..42e38bc8 100644 --- a/test/enterprise/src/site/xdoc/index.xml +++ b/test/enterprise/src/site/xdoc/index.xml @@ -2,50 +2,78 @@ - + user guide Erik Brakkee -
-

Part of the wamblee.org utilities library are test utilities for Java EE development. - Currently, the following utilities are provided:

+
+

Several utilities are provide for Java EE testing:

    -
  • JPA testing: Simple out of the box unit testing with JPA connecting to an inmemory - database or an external database.
  • -
  • JNDI based test support: In particular mocking JNDI in unit test.
  • +
  • Basic Support
  • +
  • JNDI
  • +
  • JPA
- - - - - - - - - - - - -
- -
-
- +
- - - - - +

To configure your pom, you must configure three dependencies:

+
    +
  • The general JPA test support library.
  • +
  • A JPA implementation-specific library.
  • +
  • The dependency on your specific JPA provider.
  • +
+

The above 'three stage rocket' is necessary because:

+
    +
  • Customizations to the persistence unit for different JPA providers might conflict and + might require additional JPA provider specific dependencies.
  • +
  • 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).
  • +
  • You also want to define your own specific JPA version.
  • +
+ + +

Always include the dependency below:

+ + + + + + + + + +
groupIdartifactId
org.wambleewamblee-test-enterprise
- - + + +

Choose one from the choices below:

+ + + + + + + + + + + + + + + + + + + + + +
ProvidergroupIdartifactId
Eclipse linkorg.wambleewamblee-test-eclipselink
Toplinkorg.wambleewamblee-test-toplink
Hibernate (from 3.4.0.GA and higher).org.wambleewamblee-test-hibernate
- + - -- 2.31.1