I have a Delegate that instanciate the corresponding Bean sending credentials (Josso Authentication) through InitialContext as shown here.
At Bean, I've tried to recover Josso Data with SessionContext, as shown below:
@Resource private SessionContext context;
The problem I'm facing is that I couldn't retrieve Josso Data at Bean scope. I've tried "context.getEnvironment()" but this method is deprecated and I didn't find any alternative.
In order to find a solution, I've tried:
context.lookup(JNDI_BEAN_NAME);
context.lookup("java:comp/env/JNDI_BEAN_NAME")
context.lookup("java:comp/env")
But the two first commands only return me the Bean itself and the last one only return me global variables.
What is the correct alternative to "context.getEnvironment()"?