import javax.transaction.UserTransaction;
import org.wamblee.general.ThreadSpecificProxyFactory;
+import org.wamblee.test.persistence.JpaBuilder;
/**
+ *
+ * <p>
* Simple transaction manager provides a simple mechanism to manage transaction
* in test code through the {@link UserTransaction} object.
+ * To construct the transaction manager use:
+ * </p>
+ * <pre>
+ * SimpleTransactionManager manager =
+ * new SimpleTransactionManager(new DefaultUserTransactionFactory());
+ * </pre>
+ *
+ * <p>
+ * Next, add resources to manage using {@link #addResource(TransactionResource)}:
+ * <pre>
+ * manager.addResource(jpaTester.getJpaBuilder());
+ * </pre>
+ * <p>
+ * As you can see from the above, {@link JpaBuilder} is a resource that can be used
+ * so this mechanism can be used with JPA testing.
+ * </p>
+ *
+ * <p>
+ * The next step is to manage transactions using the standard <code>UserTransaction</code>
+ * APIs:
+ * </p>
+ * <pre>
+ * UserTransaction transaction = manager.getTransaction();
+ * transaction.begin();
+ *
+ * ... do work...
+ *
+ * transaction.commit();
+ * </pre>
*
* @author Erik Brakkee
*