directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From szoer...@apache.org
Subject svn commit: r778215 - /directory/sandbox/szoerner/apacheds-tomcatrealm/src/main/java/org/apache/directory/tomcatrealm/EmbeddedApacheDsRealm.java
Date Sun, 24 May 2009 18:59:17 GMT
Author: szoerner
Date: Sun May 24 18:59:17 2009
New Revision: 778215

URL: http://svn.apache.org/viewvc?rev=778215&view=rev
Log:
Use an appropriate working directory

Modified:
    directory/sandbox/szoerner/apacheds-tomcatrealm/src/main/java/org/apache/directory/tomcatrealm/EmbeddedApacheDsRealm.java

Modified: directory/sandbox/szoerner/apacheds-tomcatrealm/src/main/java/org/apache/directory/tomcatrealm/EmbeddedApacheDsRealm.java
URL: http://svn.apache.org/viewvc/directory/sandbox/szoerner/apacheds-tomcatrealm/src/main/java/org/apache/directory/tomcatrealm/EmbeddedApacheDsRealm.java?rev=778215&r1=778214&r2=778215&view=diff
==============================================================================
--- directory/sandbox/szoerner/apacheds-tomcatrealm/src/main/java/org/apache/directory/tomcatrealm/EmbeddedApacheDsRealm.java
(original)
+++ directory/sandbox/szoerner/apacheds-tomcatrealm/src/main/java/org/apache/directory/tomcatrealm/EmbeddedApacheDsRealm.java
Sun May 24 18:59:17 2009
@@ -20,6 +20,7 @@
 package org.apache.directory.tomcatrealm;
 
 
+import java.io.File;
 import java.security.Principal;
 import java.text.MessageFormat;
 import java.text.ParseException;
@@ -67,6 +68,7 @@
 
     public static final String DEFAULT_GROUP_SEARCH_BASE = "ou=system";
 
+    /* Default port the embedded ApacheDS will listen to via LDAP */
     public static final int DEFAULT_LDAP_PORT = 10389;
 
     private DirectoryService directoryService;
@@ -115,6 +117,14 @@
 
             // Determine an appropriate working directory
             // ??
+            String catalinaHome = System.getProperty( "catalina.home" );
+            String workingDir = catalinaHome+File.separator+"apacheDsWorkingDir";
+            
+            log.debug( "Working Dir = " +workingDir);
+            
+            directoryService.setWorkingDirectory( new File(workingDir) );
+            
+
 
             directoryService.startup();
             ldapService.start();
@@ -195,36 +205,67 @@
     }
 
 
+    /**
+     * Gets the search base used for user searches.
+     *  
+     * @return the DN of the user search base
+     */
     public String getUserSearchBase()
     {
         return userSearchBase;
     }
 
 
+    /**
+     * Sets the search base used for user searches.
+     *  
+     * @param groupSearchBase the DN of the user search base
+     */
     public void setUserSearchBase( String userSearchBase )
     {
         this.userSearchBase = userSearchBase;
     }
 
 
+    /**
+     * Gets the search base used for group searches.
+     *  
+     * @return the DN of the group search base
+     */
     public String getGroupSearchBase()
     {
         return groupSearchBase;
     }
 
 
+    /**
+     * Sets the search base used for group searches.
+     *  
+     * @param groupSearchBase the DN of the group search base
+     */
     public void setGroupSearchBase( String groupSearchBase )
     {
         this.groupSearchBase = groupSearchBase;
     }
 
 
+    /**
+     * Gets the port number ApacheDS will listen to via LDAP.
+     * 
+     * @return the LDAP port
+     */
     public int getLdapPort()
     {
-        return ldapPort;
+        return this.ldapPort;
     }
 
 
+    /**
+     * Sets the port number ApacheDS will listen to via LDAP. #
+     * Defaults to 10389.
+     * 
+     * @param ldapPort the LDAP port
+     */
     public void setLdapPort( int ldapPort )
     {
         this.ldapPort = ldapPort;



Mime
View raw message