O'Reilly logo

Google Web Toolkit 2 Application Development Cookbook by Shamsuddin Ahammad

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Creating a persistence unit

A persistence unit is a collection of properties that are used to manage and persist the entities. Persistence units are defined in the persistence.xml file, where each persistence unit must have a unique name.

The properties included in the persistence unit include the following:

  • A list of the entity classes
  • The library or the persistence provider
  • The data source used for persistent storage of the managed entities
  • The transaction type

Getting ready

Before following this recipe, the database connection jdbc:mysql://localhost:3306/Sales should be created.

How to do it...

  1. Go to File | New File.
  2. Select Sales Processing System from the Project drop-down list.
  3. Select Persistence from the Categories list.
  4. Select Persistence Unit from ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required