djencks wrote:
>
>
> Geronimo uses the AccessControlContext for the Subject to evaluate
> security decisions. So, you need to get Geronimo to compute and store
> this ACC for you.
> [..]
>
Well, the methodname pushNextCaller suggests that it would do that. Anyway,
with the code below it works now.
This code should be in Geronimo itself, I created GERONIMO-4765.
Thanks,
Jürgen
SimpleCallbackHandler handler = new SimpleCallbackHandler(
user, password.toCharArray());
LoginContext lc = new LoginContext("geronimo-admin", handler);
lc.login();
Subject subject = lc.getSubject();
System.out.println("lc.getSubject: " + subject);
ContextManager.registerSubject(subject);
Callers oldCallers = ContextManager.pushNextCaller(subject);
try
{
s1 = secured3Bean.secureMethod(input);
}
finally
{
ContextManager.popCallers(oldCallers);
}
--
View this message in context:
http://www.nabble.com/NPE-in-ContextManager.getCurrentContext-tp24645453s134p24665808.html
Sent from the Apache Geronimo - Users mailing list archive at Nabble.com.