O'Reilly logo

Core Java™ Data Objects by Heiko Bobzin, Michael Vorburger, Keiron McCammon, Sameer Tyagi

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

15.3. Use-case Package

This package contains the implementation of the application use-cases. It uses an abstract base class based on the command pattern that implements common methods for all transactions and defines an abstract execute method. Each use-case class extends this abstract class and implements the execute method.

15.3.1. AbstractUserCase class

The base class for the use-cases implements the basic methods to get the PersistenceManagerFactory and PersistenceManager instances, begin and commit transactions, and handle exceptions.

15.3.1.1. PerstistenceManagerFactory bootstrapping

As shown in earlier chapters, PersistenceManagerFactory bootstrapping can be done using a singleton pattern and reading properties from a file to avoid hard ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required