Annotation Type PersistenceUnit


  • @Target({TYPE,FIELD,METHOD,PARAMETER,PACKAGE})
    @Retention(RUNTIME)
    @Documented
    @Qualifier
    @Repeatable(List.class)
    public @interface PersistenceUnit
    This annotation has two different purposes. It is a qualifier used to specify to which persistence unit the injected EntityManagerFactory or EntityManager belongs.

    This allows for regular CDI bean injection of both interfaces.

    It is also used to mark packages as part of a given persistence unit.

    • Field Summary

      Fields 
      Modifier and Type Fields Description
      static String DEFAULT  
    • Required Element Summary

      Required Elements 
      Modifier and Type Required Element Description
      String value  
    • Field Detail

      • DEFAULT

        static final String DEFAULT