In Part 5 I explored persistence settings. The persistence.xml file defines
the context for JPA persistence. In Part 6, we will configure the project
to use Spring framework and generate Spring ORM classes to access the
entities created earlier.
The tasks you will complete in this step are:
Add Spring Facet to project Generate Spring ORM classes Review the Spring
service beans and configuration
Add Spring Facet to project
Right click on the project oepe-jpa-tutorial. Select Properties, click
Project Facets, and check Spring Facet. Click Further configuration.. link.
Select the Spring library that will be used with this project and click
finish to install Spring Facet.
Generate Spring ORM classes
Right click on the project oepe-jpa-tutorial. Select New > Generate Spring
ORM classes
Click Add to add a new Spring ORM service to use the JPA entities. Fill in
the req... (more)
The JPA ORM Generation wizard allows modification of existing O/R mappings
and the creation of new entity associations.
The tasks you will complete in this step are:
Create a new one-to-one association between CUSTOMER and CUSTOMERID Review
generated classes with annotations Add annotations to an existing Java class
Create a new one-to-one association between CUSTOMER and CUSTOMERID
Oracle Enterprise Pack for Eclipse also supports the creation of new entity
associations in case your database lacks foreign key definitions (such as for
performance reasons). It can create Simple Associa... (more)
In Part 1 of this tutorial, I showed how to set up a web project and connect
to a database.
In this step, you will use the Data Source Explorer to browse database
artifacts. You may need to re-open the JPA perspective.
In the Data Source Explorer, expand the nodes inside the New Oracle Database
Connection node. You can view the individual tables and columns. Observe that
the Data Source Explorer denotes which columns have been designated as
primary keys. Note that the tables shown below are stored in the JPATUTORIAL
schema.
While browsing database artifacts, simply expand the tr... (more)
In Part 4 I discussed the Oracle Enterprise Pack for Eclipse and how it
allows you to view, create, and manage JPA entity relationships. The Entity
Editor provides a centralized view of all entity relationships, allows you to
modify entity properties, and allows you to navigate between the object
model, mapping associations, and database schema layers.
In Part 5, I will explore persistence settings. The persistence.xml file
defines the context for JPA persistence. In this step, you will use the JPA
Persistence Configuration Editor to explore the persistence.xml file for your
JPA... (more)
Mixing Open Source and commercial software isn't a new concept. IT
departments have been doing it for years, especially when building out their
core server, networking, and database infrastructures. But using a novel
"blended" application development strategy - one that combines Enterprise
Java APIs and Open Source Java application frameworks - offers the best of
both worlds.
Better Java-based Enterprise Apps with Open Source and Commercial Tools
Many IT organizations already depend on Open Source software for some of
their application development or deployment. But pure Open Sour... (more)