Home
Persistence using the Java Persistence API (JPA)
In this chapter, we create the JPA entities that coordinate and mediate access with the ITSOBANK database. We can use either the Derby or the DB2 database to create the matching JPA entities (Customer, Account, and Transaction) in a bottom-up scenario. After we have the entities, we can connect the entity model to any of the two databases by using a JNDI data source in the server.
To illustrate the JPA tooling, we use the Derby database to create the entities.
Finally, we add inheritance to the entity model by introducing Credit and Debit subclasses of the Transaction entity.
The sample code for this chapter is in 7672code\jpa.
ibm.com/redbooks