How can I reflect <role-link> as an annotation in EJB 3
-
29-04-2021 - |
Domanda
I try migrate an EJB2.1 projetk into EJB3.1. I did not find any annotation for . How can i reflect this tag.
The ejb-jar.xml part looks like:
<security-role-ref>
<role-name>admin</role-name>
<role-link>adm_role</role-link>
</security-role-ref>
Soluzione
There is no separate annotation, linking security role reference to security role can be done only in deployment descriptor (as in your ejb.jar.xml fragment). This is explained in details at chapter 17.3.3 in EJB 3.1 specification and there is no word about doing it via annotations.
Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow