GreenPages’ middle-tier provides implementations of the
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:
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
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
JPA will be used to implement the queries that search the database and return