GreenPages’ middle-tier provides implementations of the Directory and Listing
interfaces that can be used by the Web bundle.
The implementation will use EclipseLink JPA to access a database via a DataSource published in the
OSGi service registry.
The GreenPages application uses a very simple database that contains a single table.
The table, named LISTING, consists of four columns:
LISTING_NUMBER | FIRST_NAME | LAST_NAME | EMAIL_ADDRESS |
Scripts are provided with the sample source code (in $GREENPAGES_HOME/db) to start, create, and populate the database.
These will be used during the creation of the middle tier.
The middle tier will provide JPA-based implementations of the Directory and Listing interfaces with the four
attributes of a Listing (first name, last name, email address, and id) being mapped to the corresponding columns in the
LISTING.
JPA will be used to implement the queries that search the database and return Listings.