users@glassfish.java.net

Re: AppClient with JAAS

From: <glassfish_at_javadesktop.org>
Date: Tue, 07 Sep 2010 04:52:58 PDT

The <as-context> element under ior-security-config (sun-ejb-jar.xml) can specify a realm. If that realm is specified then that is the realm which will be used for authentication on the server (it will override any realm that was specified during client side programmatic login)

http://docs.sun.com/app/docs/doc/820-4502/beaqw?l=en&a=view

But when you do not have a realm specified then GlassFish tries to use the realm that was specified as part of ProgrammaticLogin. If No realm was specified for ProgrammaticLogin on the client side then the default realm is used.

public java.lang.Boolean login(String user, String password,
    String realm, boolean errors) throws java.lang.Exception

http://docs.sun.com/app/docs/doc/819-4721/beacp?l=en&a=view

hope this clarifies.
[Message sent by forum member 'kumarjayanti']

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