[jboss-cvs] JBossAS SVN: r60043 - branches/Branch_4_2/testsuite/src/main/org/jboss/test/jacc/test.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Fri Jan 26 21:08:36 EST 2007


Author: scott.stark at jboss.org
Date: 2007-01-26 21:08:36 -0500 (Fri, 26 Jan 2007)
New Revision: 60043

Modified:
   branches/Branch_4_2/testsuite/src/main/org/jboss/test/jacc/test/CallerInRoleUnitTestCase.java
   branches/Branch_4_2/testsuite/src/main/org/jboss/test/jacc/test/EJBSpecUnitTestCase.java
Log:
Fix the setup of the login config for ide usage

Modified: branches/Branch_4_2/testsuite/src/main/org/jboss/test/jacc/test/CallerInRoleUnitTestCase.java
===================================================================
--- branches/Branch_4_2/testsuite/src/main/org/jboss/test/jacc/test/CallerInRoleUnitTestCase.java	2007-01-27 02:08:00 UTC (rev 60042)
+++ branches/Branch_4_2/testsuite/src/main/org/jboss/test/jacc/test/CallerInRoleUnitTestCase.java	2007-01-27 02:08:36 UTC (rev 60043)
@@ -73,14 +73,7 @@
       /* Validate the java.security.auth.login.config setting, and if not
          found, set it to the security/auth.conf classpath resource value.
       */
-      String authConf = System.getProperty("java.security.auth.login.config");
-      if( authConf == null )
-      {
-         String confURL = super.getResourceURL("security/auth.conf");
-         if( confURL == null )
-            throw new IllegalStateException("No java.security.auth.login.config specified and security/auth.conf not found");
-         System.setProperty("java.security.auth.login.config", confURL);
-      }
+      initDefaultLoginConfig();
       String confName = System.getProperty("conf.name", "spec-test");
       AppCallbackHandler handler = new AppCallbackHandler(username, password);
       log.debug("Creating LoginContext("+confName+")");

Modified: branches/Branch_4_2/testsuite/src/main/org/jboss/test/jacc/test/EJBSpecUnitTestCase.java
===================================================================
--- branches/Branch_4_2/testsuite/src/main/org/jboss/test/jacc/test/EJBSpecUnitTestCase.java	2007-01-27 02:08:00 UTC (rev 60042)
+++ branches/Branch_4_2/testsuite/src/main/org/jboss/test/jacc/test/EJBSpecUnitTestCase.java	2007-01-27 02:08:36 UTC (rev 60043)
@@ -94,6 +94,10 @@
          protected void setUp() throws Exception
          {
             super.setUp();
+            /* Validate the java.security.auth.login.config setting, and if not
+               found, set it to the security/auth.conf classpath resource value.
+            */
+            super.initDefaultLoginConfig();
             Configuration.setConfiguration(new XMLLoginConfigImpl());
             redeploy("security-spec.jar");
             flushAuthCache();




More information about the jboss-cvs-commits mailing list