An EJB application which call an EJB2 SLSB will fail (randomly) to show the correct user if getCallerPrincipal is used inside. Also the roles are not set.
The EJB2 Bean is secured by ejb-jar.xml so it is not expected that it will be called without role
<assembly-descriptor> <method-permission> <role-name>testRole</role-name> <method> <ejb-name>simpleejb.server.SomeEJB2Bean</ejb-name> <method-intf>Remote</method-intf> <method-name>*</method-name> </method> </method-permission>
This error is constant seen if the server is up and running but each restart will change the behaviour randomly.
Note that an EJB3 bean of the same EAR file will work always correctly.
- clones
-
WFLY-12301 CallerPrincipal will be anonymous (randomly) if EJB2 is called
- Closed