users@glassfish.java.net

Re: EJB, Realms and Remote Clients

From: Witold Szczerba <pljosh.mail_at_gmail.com>
Date: Thu, 24 Dec 2009 19:29:15 +0100

2009/12/24 <glassfish_at_javadesktop.org>:
[...]
> And finally, set the "java.security.auth.login.config" system property with the correct "auth.conf" file path. For example, in the application code (as commented before), or in the java command line:
>
> [code]
> $ java -Djava.security.auth.login.config=./auth.conf -cp $GF_HOME/glassfish/modules/gf-client.jar:TheApplication.jar  TheApplicationMainClassName
> [/code]


If you find it problematic for some extra file to distribute with your
application, you can place the auth.conf file on the classpath and set
the property in runtime using System#setProperty and Class#getResource
combination.
My application is distributed via WebStart and that was not an option
to distribute some extra file manually.