Uploaded image for project: 'PicketLink'
  1. PicketLink
  2. PLINK-574

The @PicketLink annotation should include PARAMETER target element type

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Major
    • PLINK_2.7.0.Beta2
    • PLINK_2.6.0.Final
    • BASE
    • None

    Description

      The @PicketLink qualifier annotation currently only has the following ElementType targets:

      @Target({ElementType.TYPE, ElementType.FIELD, ElementType.METHOD})
      

      It should also include at least PARAMETER, since that's one more place where a CDI qualifier can be used.

      One possible use case: when producing an EntityManager, as the reference suggests:

      @Produces
      @PicketLink
      @PersistenceContext
      private EntityManager picketLinkEntityManager(unitName = "picketlink");
      

      it is common practice to include a disposer, but it's currently not possible due to this issue:

      public void dispose(@Disposes @PicketLink EntityManager entityManager) {
          if (entityManager.isOpen()) {
              entityManager.close();
          }
      }
      

      Attachments

        Activity

          People

            psilva@redhat.com Pedro Igor Craveiro
            rsmeral Ron Šmeral (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: