users@glassfish.java.net

problem with custom login.conf location for embedded Glassfish v3

From: <glassfish_at_javadesktop.org>
Date: Tue, 13 Apr 2010 06:50:28 PDT

Hello.

I'm using embedded Glassfish with Maven to run CI and functional tests for our webapps. The problem is, i cannot get it to work with our custom authentication module, as it needs an entry in login.conf file. Glassfish seems to ignore all my attempts to set login.conf location and always uses the one from the distribution jar.

So far i've tried modifying my domain.xml file to include:
             <jvm-options>-Djava.security.auth.login.config=/path/to/test/login.conf</jvm-options>

and also specifying -Djava.security.auth.login.config=/path/to/test/login.conf manually on maven command line . Neither seems to have any effect and my tests still fail because Glassfish can't find my custom LoginModule.

When i manually take apart the distribution jar and replace the login.conf inside, everything works.

Is it a bug in Glassfish or am i doing it wrong?
[Message sent by forum member 'tanel3']

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