users@glassfish.java.net

Re: Questions about custom ServerAuthModule on httpServlet layer (JSR196)

From: <glassfish_at_javadesktop.org>
Date: Tue, 27 May 2008 07:48:12 PDT

> [b]SAM in EAR[/b]
> > The simplest thing to do would be to bind the
> > provider to your ear, by including a sun-web.xml
> file
> > in your ear, and setting the http-servlet-rpovider
> > attribute in the config file.
>
> As the http-servlet-provider attribute must contains
> a AuthModule ID, if it is not configured in glassfish
> but bundled in my ear, what do I have to write in the
> http-servlet-provider attribute ?
>
> Thanks again Ron
>
> Paul

if you are using the (native) GFAuthConfigProvider, it will find the provider impl class by reading domain.xml. the value of the attribute in sun-web.xml is the id of the provider config in domain.xml. I (beleive) the provider impl class can be packaged in you jar, as long as no attempt is made to load it until your app is deployed. At that time the attribute value will be matched to the provider id, and the provider impl class will be loaded from the application class path.

Ron

ps: as I mentioned above, you could also follow the path of developing a custom AuthConfigProvider and registering it for you app, during the loading of your app. That would be a bit more work (of course).
[Message sent by forum member 'monzillo' (monzillo)]

http://forums.java.net/jive/thread.jspa?messageID=276763