A persistence unit in is named scope where we define persistence contextual details such as data source information, a list of entities to include (or exclude), and any other information that may be useful for the persistence provider to work. A persistence unit is identified by a unit name, and is created by defining the following file:
Note that by setting the exclude-unlisted-classes property to false, all entity classes found by the persistence provider inside the WAR deployment file will be included in the context of the persistence unit.