-
Bug
-
Resolution: Done
-
Major
-
PLINK_2.6.0.Final
-
None
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(); } }