Adding Java Persistence to a Web Application
See Also
If you are creating a web application, you can use the Java Persistence API
to access a relational database and manage persistent data objects.
To work with persistent data, you use the following in your web application:
- Entity classes. Entity classes are used to represent tables in a database.
The Java Persistence API enables you to use entity classes directly in your web application.
For more, see Creating an Entity Class.
- Entity Manager. An entity manager manages the entities and performs database functions.
For more, see Obtaining an Entity Manager.
- Persistence Unit. A persistence unit specifies the data source and which entities are managed by the entity manager.
For more, see Creating a Persistence Unit.
To use the Java Persistence API in your web application, you need to deploy the application to a Java EE container or
add support for Java Persistence to the project or to the container.
For more, see Adding Support for Java Persistence.
- See Also
- About Java Persistence
- Java Persistence Tasks: Quick Reference
- Creating an Entity Class
- Obtaining an Entity Manager
- Creating a Persistence Unit
- Adding Support for Java Persistence
Legal Notices