Hey
Rickard �berg wrote:
> > Yes, I tried this variant first. But JNP expects that I return
> > Context, in which JNP performs the second lookup for the rest of the
> > name.
>
> I see. This is workaroundable :-)
>
> I will code it.
Ok, done. Here's how it works. First of all I am now using the "java:"
namespace instead of the default namespace. As noted in earlier post I
expect all server-local JNDI resources to be moved there eventually.
I have created a dynamic context called "java:jaas". If you do this:
new InitialContext().lookup("java:jaas/MySecurity");
you will get a JaasSecurityManager initialized with the name
"MySecurity". The JSM is created on the fly as needed.
For more details, look in the code for JaasSecurityManagerService. It is
non-trivial, but working quite well. There is one limitation (mentioned
in the Javadoc), but normal usage should not discover it..
Oleg, seems ok?
/Rickard
--
Rickard �berg
Email: [EMAIL PROTECTED]
http://www.telkel.com
http://www.jboss.org
http://www.dreambean.com