Table of Contents

About

Configuration

A managed class will be included if it is one of the following:

  • Local classes:
    • Local means that the classes are in the deployment unit where the persistence.xml file is packaged.
    • the classes must be annotated with the @Entity annotations
  • Classes in mapping files
  • Explicitly listed classes: the classes are listed as class elements in the persistence.xml file.

A managed class will be excluded if:

  • it's listed in the exclude-unlisted-classes element of the persistence.xml.

Why ? In a certain context, you may want to exclude an entity in order to use it as a transfer object but not as entity.