![]() |
![]() |
![]() |
![]() |
With BEA Workshop Studio ORM Workbench you can create a persistence layer that uses the Enterprise JavaBeans (EJB) 3.0 standard Java Persistence API (JPA). The ORM Workbench includes tools to generate entities, while Workshop Studio includes two provider implementations of persistence tools: BEA Kodo (JPA) and an implementation that is part of the open source Hibernate project. You can use either of these or supply your own provider.
This documentation describes how to use the ORM Workbench to generate and edit JPA persistence entities.
In EJB version 3.0, the role of entity beans is played by JPA persistence entities. These persistence entities differ quite a bit from previous entity beans in ways designed to simplify the programming model, and the ORM Workbench toolset in Workshop Studio is designed to help you make the most of these changes. Key features of the JPA specification include:
The Workshop Studio ORM Workbench includes tools that greatly ease the tasks associated with creating a persistence layer using EJB 3.0. These tasks include:
You can view and change the source for persisted data — such as a relational database — using tools such as the DbXplorer and DbXaminer. For more information, see Exploring Databases with the DbXplorer.
You can generate new entity sources or annotate existing classes. See Generating JPA Mappings for more information.
With entities in your project, you can edit their relationships using the Entities Editor. See Managing EJB3 Entities with the Entities Editor for more information.
Workshop Studio provides an editing interface for the persistence.xml file. See Configuring JPA Properties for more information.
You can use the DbXaminer to create and edit query expressions, ensuring that they achieve results you want before using them in code. For more information, see Viewing Database Diagrams and Running Queries.
Starting out with a web application project, you can create a persistence layer with Workshop Studio using the following high-level steps:
Annotate your Java source files so that they are mapped to the database.
Add your existing entity source code to the project, add a connection to the database, then use the Entities Editor to map entities to the database schema.
Managing EJB3 Entity Relationships
![]() ![]() |