geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hogst...@apache.org
Subject svn commit: r409183 - in /geronimo/trunk/modules/directory: project.properties src/test/org/apache/geronimo/directory/RunningTest.java
Date Wed, 24 May 2006 15:02:17 GMT
Author: hogstrom
Date: Wed May 24 08:02:17 2006
New Revision: 409183

URL: http://svn.apache.org/viewvc?rev=409183&view=rev
Log:
See Geronimo-2055 - Externalizes Initial context Factory

Modified:
    geronimo/trunk/modules/directory/project.properties
    geronimo/trunk/modules/directory/src/test/org/apache/geronimo/directory/RunningTest.java

Modified: geronimo/trunk/modules/directory/project.properties
URL: http://svn.apache.org/viewvc/geronimo/trunk/modules/directory/project.properties?rev=409183&r1=409182&r2=409183&view=diff
==============================================================================
--- geronimo/trunk/modules/directory/project.properties (original)
+++ geronimo/trunk/modules/directory/project.properties Wed May 24 08:02:17 2006
@@ -2,7 +2,7 @@
 ## $Rev$ $Date$
 ##
 
-maven.junit.jvmargs=-Djava.endorsed.dirs=${maven.build.dir}/endorsed -ea 
+maven.junit.jvmargs=-Djava.endorsed.dirs=${maven.build.dir}/endorsed -Dinitial.context.factory=com.sun.jndi.ldap.LdapCtxFactory
-ea
 maven.junit.fork=true
 
 # set eclipse project name (used in eclipse plugin V1.11 onwards)

Modified: geronimo/trunk/modules/directory/src/test/org/apache/geronimo/directory/RunningTest.java
URL: http://svn.apache.org/viewvc/geronimo/trunk/modules/directory/src/test/org/apache/geronimo/directory/RunningTest.java?rev=409183&r1=409182&r2=409183&view=diff
==============================================================================
--- geronimo/trunk/modules/directory/src/test/org/apache/geronimo/directory/RunningTest.java
(original)
+++ geronimo/trunk/modules/directory/src/test/org/apache/geronimo/directory/RunningTest.java
Wed May 24 08:02:17 2006
@@ -42,8 +42,10 @@
 
         Hashtable env = new Hashtable();
         env.put(Context.PROVIDER_URL, "ldap://localhost:9389");
+        String ldapContextFactory = System.getProperty("initial.context.factory");
+        if (ldapContextFactory == null) ldapContextFactory = "com.sun.jndi.ldap.LdapCtxFactory";
         env.put(Context.INITIAL_CONTEXT_FACTORY,
-                "com.sun.jndi.ldap.LdapCtxFactory");
+                ldapContextFactory);
         //env.put( Context.SECURITY_AUTHENTICATION, "simple");
         env.put( Context.SECURITY_PRINCIPAL, PRINCIPAL);
         env.put( Context.SECURITY_CREDENTIALS, CREDENTIALS);



Mime
View raw message