This tutorial shows you how to add JPA support to a dynamic Web
project and then use JPA tools to create and configure entity beans from database
tables.
This tutorial
might require some optionally installable components. To ensure that
you installed the appropriate optional components, see the System
requirements list.
This
tutorial is divided into several exercises that must be completed in sequence
for the tutorial to work properly
Learning objectives
In this tutorial, you
will learn how to do the following things:
- Add JPA support to a dynamic Web project
- Create a connection to a database
- Create JPA entity beans from database tables
- Add primary keys to entity beans
- Configure a runtime database connection
- Create JPA manager beans for entity beans
Time required
This tutorial should take approximately
30 minutes to finish. If you explore other concepts related to this tutorial,
it could take longer to complete.
Skill level
Intermediate
Audience
This tutorial is intended for users who
want to become familiar with the some of the JPA tools provided in this product.
System requirements
To complete this tutorial,
you need to have the following things:
- The WebSphere® Application
Server, Version 7.0 Test Environment installed. You can also complete
and run the tutorial on WebSphere Application Server, Version 6.1 Test Environment
with the Feature Pack for EJB 3.0 installed.
- A clean workspace.
To use this tutorial, you must have an application
server installed and configured. To verify that a server runtime environment
is available, click , expand Server,
and then click Runtime Environments. You can
use this pane to add, remove, or edit installed server runtime definitions.
You can also download and install support for a new server.