geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From djen...@apache.org
Subject svn commit: r563580 [1/3] - in /geronimo/plugins/directory: ./ trunk/ trunk/directory/ trunk/directory/src/main/resources/META-INF/ trunk/directory/src/plan/ trunk/geronimo-directory/ trunk/geronimo-directory/src/main/java/org/apache/geronimo/directory...
Date Tue, 07 Aug 2007 17:34:28 GMT
Author: djencks
Date: Tue Aug  7 10:34:27 2007
New Revision: 563580

URL: http://svn.apache.org/viewvc?view=rev&rev=563580
Log:
GERONIMO-3340 beginnings of a directory plugin.  Works for me but probably relies on my local modifications

Added:
    geronimo/plugins/directory/
    geronimo/plugins/directory/trunk/
    geronimo/plugins/directory/trunk/directory/
      - copied from r563259, geronimo/server/trunk/configs/directory/
    geronimo/plugins/directory/trunk/directory/src/main/resources/META-INF/server.xml   (with props)
    geronimo/plugins/directory/trunk/geronimo-directory/
      - copied from r563259, geronimo/server/trunk/modules/geronimo-directory/
    geronimo/plugins/directory/trunk/geronimo-directory/src/test/resources/server.xml   (with props)
    geronimo/plugins/directory/trunk/pom.xml
      - copied, changed from r563259, geronimo/server/trunk/pom.xml
Removed:
    geronimo/plugins/directory/trunk/geronimo-directory/src/main/java/org/apache/geronimo/directory/DirectoryConfigurator.java
    geronimo/plugins/directory/trunk/geronimo-directory/src/main/java/org/apache/geronimo/directory/MutableServerStartupConfiguration.java
    geronimo/plugins/directory/trunk/geronimo-directory/src/main/java/org/apache/geronimo/directory/ServerContextFactory.java
    geronimo/plugins/directory/trunk/geronimo-directory/src/main/java/org/apache/geronimo/directory/ServerStartupConfiguration.java
    geronimo/plugins/directory/trunk/geronimo-directory/src/main/schema/
    geronimo/plugins/directory/trunk/geronimo-directory/src/test/resources/directory.xml
Modified:
    geronimo/plugins/directory/trunk/directory/pom.xml
    geronimo/plugins/directory/trunk/directory/src/main/resources/META-INF/geronimo-plugin.xml
    geronimo/plugins/directory/trunk/directory/src/plan/plan.xml
    geronimo/plugins/directory/trunk/geronimo-directory/pom.xml
    geronimo/plugins/directory/trunk/geronimo-directory/src/main/java/org/apache/geronimo/directory/DirectoryGBean.java
    geronimo/plugins/directory/trunk/geronimo-directory/src/main/resources/META-INF/geronimo-dependency.xml
    geronimo/plugins/directory/trunk/geronimo-directory/src/test/java/org/apache/geronimo/directory/RunningTest.java

Modified: geronimo/plugins/directory/trunk/directory/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/plugins/directory/trunk/directory/pom.xml?view=diff&rev=563580&r1=563259&r2=563580
==============================================================================
--- geronimo/plugins/directory/trunk/directory/pom.xml (original)
+++ geronimo/plugins/directory/trunk/directory/pom.xml Tue Aug  7 10:34:27 2007
@@ -23,14 +23,14 @@
     <modelVersion>4.0.0</modelVersion>
     
     <parent>
-        <groupId>org.apache.geronimo.configs</groupId>
-        <artifactId>configs</artifactId>
-        <version>2.1-SNAPSHOT</version>
+        <groupId>org.apache.geronimo.plugins</groupId>
+        <artifactId>directory-parent</artifactId>
+        <version>2.0-SNAPSHOT</version>
         <relativePath>../pom.xml</relativePath>
     </parent>
 
     <artifactId>directory</artifactId>
-    <name>Geronimo Configs :: Directory</name>
+    <name>Geronimo Plugins :: Directory</name>
     <packaging>car</packaging>
     
     <dependencies>
@@ -38,19 +38,52 @@
         <dependency>
             <groupId>org.apache.geronimo.configs</groupId>
             <artifactId>j2ee-server</artifactId>
-            <version>${version}</version>
             <type>car</type>
         </dependency>
 
         <dependency>
-            <groupId>org.apache.geronimo.modules</groupId>
+            <groupId>org.apache.geronimo.plugins</groupId>
             <artifactId>geronimo-directory</artifactId>
             <version>${version}</version>
         </dependency>
         
     </dependencies>
+
+    <properties>
+        <!-- This property is required by the car:package mojo -->
+        <geronimoVersion>${version}</geronimoVersion>
+    </properties>
     
     <build>
+        <!--
+
+        NOTE: Don't add to extentions here, or JCL will freak out about multipule versions.
+
+        <extensions>
+            <extension>
+                <groupId>org.apache.geronimo.plugins</groupId>
+                <artifactId>car-maven-plugin</artifactId>
+                <version>${version}</version>
+            </extension>
+        </extensions>
+        -->
+
+        <plugins>
+            <plugin>
+                <groupId>org.apache.geronimo.plugins</groupId>
+                <artifactId>car-maven-plugin</artifactId>
+
+                <!-- Install as extention to allow 'car' packaging to be used. -->
+                <extensions>true</extensions>
+
+                <configuration>
+                    <archive>
+                        <!-- Do not include META-INF/maven to avoid long file problems on windows -->
+                        <addMavenDescriptor>false</addMavenDescriptor>
+                    </archive>
+                </configuration>
+            </plugin>
+        </plugins>
         <resources>
             <resource>
                 <directory>${pom.basedir}/src/main/resources</directory>

Modified: geronimo/plugins/directory/trunk/directory/src/main/resources/META-INF/geronimo-plugin.xml
URL: http://svn.apache.org/viewvc/geronimo/plugins/directory/trunk/directory/src/main/resources/META-INF/geronimo-plugin.xml?view=diff&rev=563580&r1=563259&r2=563580
==============================================================================
--- geronimo/plugins/directory/trunk/directory/src/main/resources/META-INF/geronimo-plugin.xml (original)
+++ geronimo/plugins/directory/trunk/directory/src/main/resources/META-INF/geronimo-plugin.xml Tue Aug  7 10:34:27 2007
@@ -19,9 +19,9 @@
 <!-- $Rev$ $Date$ -->
 
 <geronimo-plugin xmlns="http://geronimo.apache.org/xml/ns/plugins-1.2">
-    <name>Apache Directory 0.92 for Geronimo</name>
+    <name>Apache Directory 1.5.1-SNAPSHOT for Geronimo</name>
     <module-id>${pom.groupId}/${pom.artifactId}/${version}/car</module-id>
-    <category>Security</category>
+    <category>LDAP</category>
     <description>
         This plugin integrates the Apache Directory Server (ApacheDS)
         LDAP server with Geronimo.  That means that Geronimo will run
@@ -30,10 +30,6 @@
         for other purposes by Geronimo applications or by remote
         applications.
           
-        This plugin does not presently include any tools for managing
-        or inspecting the LDAP server, though Geronimo itself includes
-        a security realm that works with LDAP.
-          
         For more information on the ApacheDS project, see
         http://directory.apache.org/subprojects/apacheds/index.html
     </description>
@@ -41,17 +37,24 @@
     <author>The Apache Geronimo development community</author>
     <license osi-approved="true">BSD -- Apache Software License (ASL) 2.0</license>
     <geronimo-versions>
-    	<version>${version}</version> 
+    	<version>2.0</version>
+    </geronimo-versions>
+    <geronimo-versions>
+    	<version>2.0-SNAPSHOT</version>
+    </geronimo-versions>
+    <geronimo-versions>
+    	<version>2.1-SNAPSHOT</version> 
     </geronimo-versions>
     <dependency>org.apache.geronimo.configs/j2ee-server//car</dependency>
-    <dependency>org.apache.geronimo.modules/geronimo-directory//jar</dependency>
-    <source-repository>http://geronimo.apache.org/plugins/geronimo-2.0/repository/</source-repository>
-    <source-repository>http://www.ibiblio.org/maven2/</source-repository>
+    <dependency>org.apache.geronimo.plugins/geronimo-directory//jar</dependency>
+    <!--<source-repository>http://geronimo.apache.org/plugins/geronimo-2.0/repository/</source-repository>-->
+    <!--<source-repository>http://www.ibiblio.org/maven2/</source-repository>-->
+    <copy-file relative-to="server" dest-dir="var/directory">META-INF/server.xml</copy-file>
     <config-xml-content>
-        <gbean xmlns="http://geronimo.apache.org/xml/ns/attributes-1.1"
-                name="DirectoryService">
-            <attribute name="host">0.0.0.0</attribute>
-            <attribute name="port">1389</attribute>
+        <gbean xmlns="http://geronimo.apache.org/xml/ns/attributes-1.2" name="DirectoryService">
+            <attribute name="configFile">var/directory/server.xml</attribute>
+            <attribute name="workingDir">var/directory</attribute>
+            <attribute name="providerURL">ou=system</attribute>
         </gbean>
     </config-xml-content>
 </geronimo-plugin>

Added: geronimo/plugins/directory/trunk/directory/src/main/resources/META-INF/server.xml
URL: http://svn.apache.org/viewvc/geronimo/plugins/directory/trunk/directory/src/main/resources/META-INF/server.xml?view=auto&rev=563580
==============================================================================
--- geronimo/plugins/directory/trunk/directory/src/main/resources/META-INF/server.xml (added)
+++ geronimo/plugins/directory/trunk/directory/src/main/resources/META-INF/server.xml Tue Aug  7 10:34:27 2007
@@ -0,0 +1,463 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN"
+  "http://www.springframework.org/dtd/spring-beans.dtd">
+
+<beans>
+  <bean id="environment" class="org.springframework.beans.factory.config.PropertiesFactoryBean">
+    <property name="properties">
+      <props>
+        <!-- JNDI security properties used to get initial contexts.         -->
+        <prop key="java.naming.security.authentication">simple</prop>
+        <prop key="java.naming.security.principal">uid=admin,ou=system</prop>
+        <prop key="java.naming.security.credentials">secret</prop>
+        <!-- Set this key to a space delimited set of attributeType descriptions
+             and their OID's if you want an attributeType to be handled as
+             binary content.
+
+             The server will use the schema to derive the set of attributeTypes
+             to treat as binary.  The union if the values you provide here
+             will be taken as the set of binaries. Note to be consistent you
+             must add both the OID and all the names an attributeType can have.
+        -->
+        <!--
+        <prop key="java.naming.ldap.attributes.binary"></prop>
+        -->
+      </props>
+    </property>
+  </bean>
+
+  <bean id="changePasswordConfiguration" class="org.apache.directory.server.changepw.ChangePasswordConfiguration">
+    <!-- Whether to enable the Change Password protocol.                    -->
+    <property name="enabled" value="false" />
+    <!-- The port to run the Change Password protocol on.                   -->
+    <property name="ipPort" value="464" />
+  </bean>
+
+  <bean id="ntpConfiguration" class="org.apache.directory.server.ntp.NtpConfiguration">
+    <!-- Whether to enable the NTP protocol.                                -->
+    <property name="enabled" value="false" />
+    <!-- The port to run the NTP protocol on.                               -->
+    <property name="ipPort" value="123" />
+  </bean>
+
+  <bean id="dnsConfiguration" class="org.apache.directory.server.dns.DnsConfiguration">
+    <!-- Whether to enable the DNS protocol.                                -->
+    <property name="enabled" value="false" />
+    <!-- The port to run the DNS protocol on.                               -->
+    <property name="ipPort" value="53" />
+  </bean>
+
+  <bean id="kdcConfiguration" class="org.apache.directory.server.kerberos.kdc.KdcConfiguration">
+    <!-- Whether to enable the Kerberos protocol.                           -->
+    <property name="enabled" value="false" />
+    <!-- The port to run the Kerberos protocol on.                          -->
+    <property name="ipPort" value="88" />
+  </bean>
+
+  <bean id="ldapsConfiguration" class="org.apache.directory.server.ldap.LdapConfiguration">
+    <!-- Whether to enable the LDAPS protocol.                               -->
+    <property name="enabled" value="false" />
+    <!-- The port to run the LDAPS protocol on.                              -->
+    <property name="ipPort" value="636" />
+
+    <property name="enableLdaps" value="true" />
+  </bean>
+
+  <bean id="ldapConfiguration" class="org.apache.directory.server.ldap.LdapConfiguration">
+    <!-- The port to run the LDAP protocol on.                              -->
+    <property name="ipPort" value="10389" />
+    <!-- Whether to allow anonymous access.                                 -->
+    <property name="allowAnonymousAccess" value="false" />
+
+    <!-- The list of supported authentication mechanisms.                   -->
+    <property name="supportedMechanisms">
+      <list>
+        <value>SIMPLE</value>
+        <value>CRAM-MD5</value>
+        <value>DIGEST-MD5</value>
+        <!--<value>GSSAPI</value>-->
+      </list>
+    </property>
+
+    <!-- The FQDN of this SASL host, validated during SASL negotiation.     -->
+    <property name="saslHost" value="ldap.example.com" />
+
+    <!-- The Kerberos principal name for this LDAP service, used by GSSAPI. -->
+    <property name="saslPrincipal" value="ldap/ldap.example.com@EXAMPLE.COM" />
+
+    <!-- The desired quality-of-protection, used by DIGEST-MD5 and GSSAPI.  -->
+    <property name="saslQop">
+      <list>
+        <value>auth</value>
+        <value>auth-int</value>
+        <value>auth-conf</value>
+      </list>
+    </property>
+
+    <!-- The realms serviced by this SASL host, used by DIGEST-MD5 and GSSAPI. -->
+    <property name="saslRealms">
+      <list>
+        <value>example.com</value>
+        <value>apache.org</value>
+      </list>
+    </property>
+
+    <!-- The base DN containing users that can be SASL authenticated.       -->
+    <property name="searchBaseDn" value="ou=users,ou=system" />
+
+    <!-- SSL CONFIG CAN GO HERE-->
+
+    <!-- limits searches by non-admin users to a max time of 15000          -->
+    <!-- milliseconds and has a default value of 10000                      -->
+    <property name="maxTimeLimit" value="15000" />
+
+    <!-- limits searches to max size of 1000 entries: default value is 100  -->
+    <property name="maxSizeLimit" value="1000" />
+
+    <!-- the collection of extended operation handlers to install           -->
+    <property name="extendedOperationHandlers">
+      <list>
+        <!--<bean class="org.apache.directory.server.ldap.support.starttls.StartTlsHandler"/>-->
+        <bean class="org.apache.directory.server.ldap.support.extended.GracefulShutdownHandler"/>
+        <bean class="org.apache.directory.server.ldap.support.extended.LaunchDiagnosticUiHandler"/>
+        <!-- The Stored Procedure Extended Operation is not stable yet and it may cause security risks.
+        <bean class="org.apache.directory.server.ldap.support.extended.StoredProcedureExtendedOperationHandler"/>
+        -->
+      </list>
+    </property>
+  </bean>
+
+  <bean id="configuration" class="org.apache.directory.server.configuration.MutableServerStartupConfiguration">
+    <property name="workingDirectory" value="example.com" />
+
+    <!-- Uncomment below to have the server load entries on startup!        -->
+    <!-- ldifDirectory property can point to a relative file, directory or  -->
+    <!-- can point to an absolute path to either using the URL path         -->
+    <!-- notation: i.e. file:///Users/jack/apacheds/ldifs                   -->
+    <!--
+    <property name="ldifDirectory">
+      <value>example.ldif</value>
+    </property>
+    -->
+
+    <!-- Entries will optionally be filtered using LdifLoadFilters in the   -->
+    <!-- order specified.                                                   -->
+    <!--
+    <property name="ldifFilters">
+      <list>
+        <bean class="com.example.MyEntryFilter"/>
+      </list>
+    </property>
+    -->
+
+    <!-- the number of milliseconds before issuing a synch (flush to disk)  -->
+    <!-- which writes out dirty pages back to disk.  To turn off synchs all -->
+    <!-- together simply set this value to <= 0.  Make sure you turn on     -->
+    <!-- synchOnWrite for all partitions if you do choose to do this or else-->
+    <!-- writes may never persist to disk.                                  -->
+    <property name="synchPeriodMillis" value="15000" />
+
+    <!-- maximum number of threads used by mina is set to 8: default is 4   -->
+    <property name="maxThreads" value="8" />
+
+    <property name="allowAnonymousAccess" value="false" />
+    <property name="accessControlEnabled" value="false" />
+
+    <!--
+       It's more efficient to keep this feature turned off but you may not like
+       having the creatorsName and modifiersName contain OIDs instead of short
+       attributeType names instead.  So if you want the creatorsName to change
+       from the normalized form which is the internal representation of
+
+            '0.9.2342.19200300.100.1.1=admin,2.5.4.11=system'
+
+       to a more human readabile form like:
+
+            'uid=admin,ou=system'
+
+       then set this property to true.
+    -->
+    <property name="denormalizeOpAttrsEnabled" value="false" />
+
+    <property name="ntpConfiguration" ref="ntpConfiguration" />
+    <property name="dnsConfiguration" ref="dnsConfiguration" />
+    <property name="changePasswordConfiguration" ref="changePasswordConfiguration" />
+    <property name="kdcConfiguration" ref="kdcConfiguration" />
+    <property name="ldapConfiguration" ref="ldapConfiguration" />
+    <property name="ldapsConfiguration" ref="ldapsConfiguration" />
+
+    <property name="systemPartitionConfiguration" ref="systemPartitionConfiguration" />
+
+    <property name="partitionConfigurations">
+      <set>
+        <ref bean="examplePartitionConfiguration"/>
+      </set>
+    </property>
+
+    <property name="interceptorConfigurations">
+      <list>
+        <bean class="org.apache.directory.server.core.configuration.MutableInterceptorConfiguration">
+          <property name="name" value="normalizationService" />
+          <property name="interceptorClassName"
+            value="org.apache.directory.server.core.normalization.NormalizationService" />
+        </bean>
+        <bean class="org.apache.directory.server.core.configuration.MutableInterceptorConfiguration">
+          <property name="name" value="authenticationService" />
+          <property name="interceptorClassName"
+            value="org.apache.directory.server.core.authn.AuthenticationService" />
+        </bean>
+        <bean class="org.apache.directory.server.core.configuration.MutableInterceptorConfiguration">
+          <property name="name" value="referralService" />
+          <property name="interceptorClassName"
+            value="org.apache.directory.server.core.referral.ReferralService" />
+        </bean>
+        <bean class="org.apache.directory.server.core.configuration.MutableInterceptorConfiguration">
+          <property name="name" value="authorizationService" />
+          <property name="interceptorClassName"
+            value="org.apache.directory.server.core.authz.AuthorizationService" />
+        </bean>
+        <bean class="org.apache.directory.server.core.configuration.MutableInterceptorConfiguration">
+          <property name="name" value="defaultAuthorizationService" />
+          <property name="interceptorClassName"
+            value="org.apache.directory.server.core.authz.DefaultAuthorizationService" />
+        </bean>
+        <bean class="org.apache.directory.server.core.configuration.MutableInterceptorConfiguration">
+          <property name="name" value="exceptionService" />
+          <property name="interceptorClassName"
+            value="org.apache.directory.server.core.exception.ExceptionService" />
+        </bean>
+        <bean class="org.apache.directory.server.core.configuration.MutableInterceptorConfiguration">
+          <property name="name" value="operationalAttributeService" />
+          <property name="interceptorClassName"
+            value="org.apache.directory.server.core.operational.OperationalAttributeService" />
+        </bean>
+        <!-- Uncomment to enable the password policy service
+        <bean class="org.apache.directory.server.core.configuration.MutableInterceptorConfiguration">
+          <property name="name" value="passwordPolicyService" />
+          <property name="interceptorClassName"
+            value="org.apache.directory.server.core.kerberos.PasswordPolicyService" />
+        </bean>
+        <bean class="org.apache.directory.server.core.configuration.MutableInterceptorConfiguration">
+          <property name="name" value="keyDerivationService" />
+          <property name="interceptorClassName"
+            value="org.apache.directory.server.core.kerberos.KeyDerivationService" />
+        </bean>
+        -->
+        <bean class="org.apache.directory.server.core.configuration.MutableInterceptorConfiguration">
+          <property name="name" value="schemaService" />
+          <property name="interceptorClassName"
+            value="org.apache.directory.server.core.schema.SchemaService" />
+        </bean>
+        <bean class="org.apache.directory.server.core.configuration.MutableInterceptorConfiguration">
+          <property name="name" value="subentryService" />
+          <property name="interceptorClassName"
+            value="org.apache.directory.server.core.subtree.SubentryService" />
+        </bean>
+        <bean class="org.apache.directory.server.core.configuration.MutableInterceptorConfiguration">
+          <property name="name" value="collectiveAttributeService" />
+          <property name="interceptorClassName"
+            value="org.apache.directory.server.core.collective.CollectiveAttributeService" />
+        </bean>
+        <bean class="org.apache.directory.server.core.configuration.MutableInterceptorConfiguration">
+          <property name="name" value="eventService" />
+          <property name="interceptorClassName"
+            value="org.apache.directory.server.core.event.EventService" />
+        </bean>
+        <bean class="org.apache.directory.server.core.configuration.MutableInterceptorConfiguration">
+          <property name="name" value="triggerService" />
+          <property name="interceptorClassName"
+            value="org.apache.directory.server.core.trigger.TriggerService" />
+        </bean>
+
+        <!-- Uncomment to enable replication service
+        <bean class="org.apache.directory.mitosis.configuration.MutableReplicationInterceptorConfiguration">
+          <property name="name" value="replicationService" />
+          <property name="interceptorClassName"
+            value="org.apache.directory.mitosis.service.ReplicationService" />
+          <property name="replicationConfiguration">
+            <bean class="org.apache.directory.mitosis.configuration.ReplicationConfiguration">
+              <property name="replicaId">
+                <bean class="org.apache.directory.mitosis.common.ReplicaId">
+                  <constructor-arg>
+                    <value>instance_a</value>
+                  </constructor-arg>
+                </bean>
+              </property>
+              <property name="serverPort" value="10390" />
+              <property name="peerReplicas" value="instance_b@localhost:10392" />
+            </bean>
+          </property>
+        </bean>
+        -->
+      </list>
+    </property>
+  </bean>
+
+  <!-- use the following partitionConfiguration to override defaults for  -->
+  <!-- the system partition                                               -->
+  <bean id="systemPartitionConfiguration" class="org.apache.directory.server.core.partition.impl.btree.MutableBTreePartitionConfiguration">
+    <property name="id" value="system" />
+    <property name="cacheSize" value="100" />
+    <property name="suffix" value="ou=system" />
+    <property name="partitionClassName"
+      value="org.apache.directory.server.core.partition.impl.btree.jdbm.JdbmPartition" />
+    <!-- the optimizer is enabled by default but may not always be what     -->
+    <!-- you want if your queries are really simple                         -->
+    <property name="optimizerEnabled" value="true" />
+
+    <!--
+      Synchronization on writes does not wait for synch operations
+      to flush dirty pages.  Writes persist immediately to disk at
+      a cost to performance with increased data integrity.  Otherwise
+      the periodic synch operation will flush dirty pages using the
+      synchPeriodMillis parameter in the main configuration.
+    -->
+    <property name="synchOnWrite" value="true" />
+    <property name="indexedAttributes">
+      <set>
+        <bean class="org.apache.directory.server.core.partition.impl.btree.MutableIndexConfiguration">
+          <property name="attributeId" value="1.3.6.1.4.1.18060.0.4.1.2.1" />
+          <property name="cacheSize" value="100" />
+        </bean>
+        <bean class="org.apache.directory.server.core.partition.impl.btree.MutableIndexConfiguration">
+          <property name="attributeId" value="1.3.6.1.4.1.18060.0.4.1.2.2" />
+          <property name="cacheSize" value="100" />
+        </bean>
+        <bean class="org.apache.directory.server.core.partition.impl.btree.MutableIndexConfiguration">
+          <property name="attributeId" value="1.3.6.1.4.1.18060.0.4.1.2.3" />
+          <property name="cacheSize" value="100" />
+        </bean>
+        <bean class="org.apache.directory.server.core.partition.impl.btree.MutableIndexConfiguration">
+          <property name="attributeId" value="1.3.6.1.4.1.18060.0.4.1.2.4" />
+          <property name="cacheSize" value="100" />
+        </bean>
+        <bean class="org.apache.directory.server.core.partition.impl.btree.MutableIndexConfiguration">
+          <property name="attributeId" value="1.3.6.1.4.1.18060.0.4.1.2.5" />
+          <property name="cacheSize" value="10" />
+        </bean>
+        <bean class="org.apache.directory.server.core.partition.impl.btree.MutableIndexConfiguration">
+          <property name="attributeId" value="1.3.6.1.4.1.18060.0.4.1.2.6" />
+          <property name="cacheSize" value="10" />
+        </bean>
+        <bean class="org.apache.directory.server.core.partition.impl.btree.MutableIndexConfiguration">
+          <property name="attributeId" value="1.3.6.1.4.1.18060.0.4.1.2.7" />
+          <property name="cacheSize" value="10" />
+        </bean>
+        <bean class="org.apache.directory.server.core.partition.impl.btree.MutableIndexConfiguration">
+          <property name="attributeId" value="ou" />
+          <property name="cacheSize" value="100" />
+        </bean>
+        <bean class="org.apache.directory.server.core.partition.impl.btree.MutableIndexConfiguration">
+          <property name="attributeId" value="uid" />
+          <property name="cacheSize" value="100" />
+        </bean>
+        <bean class="org.apache.directory.server.core.partition.impl.btree.MutableIndexConfiguration">
+          <property name="attributeId" value="objectClass" />
+          <property name="cacheSize" value="100" />
+        </bean>
+      </set>
+    </property>
+    <property name="contextEntry">
+      <value>
+        objectClass: top
+        objectClass: organizationalUnit
+        objectClass: extensibleObject
+        ou: system
+      </value>
+    </property>
+  </bean>
+
+
+  <bean id="examplePartitionConfiguration" class="org.apache.directory.server.core.partition.impl.btree.MutableBTreePartitionConfiguration">
+    <property name="id" value="example" />
+    <property name="cacheSize" value="100" />
+    <property name="suffix" value="dc=example,dc=com" />
+    <property name="partitionClassName"
+      value="org.apache.directory.server.core.partition.impl.btree.jdbm.JdbmPartition" />
+
+    <!-- the optimizer is enabled by default but may not always be what     -->
+    <!-- you want if your queries are really simple                         -->
+    <property name="optimizerEnabled" value="true" />
+
+    <!--
+      Synchronization on writes does not wait for synch operations
+      to flush dirty pages.  Writes persist immediately to disk at
+      a cost to performance with increased data integrity.  Otherwise
+      the periodic synch operation will flush dirty pages using the
+      synchPeriodMillis parameter in the main configuration.
+    -->
+    <property name="synchOnWrite" value="true" />
+    <property name="indexedAttributes">
+      <set>
+        <bean class="org.apache.directory.server.core.partition.impl.btree.MutableIndexConfiguration">
+          <property name="attributeId" value="1.3.6.1.4.1.18060.0.4.1.2.1" />
+          <property name="cacheSize" value="100" />
+        </bean>
+        <bean class="org.apache.directory.server.core.partition.impl.btree.MutableIndexConfiguration">
+          <property name="attributeId" value="1.3.6.1.4.1.18060.0.4.1.2.2" />
+          <property name="cacheSize" value="100" />
+        </bean>
+        <bean class="org.apache.directory.server.core.partition.impl.btree.MutableIndexConfiguration">
+          <property name="attributeId" value="1.3.6.1.4.1.18060.0.4.1.2.3" />
+          <property name="cacheSize" value="100" />
+        </bean>
+        <bean class="org.apache.directory.server.core.partition.impl.btree.MutableIndexConfiguration">
+          <property name="attributeId" value="1.3.6.1.4.1.18060.0.4.1.2.4" />
+          <property name="cacheSize" value="100" />
+        </bean>
+        <bean class="org.apache.directory.server.core.partition.impl.btree.MutableIndexConfiguration">
+          <property name="attributeId" value="1.3.6.1.4.1.18060.0.4.1.2.5" />
+          <property name="cacheSize" value="10" />
+        </bean>
+        <bean class="org.apache.directory.server.core.partition.impl.btree.MutableIndexConfiguration">
+          <property name="attributeId" value="1.3.6.1.4.1.18060.0.4.1.2.6" />
+          <property name="cacheSize" value="10" />
+        </bean>
+        <bean class="org.apache.directory.server.core.partition.impl.btree.MutableIndexConfiguration">
+          <property name="attributeId" value="1.3.6.1.4.1.18060.0.4.1.2.7" />
+          <property name="cacheSize" value="10" />
+        </bean>
+
+        <bean class="org.apache.directory.server.core.partition.impl.btree.MutableIndexConfiguration">
+          <property name="attributeId" value="dc" />
+          <property name="cacheSize" value="100" />
+        </bean>
+        <bean class="org.apache.directory.server.core.partition.impl.btree.MutableIndexConfiguration">
+          <property name="attributeId" value="ou" />
+          <property name="cacheSize" value="100" />
+        </bean>
+        <bean class="org.apache.directory.server.core.partition.impl.btree.MutableIndexConfiguration">
+          <property name="attributeId" value="krb5PrincipalName" />
+          <property name="cacheSize" value="100" />
+        </bean>
+        <bean class="org.apache.directory.server.core.partition.impl.btree.MutableIndexConfiguration">
+          <property name="attributeId" value="uid" />
+          <property name="cacheSize" value="100" />
+        </bean>
+        <bean class="org.apache.directory.server.core.partition.impl.btree.MutableIndexConfiguration">
+          <property name="attributeId" value="objectClass" />
+          <property name="cacheSize" value="100" />
+        </bean>
+      </set>
+    </property>
+    <property name="contextEntry">
+      <value>
+        objectClass: top
+        objectClass: domain
+        objectClass: extensibleObject
+        dc: example
+      </value>
+    </property>
+  </bean>
+
+  <bean class="org.springframework.beans.factory.config.CustomEditorConfigurer">
+    <property name="customEditors">
+      <map>
+        <entry key="javax.naming.directory.Attributes">
+          <bean class="org.apache.directory.server.core.configuration.AttributesPropertyEditor"/>
+        </entry>
+      </map>
+   </property>
+  </bean>
+</beans>

Propchange: geronimo/plugins/directory/trunk/directory/src/main/resources/META-INF/server.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/plugins/directory/trunk/directory/src/main/resources/META-INF/server.xml
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/plugins/directory/trunk/directory/src/main/resources/META-INF/server.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Modified: geronimo/plugins/directory/trunk/directory/src/plan/plan.xml
URL: http://svn.apache.org/viewvc/geronimo/plugins/directory/trunk/directory/src/plan/plan.xml?view=diff&rev=563580&r1=563259&r2=563580
==============================================================================
--- geronimo/plugins/directory/trunk/directory/src/plan/plan.xml (original)
+++ geronimo/plugins/directory/trunk/directory/src/plan/plan.xml Tue Aug  7 10:34:27 2007
@@ -21,14 +21,9 @@
 <module xmlns="http://geronimo.apache.org/xml/ns/deployment-${geronimoSchemaVersion}">
 
     <gbean name="DirectoryService" class="org.apache.geronimo.directory.DirectoryGBean">
+        <attribute name="configFile">var/directory/server.xml</attribute>
+        <attribute name="workingDir">var/directory</attribute>
         <attribute name="providerURL">ou=system</attribute>
-        <attribute name="securityAuthentication">simple</attribute>
-        <attribute name="securityPrincipal">uid=admin,ou=system</attribute>
-        <attribute name="securityCredentials">secret</attribute>
-        <attribute name="anonymousAccess">true</attribute>
-        <attribute name="enableNetworking">true</attribute>
-        <attribute name="host">0.0.0.0</attribute>
-        <attribute name="port">1389</attribute>
         <reference name="ServerInfo"><name>ServerInfo</name></reference>
     </gbean>
 

Modified: geronimo/plugins/directory/trunk/geronimo-directory/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/plugins/directory/trunk/geronimo-directory/pom.xml?view=diff&rev=563580&r1=563259&r2=563580
==============================================================================
--- geronimo/plugins/directory/trunk/geronimo-directory/pom.xml (original)
+++ geronimo/plugins/directory/trunk/geronimo-directory/pom.xml Tue Aug  7 10:34:27 2007
@@ -23,178 +23,77 @@
     <modelVersion>4.0.0</modelVersion>
 
     <parent>
-        <groupId>org.apache.geronimo.modules</groupId>
-        <artifactId>modules</artifactId>
-        <version>2.1-SNAPSHOT</version>
+        <groupId>org.apache.geronimo.plugins</groupId>
+        <artifactId>directory-parent</artifactId>
+        <version>2.0-SNAPSHOT</version>
         <relativePath>../pom.xml</relativePath>
     </parent>
 
     <artifactId>geronimo-directory</artifactId>
-    <name>Geronimo :: Directory</name>
+    <name>Geronimo :: Directory Plugin</name>
 
     <dependencies>
         
         <dependency>
-            <groupId>${pom.groupId}</groupId>
+            <groupId>org.apache.geronimo.modules</groupId>
             <artifactId>geronimo-system</artifactId>
-            <version>${version}</version>
-        </dependency>
-        
-        <dependency>
-            <groupId>regexp</groupId>
-            <artifactId>regexp</artifactId>
-        </dependency>
-
-        <dependency>
-            <groupId>directory</groupId>
-            <artifactId>apacheds-core</artifactId>
-        </dependency>
-
-        <dependency>
-            <groupId>directory</groupId>
-            <artifactId>apacheds-shared</artifactId>
-        </dependency>
-
-        <dependency>
-            <groupId>directory-asn1</groupId>
-            <artifactId>asn1-codec</artifactId>
-        </dependency>
-
-        <dependency>
-            <groupId>directory-asn1</groupId>
-            <artifactId>asn1-ber</artifactId>
-        </dependency>
-
-        <dependency>
-            <groupId>directory-asn1</groupId>
-            <artifactId>asn1-der</artifactId>
-        </dependency>
-
-        <dependency>
-            <groupId>directory-shared</groupId>
-            <artifactId>apache-ldapber-provider</artifactId>
-        </dependency>
-
-        <dependency>
-            <groupId>directory-shared</groupId>
-            <artifactId>ldap-common</artifactId>
         </dependency>
 
         <dependency>
-            <groupId>directory-shared</groupId>
-            <artifactId>kerberos-common</artifactId>
-        </dependency>
-
-        <dependency>
-            <groupId>directory-network</groupId>
-            <artifactId>mina</artifactId>
+            <groupId>org.slf4j</groupId>
+            <artifactId>slf4j-api</artifactId>
         </dependency>
-
         <dependency>
-            <groupId>directory-protocols</groupId>
-            <artifactId>kerberos-protocol</artifactId>
+            <groupId>org.slf4j</groupId>
+            <artifactId>slf4j-log4j12</artifactId>
         </dependency>
 
         <dependency>
-            <groupId>directory-protocols</groupId>
-            <artifactId>ldap-protocol</artifactId>
+          <groupId>org.apache.directory.server</groupId>
+          <artifactId>apacheds-server-jndi</artifactId>
         </dependency>
 
         <dependency>
-            <groupId>jdbm</groupId>
-            <artifactId>jdbm</artifactId>
+          <groupId>org.apache.directory.daemon</groupId>
+          <artifactId>daemon-bootstrappers</artifactId>
+          <!--<version>1.1.1-SNAPSHOT</version>-->
         </dependency>
 
         <dependency>
-            <groupId>oro</groupId>
-            <artifactId>oro</artifactId>
+          <groupId>org.springframework</groupId>
+          <artifactId>spring</artifactId>
         </dependency>
 
         <dependency>
-            <groupId>commons-lang</groupId>
-            <artifactId>commons-lang</artifactId>
+          <groupId>org.springframework</groupId>
+          <artifactId>spring-core</artifactId>
         </dependency>
 
         <dependency>
-            <groupId>commons-collections</groupId>
-            <artifactId>commons-collections</artifactId>
+          <groupId>org.springframework</groupId>
+          <artifactId>spring-beans</artifactId>
         </dependency>
 
         <dependency>
-            <groupId>commons-io</groupId>
-            <artifactId>commons-io</artifactId>
+          <groupId>commons-logging</groupId>
+          <artifactId>commons-logging</artifactId>
         </dependency>
 
         <dependency>
-            <groupId>commons-primitives</groupId>
-            <artifactId>commons-primitives</artifactId>
+          <groupId>org.springframework</groupId>
+          <artifactId>spring-context</artifactId>
         </dependency>
 
         <dependency>
-            <groupId>antlr</groupId>
-            <artifactId>antlr</artifactId>
-        </dependency>
-        
-        <dependency>
-            <groupId>org.slf4j</groupId>
-            <artifactId>slf4j-simple</artifactId>
+          <groupId>org.apache.xbean</groupId>
+          <artifactId>xbean-spring</artifactId>
         </dependency>
 
-        <dependency>
-            <groupId>org.apache.xmlbeans</groupId>
-            <artifactId>xmlbeans</artifactId>
-        </dependency>
-
-        <dependency>
-            <groupId>org.apache.geronimo.specs</groupId>
-            <artifactId>geronimo-stax-api_1.0_spec</artifactId>
-        </dependency>
-        
     </dependencies>
     
     <build>
         <plugins>
             <plugin>
-                <groupId>org.codehaus.mojo</groupId>
-                <artifactId>xmlbeans-maven-plugin</artifactId>
-                <configuration>
-                    <sourceSchemas>directory.xsd</sourceSchemas>
-                    <outputDirectory>${project.build.outputDirectory}/schemaorg_apache_xmlbeans</outputDirectory>
-                    <defaultXmlConfigDir>${pom.basedir}/src/main/schema/xmlconfig.xml</defaultXmlConfigDir>
-                </configuration>
-            </plugin>
-            
-            <!--
-            HACK: Copy XmlBeans generated schemas.
-            -->
-            <plugin>
-                <groupId>org.codehaus.mojo</groupId>
-                <artifactId>groovy-maven-plugin</artifactId>
-                <executions>
-                    <execution>
-                        <phase>generate-resources</phase>
-                        <goals>
-                            <goal>execute</goal>
-                        </goals>
-                        <configuration>
-                            <classpath>
-                                <element>
-                                    <groupId>org.apache.geronimo.buildsupport</groupId>
-                                    <artifactId>groovy-build-library</artifactId>
-                                    <version>${version}</version>
-                                </element>
-                            </classpath>
-                            <source>
-                                <body>
-                                    org.apache.geronimo.buildsupport.CopyXmlBeansSchemas.execute(this)
-                                </body>
-                            </source>
-                        </configuration>
-                    </execution>
-                </executions>
-            </plugin>
-            
-            <plugin>
                 <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-antrun-plugin</artifactId>
                 <executions>
@@ -207,7 +106,7 @@
                             <tasks>
                                 <tstamp/>
                                 <mkdir dir="${project.build.directory}/var"/>
-                                <copy file="${pom.basedir}/src/test/resources/directory.xml"
+                                <copy file="${pom.basedir}/src/test/resources/server.xml"
                                     todir="${project.build.directory}/var"/>
                             </tasks>
                         </configuration>

Modified: geronimo/plugins/directory/trunk/geronimo-directory/src/main/java/org/apache/geronimo/directory/DirectoryGBean.java
URL: http://svn.apache.org/viewvc/geronimo/plugins/directory/trunk/geronimo-directory/src/main/java/org/apache/geronimo/directory/DirectoryGBean.java?view=diff&rev=563580&r1=563259&r2=563580
==============================================================================
--- geronimo/plugins/directory/trunk/geronimo-directory/src/main/java/org/apache/geronimo/directory/DirectoryGBean.java (original)
+++ geronimo/plugins/directory/trunk/geronimo-directory/src/main/java/org/apache/geronimo/directory/DirectoryGBean.java Tue Aug  7 10:34:27 2007
@@ -18,19 +18,24 @@
 package org.apache.geronimo.directory;
 
 import java.io.File;
-import java.net.InetAddress;
-import java.net.InetSocketAddress;
+import java.net.MalformedURLException;
 import java.util.Properties;
+
 import javax.naming.Context;
+import javax.naming.NamingException;
 import javax.naming.directory.InitialDirContext;
+
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
+import org.apache.directory.server.configuration.MutableServerStartupConfiguration;
+import org.apache.directory.server.core.configuration.ShutdownConfiguration;
+import org.apache.directory.server.jndi.ServerContextFactory;
 import org.apache.geronimo.gbean.GBeanInfo;
 import org.apache.geronimo.gbean.GBeanInfoBuilder;
 import org.apache.geronimo.gbean.GBeanLifecycle;
 import org.apache.geronimo.system.serverinfo.ServerInfo;
-import org.apache.ldap.server.configuration.ShutdownConfiguration;
-import org.apache.ldap.server.jndi.CoreContextFactory;
+import org.apache.xbean.spring.context.FileSystemXmlApplicationContext;
+import org.springframework.context.ApplicationContext;
 
 /**
  * Directory GBean
@@ -40,199 +45,70 @@
 public class DirectoryGBean implements GBeanLifecycle {
 
     private static final Log log = LogFactory.getLog(DirectoryGBean.class);
-    
-    private final ServerInfo serverInfo;
-    private final String workingDir;
-    private final boolean anonymousAccess;
-    private String providerURL;
-    private String securityPrincipal;
-    private String securityCredentials;
-    private String securityAuthentication;
-    private int port = 389;
-    private InetAddress host = null;
-    private boolean enableNetworking;
-    private final String configFile;
-    
+
     /**
      * Geronimo class loader
-     **/
+     */
     private ClassLoader classLoader;
+    private static final String DEFAULT_WORKING_DIRECTORY = "var/directory";
 
-    public DirectoryGBean(ClassLoader classLoader, String workingDir, 
-            boolean anonymousAccess, String configFile,
-            ServerInfo serverInfo) {
-        
-        if (serverInfo == null)
-            throw new IllegalArgumentException("Must have a ServerInfo value in initParams.");
-        
-        if (workingDir == null)
-            this.workingDir = "var/ldap";
-        else
-            this.workingDir = workingDir;
-        
-        this.classLoader = classLoader;
-        this.anonymousAccess = anonymousAccess;
-        this.configFile = configFile;
-        this.serverInfo = serverInfo;
-        setHost("0.0.0.0");
-    }
-
-    public String getProviderURL() {
-        return providerURL;
-    }
+    public DirectoryGBean(String workingDir,
+                          String configFile,
+                          String providerURL, ServerInfo serverInfo,
+                          ClassLoader classLoader) throws NamingException, MalformedURLException {
 
-    public void setProviderURL(String providerURL) {
-        this.providerURL = providerURL;
-    }
-
-    public String getSecurityAuthentication() {
-        return securityAuthentication;
-    }
-
-    public void setSecurityAuthentication(String securityAuthentication) {
-        this.securityAuthentication = securityAuthentication;
-    }
-
-    public String getSecurityCredentials() {
-        return securityCredentials;
-    }
-
-    public void setSecurityCredentials(String securityCredentials) {
-        this.securityCredentials = securityCredentials;
-    }
-
-    public String getSecurityPrincipal() {
-        return securityPrincipal;
-    }
-
-    public void setSecurityPrincipal(String securityPrincipal) {
-        this.securityPrincipal = securityPrincipal;
-    }
-
-    public boolean isEnableNetworking() {
-        return enableNetworking;
-    }
-
-    public void setEnableNetworking(boolean enableNetworking) {
-        this.enableNetworking = enableNetworking;
-    }
-
-    public String getHost() {
-        if (host == null){
-            return "0.0.0.0";
+        if (serverInfo == null) {
+            throw new IllegalArgumentException("Must have a ServerInfo value in initParams.");
         }
-        
-        return host.getHostAddress();
-    }
-
-    public void setHost(String host) {
-        try{
-            if (host == null ){
-                this.host = null;
-                return;
-            }
-            
-            String strHost = host.trim();
-            if (strHost.equals("0.0.0.0")){
-                this.host = null;
-                return;
-            }
-
-            this.host = InetAddress.getByName(strHost);
-
-        } catch (Exception e){
-            throw new RuntimeException(e);
+        if (workingDir == null) {
+            workingDir = DEFAULT_WORKING_DIRECTORY;
         }
-    }
+        this.classLoader = classLoader;
+        File configF = serverInfo.resolveServer(configFile);
+        ApplicationContext factory = new FileSystemXmlApplicationContext(configF.toURL().toString());
+        MutableServerStartupConfiguration cfg = (MutableServerStartupConfiguration) factory.getBean("configuration");
+        Properties env = (Properties) factory.getBean("environment");
+        env.setProperty(Context.PROVIDER_URL, providerURL);
+        env.setProperty(Context.INITIAL_CONTEXT_FACTORY, ServerContextFactory.class.getName());
 
-    public int getPort() {
-        return port;
-    }
+        File workingDirFile = serverInfo.resolveServer(workingDir);
+        cfg.setWorkingDirectory(workingDirFile);
 
-    public void setPort(int port) {
-        this.port = port;
+        env.putAll(cfg.toJndiEnvironment());
+        new InitialDirContext(env);
     }
 
+
     public void doFail() {
         log.warn("Service failed");
-        //Insert failure code here
-    }
-
-    public InetSocketAddress getListenAddress() {
-        return new InetSocketAddress(getHost(), getPort());
-    }
-
-    private void setEnvironment(Properties env){
-
-        if (providerURL != null){
-            env.put( Context.PROVIDER_URL, providerURL);
-        }       
-
-        if (securityAuthentication != null){
-            env.put( Context.SECURITY_AUTHENTICATION, securityAuthentication);
-        }
-
-        if (securityPrincipal != null){
-            env.put( Context.SECURITY_PRINCIPAL, securityPrincipal);
-        }
-
-        if (securityCredentials != null){
-            env.put( Context.SECURITY_CREDENTIALS, securityCredentials);
+        try {
+            doStop();
+        } catch (Exception e) {
+            log.info("error during fail", e);
         }
     }
-    
-    public void doStart() throws Exception {
-        log.debug("Starting LDAP Directory service");
-        
-        MutableServerStartupConfiguration startup = new MutableServerStartupConfiguration();
-        // put some mandatory JNDI properties here
-        startup.setWorkingDirectory(serverInfo.resolveServer(workingDir));
-        startup.setAllowAnonymousAccess(anonymousAccess);
-        startup.setLdapPort(port);
-        startup.setEnableNetworking(enableNetworking);
-        startup.setHost(host);
-        
-        if (configFile != null){
-            File f = serverInfo.resolve(configFile);
-            DirectoryConfigurator dc = new DirectoryConfigurator();
-            dc.configure(classLoader, startup, f);
-        }
-        
-        Properties env = new Properties();
-        env.putAll(startup.toJndiEnvironment());
-        env.put( Context.INITIAL_CONTEXT_FACTORY, ServerContextFactory.class.getName());
-        setEnvironment(env);
-        
-        //Load the proper class for the Context Loader
-        ClassLoader oldCL = Thread.currentThread().getContextClassLoader();
-        Thread.currentThread().setContextClassLoader(classLoader);
 
-        //Fire it up
-        new InitialDirContext( env );
-        
-        //Set it back
-        Thread.currentThread().setContextClassLoader(oldCL);
-        log.debug("LDAP Directory service started.");
+    public void doStart() throws Exception {
     }
 
     public void doStop() throws Exception {
         log.debug("Stopping LDAP Directory service");
-        //Insert stopping code here
         Properties env = new Properties();
         env.putAll(new ShutdownConfiguration().toJndiEnvironment());
-        env.put( Context.INITIAL_CONTEXT_FACTORY, CoreContextFactory.class.getName() );
-        setEnvironment(env);
-        
-        //Load the proper class for th Context Loader
+        env.put(Context.INITIAL_CONTEXT_FACTORY, ServerContextFactory.class.getName());
+        //The values of these env props are more or less irrelevant, see DIRSERVER-1002
+        env.put(Context.SECURITY_AUTHENTICATION, "simple");
+        env.put(Context.SECURITY_PRINCIPAL, "uid=admin,ou=system");
+        env.put(Context.SECURITY_CREDENTIALS, "secret");
+
         ClassLoader oldCL = Thread.currentThread().getContextClassLoader();
         Thread.currentThread().setContextClassLoader(classLoader);
 
-        //Shut it down
-        new InitialDirContext( env );
-
-        //Set it back
-        Thread.currentThread().setContextClassLoader(oldCL);
-
+        try {
+            new InitialDirContext(env);
+        } finally {
+            Thread.currentThread().setContextClassLoader(oldCL);
+        }
     }
 
     public static final GBeanInfo GBEAN_INFO;
@@ -240,23 +116,13 @@
     static {
         GBeanInfoBuilder infoFactory = GBeanInfoBuilder.createStatic("Apache Directory LDAP", DirectoryGBean.class);
 
-        infoFactory.addAttribute("classLoader", ClassLoader.class, false);
-        
-        infoFactory.addAttribute("providerURL", String.class, true, true);
-        infoFactory.addAttribute("securityAuthentication", String.class, true, true);
-        infoFactory.addAttribute("securityPrincipal", String.class, true, true);
-        infoFactory.addAttribute("securityCredentials", String.class, true, true);
-        infoFactory.addAttribute("port", int.class, true, true);
-        infoFactory.addAttribute("host", String.class, true, true);
-        infoFactory.addAttribute("listenAddress", InetSocketAddress.class, false, false);
-        infoFactory.addAttribute("enableNetworking", boolean.class, true, true);
-        
         infoFactory.addAttribute("workingDir", String.class, true);
-        infoFactory.addAttribute("anonymousAccess", boolean.class, true);
         infoFactory.addAttribute("configFile", String.class, true);
+        infoFactory.addAttribute("providerURL", String.class, true);
         infoFactory.addReference("ServerInfo", ServerInfo.class, "GBean");
+        infoFactory.addAttribute("classLoader", ClassLoader.class, false);
 
-        infoFactory.setConstructor(new String[] { "classLoader", "workingDir", "anonymousAccess", "configFile", "ServerInfo" });
+        infoFactory.setConstructor(new String[]{"workingDir", "configFile", "providerURL", "ServerInfo", "classLoader"});
         GBEAN_INFO = infoFactory.getBeanInfo();
     }
 

Modified: geronimo/plugins/directory/trunk/geronimo-directory/src/main/resources/META-INF/geronimo-dependency.xml
URL: http://svn.apache.org/viewvc/geronimo/plugins/directory/trunk/geronimo-directory/src/main/resources/META-INF/geronimo-dependency.xml?view=diff&rev=563580&r1=563259&r2=563580
==============================================================================
--- geronimo/plugins/directory/trunk/geronimo-directory/src/main/resources/META-INF/geronimo-dependency.xml (original)
+++ geronimo/plugins/directory/trunk/geronimo-directory/src/main/resources/META-INF/geronimo-dependency.xml Tue Aug  7 10:34:27 2007
@@ -18,108 +18,171 @@
 
 <dep:service xmlns:dep="http://geronimo.apache.org/xml/ns/deployment-1.2">
 
-    <!--
-    FIXME: Do not specify versions, let G pickup the version that is in the repo.
-    -->
-    
-  <dep:dependency>
-    <dep:groupId>directory</dep:groupId>
-    <dep:artifactId>apacheds-core</dep:artifactId>
-    <dep:version>0.9.2</dep:version>
-  </dep:dependency>
-  <dep:dependency>
-    <dep:groupId>directory</dep:groupId>
-    <dep:artifactId>apacheds-shared</dep:artifactId>
-    <dep:version>0.9.2</dep:version>
-  </dep:dependency>
-  <dep:dependency>
-    <dep:groupId>directory-asn1</dep:groupId>
-    <dep:artifactId>asn1-codec</dep:artifactId>
-    <dep:version>0.3.2</dep:version>
-  </dep:dependency>
-  <dep:dependency>
-    <dep:groupId>directory-shared</dep:groupId>
-    <dep:artifactId>apache-ldapber-provider</dep:artifactId>
-    <dep:version>0.9.2</dep:version>
-  </dep:dependency>
-  <dep:dependency>
-    <dep:groupId>directory-asn1</dep:groupId>
-    <dep:artifactId>asn1-ber</dep:artifactId>
-    <dep:version>0.3.2</dep:version>
-  </dep:dependency>
-  <dep:dependency>
-    <dep:groupId>directory-asn1</dep:groupId>
-    <dep:artifactId>asn1-der</dep:artifactId>
-    <dep:version>0.3.2</dep:version>
-  </dep:dependency>
-  <dep:dependency>
-    <dep:groupId>jdbm</dep:groupId>
-    <dep:artifactId>jdbm</dep:artifactId>
-    <dep:version>0.20-dev</dep:version>
-  </dep:dependency>
-  <dep:dependency>
-    <dep:groupId>regexp</dep:groupId>
-    <dep:artifactId>regexp</dep:artifactId>
-    <dep:version>1.3</dep:version>
-  </dep:dependency>
-  <dep:dependency>
-    <dep:groupId>oro</dep:groupId>
-    <dep:artifactId>oro</dep:artifactId>
-    <dep:version>2.0.8</dep:version>
-  </dep:dependency>
-  <dep:dependency>
-    <dep:groupId>commons-lang</dep:groupId>
-    <dep:artifactId>commons-lang</dep:artifactId>
-    <dep:version>2.0</dep:version>
-  </dep:dependency>
-  <dep:dependency>
-    <dep:groupId>commons-collections</dep:groupId>
-    <dep:artifactId>commons-collections</dep:artifactId>
-    <dep:version>3.1</dep:version>
-  </dep:dependency>
-  <dep:dependency>
-    <dep:groupId>commons-io</dep:groupId>
-    <dep:artifactId>commons-io</dep:artifactId>
-    <dep:version>1.1</dep:version>
-  </dep:dependency>
-  <dep:dependency>
-    <dep:groupId>commons-primitives</dep:groupId>
-    <dep:artifactId>commons-primitives</dep:artifactId>
-    <dep:version>20041207.202534</dep:version>
-  </dep:dependency>
-  <dep:dependency>
-    <dep:groupId>directory-shared</dep:groupId>
-    <dep:artifactId>ldap-common</dep:artifactId>
-    <dep:version>0.9.2</dep:version>
-  </dep:dependency>
-  <dep:dependency>
-    <dep:groupId>directory-shared</dep:groupId>
-    <dep:artifactId>kerberos-common</dep:artifactId>
-    <dep:version>0.5</dep:version>
-  </dep:dependency>
-  <dep:dependency>
-    <dep:groupId>directory-network</dep:groupId>
-    <dep:artifactId>mina</dep:artifactId>
-    <dep:version>0.7.3</dep:version>
-  </dep:dependency>
-  <dep:dependency>
-    <dep:groupId>directory-protocols</dep:groupId>
-    <dep:artifactId>kerberos-protocol</dep:artifactId>
-    <dep:version>0.5</dep:version>
-  </dep:dependency>
-  <dep:dependency>
-    <dep:groupId>directory-protocols</dep:groupId>
-    <dep:artifactId>ldap-protocol</dep:artifactId>
-    <dep:version>0.9.2</dep:version>
-  </dep:dependency>
-  <dep:dependency>
-    <dep:groupId>antlr</dep:groupId>
-    <dep:artifactId>antlr</dep:artifactId>
-    <dep:version>2.7.2</dep:version>
-  </dep:dependency>
-  <dep:dependency>
-    <dep:groupId>org.slf4j</dep:groupId>
-    <dep:artifactId>slf4j-simple</dep:artifactId>
-    <dep:version>1.0-beta7</dep:version>
-  </dep:dependency>
+    <dep:dependency>
+        <dep:groupId>org.apache.directory.server</dep:groupId>
+        <dep:artifactId>apacheds-server-jndi</dep:artifactId>
+    </dep:dependency>
+    <dep:dependency>
+        <dep:groupId>org.apache.directory.server</dep:groupId>
+        <dep:artifactId>apacheds-bootstrap-extract</dep:artifactId>
+    </dep:dependency>
+    <dep:dependency>
+        <dep:groupId>org.apache.directory.server</dep:groupId>
+        <dep:artifactId>apacheds-bootstrap-partition</dep:artifactId>
+    </dep:dependency>
+    <dep:dependency>
+        <dep:groupId>org.apache.directory.server</dep:groupId>
+        <dep:artifactId>apacheds-btree-base</dep:artifactId>
+    </dep:dependency>
+    <dep:dependency>
+        <dep:groupId>org.apache.directory.server</dep:groupId>
+        <dep:artifactId>apacheds-core</dep:artifactId>
+    </dep:dependency>
+    <dep:dependency>
+        <dep:groupId>org.apache.directory.server</dep:groupId>
+        <dep:artifactId>apacheds-core-shared</dep:artifactId>
+    </dep:dependency>
+    <dep:dependency>
+        <dep:groupId>org.apache.directory.server</dep:groupId>
+        <dep:artifactId>apacheds-jdbm-store</dep:artifactId>
+    </dep:dependency>
+    <dep:dependency>
+        <dep:groupId>org.apache.directory.server</dep:groupId>
+        <dep:artifactId>apacheds-schema-bootstrap</dep:artifactId>
+    </dep:dependency>
+    <dep:dependency>
+        <dep:groupId>org.apache.directory.server</dep:groupId>
+        <dep:artifactId>apacheds-schema-registries</dep:artifactId>
+    </dep:dependency>
+    <dep:dependency>
+        <dep:groupId>org.apache.directory.server</dep:groupId>
+        <dep:artifactId>apacheds-utils</dep:artifactId>
+    </dep:dependency>
+
+    <dep:dependency>
+        <dep:groupId>org.apache.directory.server</dep:groupId>
+        <dep:artifactId>apacheds-kerberos-shared</dep:artifactId>
+    </dep:dependency>
+    <dep:dependency>
+        <dep:groupId>org.apache.directory.server</dep:groupId>
+        <dep:artifactId>apacheds-protocol-changepw</dep:artifactId>
+    </dep:dependency>
+    <!--<dep:dependency>-->
+    <!--<dep:groupId>org.apache.directory.server</dep:groupId>-->
+    <!--<dep:artifactId>apacheds-protocol-dhcp</dep:artifactId>-->
+    <!--</dep:dependency>-->
+    <dep:dependency>
+        <dep:groupId>org.apache.directory.server</dep:groupId>
+        <dep:artifactId>apacheds-protocol-dns</dep:artifactId>
+    </dep:dependency>
+    <dep:dependency>
+        <dep:groupId>org.apache.directory.server</dep:groupId>
+        <dep:artifactId>apacheds-protocol-kerberos</dep:artifactId>
+    </dep:dependency>
+    <dep:dependency>
+        <dep:groupId>org.apache.directory.server</dep:groupId>
+        <dep:artifactId>apacheds-protocol-ldap</dep:artifactId>
+    </dep:dependency>
+    <dep:dependency>
+        <dep:groupId>org.apache.directory.server</dep:groupId>
+        <dep:artifactId>apacheds-protocol-ntp</dep:artifactId>
+    </dep:dependency>
+
+    <dep:dependency>
+        <dep:groupId>org.apache.directory.server</dep:groupId>
+        <dep:artifactId>apacheds-protocol-shared</dep:artifactId>
+    </dep:dependency>
+
+    <dep:dependency>
+        <dep:groupId>org.apache.directory.daemon</dep:groupId>
+        <dep:artifactId>daemon-bootstrappers</dep:artifactId>
+    </dep:dependency>
+    <dep:dependency>
+        <dep:groupId>org.apache.directory.shared</dep:groupId>
+        <dep:artifactId>shared-ldap</dep:artifactId>
+        <dep:version>0.9.7-SNAPSHOT</dep:version>
+    </dep:dependency>
+    <dep:dependency>
+        <dep:groupId>org.apache.directory.shared</dep:groupId>
+        <dep:artifactId>shared-asn1</dep:artifactId>
+        <dep:version>0.9.7-SNAPSHOT</dep:version>
+    </dep:dependency>
+    <dep:dependency>
+        <dep:groupId>org.apache.directory.shared</dep:groupId>
+        <dep:artifactId>shared-asn1-codec</dep:artifactId>
+        <dep:version>0.9.7-SNAPSHOT</dep:version>
+    </dep:dependency>
+
+    <dep:dependency>
+        <dep:groupId>org.apache.mina</dep:groupId>
+        <dep:artifactId>mina-core</dep:artifactId>
+        <dep:version>1.0.3</dep:version>
+    </dep:dependency>
+    <dep:dependency>
+        <dep:groupId>org.apache.mina</dep:groupId>
+        <dep:artifactId>mina-filter-ssl</dep:artifactId>
+        <dep:version>1.0.3</dep:version>
+    </dep:dependency>
+
+    <dep:dependency>
+        <dep:groupId>org.slf4j</dep:groupId>
+        <dep:artifactId>slf4j-api</dep:artifactId>
+        <dep:version>1.4.0</dep:version>
+    </dep:dependency>
+
+    <dep:dependency>
+        <dep:groupId>org.slf4j</dep:groupId>
+        <dep:artifactId>slf4j-log4j12</dep:artifactId>
+        <dep:version>1.4.0</dep:version>
+    </dep:dependency>
+
+    <dep:dependency>
+        <dep:groupId>org.springframework</dep:groupId>
+        <dep:artifactId>spring</dep:artifactId>
+        <dep:version>2.0.5</dep:version>
+    </dep:dependency>
+
+    <dep:dependency>
+        <dep:groupId>org.springframework</dep:groupId>
+        <dep:artifactId>spring-core</dep:artifactId>
+        <dep:version>2.0.5</dep:version>
+    </dep:dependency>
+
+    <dep:dependency>
+        <dep:groupId>org.springframework</dep:groupId>
+        <dep:artifactId>spring-beans</dep:artifactId>
+        <dep:version>2.0.5</dep:version>
+    </dep:dependency>
+
+    <dep:dependency>
+        <dep:groupId>org.springframework</dep:groupId>
+        <dep:artifactId>spring-context</dep:artifactId>
+        <dep:version>2.0.5</dep:version>
+    </dep:dependency>
+
+    <dep:dependency>
+        <dep:groupId>org.apache.xbean</dep:groupId>
+        <dep:artifactId>xbean-spring</dep:artifactId>
+    </dep:dependency>
+    <dep:dependency>
+        <dep:groupId>backport-util-concurrent</dep:groupId>
+        <dep:artifactId>backport-util-concurrent</dep:artifactId>
+        <dep:version>3.0</dep:version>
+    </dep:dependency>
+
+    <dep:dependency>
+      <dep:groupId>commons-collections</dep:groupId>
+      <dep:artifactId>commons-collections</dep:artifactId>
+      <!--<dep:version>3.1</dep:version>-->
+    </dep:dependency>
+    <dep:dependency>
+      <dep:groupId>antlr</dep:groupId>
+      <dep:artifactId>antlr</dep:artifactId>
+      <dep:version>2.7.7</dep:version>
+    </dep:dependency>
+    <dep:dependency>
+      <dep:groupId>jdbm</dep:groupId>
+      <dep:artifactId>jdbm</dep:artifactId>
+      <dep:version>1.0</dep:version>
+    </dep:dependency>
 </dep:service>

Modified: geronimo/plugins/directory/trunk/geronimo-directory/src/test/java/org/apache/geronimo/directory/RunningTest.java
URL: http://svn.apache.org/viewvc/geronimo/plugins/directory/trunk/geronimo-directory/src/test/java/org/apache/geronimo/directory/RunningTest.java?view=diff&rev=563580&r1=563259&r2=563580
==============================================================================
--- geronimo/plugins/directory/trunk/geronimo-directory/src/test/java/org/apache/geronimo/directory/RunningTest.java (original)
+++ geronimo/plugins/directory/trunk/geronimo-directory/src/test/java/org/apache/geronimo/directory/RunningTest.java Tue Aug  7 10:34:27 2007
@@ -20,6 +20,7 @@
 import junit.framework.TestCase;
 import org.apache.geronimo.system.serverinfo.BasicServerInfo;
 import org.apache.geronimo.system.serverinfo.ServerInfo;
+import org.apache.geronimo.gbean.GBeanInfo;
 
 import javax.naming.Context;
 import javax.naming.NameClassPair;
@@ -38,15 +39,19 @@
 
     private DirectoryGBean directory;
 
+    public void testGBeanInfo() throws Exception {
+        GBeanInfo info = DirectoryGBean.getGBeanInfo();
+    }
+
     public void testRunning() throws Exception {
 
         Hashtable env = new Hashtable();
-        env.put(Context.PROVIDER_URL, "ldap://localhost:9389");
+        env.put(Context.PROVIDER_URL, "ldap://localhost:10389");
         String ldapContextFactory = System.getProperty("initial.context.factory");
         if (ldapContextFactory == null) ldapContextFactory = "com.sun.jndi.ldap.LdapCtxFactory";
         env.put(Context.INITIAL_CONTEXT_FACTORY,
                 ldapContextFactory);
-        //env.put( Context.SECURITY_AUTHENTICATION, "simple");
+        env.put( Context.SECURITY_AUTHENTICATION, "simple");
         env.put( Context.SECURITY_PRINCIPAL, PRINCIPAL);
         env.put( Context.SECURITY_CREDENTIALS, CREDENTIALS);
         DirContext ctx = new InitialDirContext(env);
@@ -73,20 +78,20 @@
 
     protected void setUp() throws Exception {
 
-        URL configURL = cl.getResource("directory.xml");
+        URL configURL = cl.getResource("server.xml");
         if (configURL == null) {
             throw new Exception("Can't find config file on classpath");
         }
         String path = configURL.getPath();
         path = path.substring(0, path.lastIndexOf("/"));
         ServerInfo serverInfo = new BasicServerInfo(path);
-        directory = new DirectoryGBean(cl, null, true, "directory.xml", serverInfo);
-        directory.setEnableNetworking(true);
-        directory.setPort(9389);
-        directory.setProviderURL("ou=system");
-        directory.setSecurityAuthentication("simple");
-        directory.setSecurityCredentials(CREDENTIALS);
-        directory.setSecurityPrincipal(PRINCIPAL);
+        directory = new DirectoryGBean(null, "server.xml", "ou=system", serverInfo, cl);
+//        directory.setEnableNetworking(true);
+//        directory.setPort(9389);
+//        directory.setProviderURL("ou=system");
+//        directory.setSecurityAuthentication("simple");
+//        directory.setSecurityCredentials(CREDENTIALS);
+//        directory.setSecurityPrincipal(PRINCIPAL);
         directory.doStart();
 
 



Mime
View raw message