The methods getCallerIdentity(), getEnvironment(), and isCallerRole(java.security.Identity) methods from the javax.ejb.EJBContext class have been removed.
The getMessageContext() method from the javax.ejb.SessionContext class has also been removed.
Replace the getCallerIdentity() method with the getCallerPrincipal() method. Instead of using the getEnvironment() method, use the JNDI naming context java:comp/env to access the enterprise bean's environment.
Replace the isCallerRole(java.security.Identity) method with the isCallerInRole(java.lang.String) method.
There is no replacement for the getMessageContext() method because JAX-RPC is not supported in Jakarta EE9.
For further information, see Jakarta EE 9.1 support and configurable response headers in Open Liberty 21.0.0.12.