directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From djen...@apache.org
Subject svn commit: r583375 [2/2] - in /directory/apacheds/branches/bigbang: core/src/main/java/org/apache/directory/server/core/ core/src/test/java/org/apache/directory/server/core/authz/support/ core/src/test/java/org/apache/directory/server/core/interceptor...
Date Wed, 10 Oct 2007 07:31:46 GMT
Copied: directory/apacheds/branches/bigbang/protocol-ntp/src/test/java/org/apache/directory/server/ntp/NtpITest.java
(from r583207, directory/apacheds/branches/bigbang/server-unit/src/test/java/org/apache/directory/server/NtpITest.java)
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/protocol-ntp/src/test/java/org/apache/directory/server/ntp/NtpITest.java?p2=directory/apacheds/branches/bigbang/protocol-ntp/src/test/java/org/apache/directory/server/ntp/NtpITest.java&p1=directory/apacheds/branches/bigbang/server-unit/src/test/java/org/apache/directory/server/NtpITest.java&r1=583207&r2=583375&rev=583375&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/server-unit/src/test/java/org/apache/directory/server/NtpITest.java
(original)
+++ directory/apacheds/branches/bigbang/protocol-ntp/src/test/java/org/apache/directory/server/ntp/NtpITest.java
Wed Oct 10 00:31:43 2007
@@ -17,33 +17,19 @@
  *  under the License. 
  *  
  */
-package org.apache.directory.server;
+package org.apache.directory.server.ntp;
 
 
+import java.net.InetAddress;
+
+import junit.framework.Assert;
+import junit.framework.TestCase;
 import org.apache.commons.net.ntp.NTPUDPClient;
 import org.apache.commons.net.ntp.TimeInfo;
-import org.apache.directory.server.core.DirectoryService;
-import org.apache.directory.server.core.partition.Partition;
-import org.apache.directory.server.core.partition.impl.btree.Index;
-import org.apache.directory.server.core.partition.impl.btree.jdbm.JdbmIndex;
-import org.apache.directory.server.core.partition.impl.btree.jdbm.JdbmPartition;
-import org.apache.directory.server.ldap.LdapConfiguration;
-import org.apache.directory.server.ntp.NtpConfiguration;
+import org.apache.directory.server.configuration.ApacheDS;
 import org.apache.directory.server.unit.AbstractServerTest;
-import org.apache.directory.shared.ldap.message.AttributeImpl;
-import org.apache.directory.shared.ldap.message.AttributesImpl;
 import org.apache.mina.util.AvailablePortFinder;
 
-import javax.naming.Context;
-import javax.naming.directory.Attribute;
-import javax.naming.directory.Attributes;
-import javax.naming.directory.DirContext;
-import javax.naming.directory.InitialDirContext;
-import java.net.InetAddress;
-import java.util.HashSet;
-import java.util.Hashtable;
-import java.util.Set;
-
 
 /**
  * An {@link AbstractServerTest} testing the Network Time Protocol (NTP).
@@ -51,9 +37,11 @@
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  * @version $Rev$, $Date$
  */
-public class NtpITest extends AbstractServerTest
+public class NtpITest extends TestCase
 {
-    private DirContext ctx;
+    private ApacheDS apacheDS;
+    private NtpConfiguration ntpConfig;
+    private int port;
 
 
     /**
@@ -61,65 +49,15 @@
      */
     public void setUp() throws Exception
     {
-        apacheDS.setAllowAnonymousAccess( false );
-
-        LdapConfiguration ldapConfig = apacheDS.getLdapConfiguration();
-        ldapConfig.setEnabled( false );
-
-        NtpConfiguration ntpConfig = apacheDS.getNtpConfiguration();
+        apacheDS = new ApacheDS();
+        ntpConfig = new NtpConfiguration( apacheDS );
         ntpConfig.setEnabled( true );
-
         port = AvailablePortFinder.getNextAvailable( 10123 );
         ntpConfig.setIpPort( port );
+        ntpConfig.start();
 
-        Attributes attrs;
-        Set<Partition> partitions = new HashSet<Partition>();
-
-        // Add partition 'example'
-        JdbmPartition partition = new JdbmPartition();
-        partition.setId( "example" );
-        partition.setSuffix( "dc=example,dc=com" );
-
-        Set<Index> indexedAttrs = new HashSet<Index>();
-        indexedAttrs.add( new JdbmIndex( "ou" ) );
-        indexedAttrs.add( new JdbmIndex( "dc" ) );
-        indexedAttrs.add( new JdbmIndex( "objectClass" ) );
-        partition.setIndexedAttributes( indexedAttrs );
-
-        attrs = new AttributesImpl( true );
-        Attribute attr = new AttributeImpl( "objectClass" );
-        attr.add( "top" );
-        attr.add( "domain" );
-        attrs.put( attr );
-        attr = new AttributeImpl( "dc" );
-        attr.add( "example" );
-        attrs.put( attr );
-        partition.setContextEntry( attrs );
-
-        partitions.add( partition );
-        apacheDS.getDirectoryService().setPartitions( partitions );
-
-        doDelete( apacheDS.getDirectoryService().getWorkingDirectory() );
-        apacheDS.getDirectoryService().setShutdownHookEnabled( false );
-        apacheDS.getNtpConfiguration().setEnabled( true );
-        apacheDS.getNtpConfiguration().setIpPort( AvailablePortFinder.getNextAvailable( 1123)
);
-        super.setUp();
-
-        setContexts( "uid=admin,ou=system", "secret" );
-
-        // Get a context.
-        Hashtable<String, Object> env = new Hashtable<String, Object>();
-        env.put( DirectoryService.JNDI_KEY, apacheDS.getDirectoryService() );
-        env.put( Context.INITIAL_CONTEXT_FACTORY, "org.apache.directory.server.core.jndi.CoreContextFactory"
);
-        env.put( Context.PROVIDER_URL, "dc=example,dc=com" );
-        env.put( Context.SECURITY_PRINCIPAL, "uid=admin,ou=system" );
-        env.put( Context.SECURITY_CREDENTIALS, "secret" );
-        env.put( Context.SECURITY_AUTHENTICATION, "simple" );
-
-        ctx = new InitialDirContext( env );
     }
 
-
     /**
      * Tests to make sure NTP works when enabled in the server.
      * 
@@ -134,14 +72,14 @@
         NTPUDPClient ntp = new NTPUDPClient();
         ntp.setDefaultTimeout( 5000 );
 
-        TimeInfo timeInfo = ntp.getTime( host, apacheDS.getNtpConfiguration().getIpPort()
);
+        TimeInfo timeInfo = ntp.getTime( host, port );
         long returnTime = timeInfo.getReturnTime();
-        assertTrue( currentTime - returnTime < 1000 );
+        Assert.assertTrue( currentTime - returnTime < 1000 );
 
         timeInfo.computeDetails();
 
-        assertTrue( 0 < timeInfo.getOffset() && timeInfo.getOffset() < 1000
);
-        assertTrue( 0 < timeInfo.getDelay() && timeInfo.getDelay() < 1000 );
+        Assert.assertTrue( 0 < timeInfo.getOffset() && timeInfo.getOffset() <
1000 );
+        Assert.assertTrue( 0 < timeInfo.getDelay() && timeInfo.getDelay() <
1000 );
     }
 
 
@@ -150,8 +88,6 @@
      */
     public void tearDown() throws Exception
     {
-        ctx.close();
-        ctx = null;
-        super.tearDown();
+        ntpConfig.stop();
     }
 }

Propchange: directory/apacheds/branches/bigbang/protocol-ntp/src/test/java/org/apache/directory/server/ntp/NtpITest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: directory/apacheds/branches/bigbang/server-jndi/pom.xml
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/server-jndi/pom.xml?rev=583375&r1=583374&r2=583375&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/server-jndi/pom.xml (original)
+++ directory/apacheds/branches/bigbang/server-jndi/pom.xml Wed Oct 10 00:31:43 2007
@@ -35,23 +35,29 @@
   <packaging>jar</packaging>  
 
   <dependencies>
+<!--
     <dependency>
       <groupId>org.apache.directory.server</groupId>
       <artifactId>apacheds-protocol-changepw</artifactId>
       <version>${pom.version}</version>
     </dependency>  
+-->
 
+<!--
     <dependency>
       <groupId>org.apache.directory.server</groupId>
       <artifactId>apacheds-protocol-ntp</artifactId>
       <version>${pom.version}</version>
     </dependency>  
+-->
 
+<!--
     <dependency>
       <groupId>org.apache.directory.server</groupId>
       <artifactId>apacheds-protocol-kerberos</artifactId>
       <version>${pom.version}</version>
     </dependency>  
+-->
 
     <dependency>
       <groupId>org.apache.directory.server</groupId>
@@ -59,11 +65,13 @@
       <version>${pom.version}</version>
     </dependency>  
 
+<!--
     <dependency>
       <groupId>org.apache.directory.server</groupId>
       <artifactId>apacheds-protocol-dns</artifactId>
       <version>${pom.version}</version>
     </dependency>
+-->
 
     <dependency>
       <groupId>org.apache.directory.server</groupId>

Modified: directory/apacheds/branches/bigbang/server-jndi/src/main/java/org/apache/directory/server/configuration/ApacheDS.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/server-jndi/src/main/java/org/apache/directory/server/configuration/ApacheDS.java?rev=583375&r1=583374&r2=583375&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/server-jndi/src/main/java/org/apache/directory/server/configuration/ApacheDS.java
(original)
+++ directory/apacheds/branches/bigbang/server-jndi/src/main/java/org/apache/directory/server/configuration/ApacheDS.java
Wed Oct 10 00:31:43 2007
@@ -20,63 +20,58 @@
 package org.apache.directory.server.configuration;
 
 
+import java.io.File;
+import java.io.FileFilter;
+import java.io.IOException;
+import java.net.InetSocketAddress;
+import java.util.ArrayList;
+import java.util.Hashtable;
+import java.util.Iterator;
+import java.util.List;
+import java.util.concurrent.ExecutorService;
+import java.util.concurrent.Executors;
+import java.util.concurrent.TimeUnit;
+
+import javax.naming.Context;
+import javax.naming.NamingException;
+import javax.naming.directory.Attributes;
+import javax.naming.directory.DirContext;
+import javax.naming.directory.InitialDirContext;
+
 import org.apache.commons.lang.StringUtils;
-import org.apache.directory.server.changepw.ChangePasswordConfiguration;
-import org.apache.directory.server.changepw.ChangePasswordServer;
 import org.apache.directory.server.constants.ApacheSchemaConstants;
 import org.apache.directory.server.core.DefaultDirectoryService;
 import org.apache.directory.server.core.DirectoryService;
 import org.apache.directory.server.core.partition.PartitionNexus;
-import org.apache.directory.server.dns.DnsConfiguration;
-import org.apache.directory.server.dns.DnsServer;
-import org.apache.directory.server.dns.store.RecordStore;
-import org.apache.directory.server.dns.store.jndi.JndiRecordStoreImpl;
 import org.apache.directory.server.jndi.ServerContextFactory;
-import org.apache.directory.server.kerberos.kdc.KdcConfiguration;
-import org.apache.directory.server.kerberos.kdc.KerberosServer;
-import org.apache.directory.server.kerberos.shared.store.JndiPrincipalStoreImpl;
-import org.apache.directory.server.kerberos.shared.store.PrincipalStore;
 import org.apache.directory.server.ldap.ExtendedOperationHandler;
 import org.apache.directory.server.ldap.LdapConfiguration;
 import org.apache.directory.server.ldap.LdapProtocolProvider;
 import org.apache.directory.server.ldap.support.ssl.LdapsInitializer;
-import org.apache.directory.server.ntp.NtpConfiguration;
-import org.apache.directory.server.ntp.NtpServer;
 import org.apache.directory.server.protocol.shared.store.LdifFileLoader;
 import org.apache.directory.server.protocol.shared.store.LdifLoadFilter;
-import org.apache.directory.shared.ldap.constants.SchemaConstants;
 import org.apache.directory.shared.ldap.constants.JndiPropertyConstants;
+import org.apache.directory.shared.ldap.constants.SchemaConstants;
 import org.apache.directory.shared.ldap.exception.LdapConfigurationException;
 import org.apache.directory.shared.ldap.exception.LdapNamingException;
 import org.apache.directory.shared.ldap.message.AttributesImpl;
 import org.apache.directory.shared.ldap.message.extended.NoticeOfDisconnect;
 import org.apache.directory.shared.ldap.util.StringTools;
-import org.apache.mina.common.*;
+import org.apache.mina.common.ByteBuffer;
+import org.apache.mina.common.DefaultIoFilterChainBuilder;
+import org.apache.mina.common.IoAcceptor;
+import org.apache.mina.common.IoFilterChainBuilder;
+import org.apache.mina.common.IoSession;
+import org.apache.mina.common.SimpleByteBufferAllocator;
+import org.apache.mina.common.ThreadModel;
+import org.apache.mina.common.WriteFuture;
 import org.apache.mina.filter.executor.ExecutorFilter;
 import org.apache.mina.transport.socket.nio.DatagramAcceptor;
-import org.apache.mina.transport.socket.nio.DatagramAcceptorConfig;
 import org.apache.mina.transport.socket.nio.SocketAcceptor;
 import org.apache.mina.transport.socket.nio.SocketAcceptorConfig;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import javax.naming.Context;
-import javax.naming.NamingException;
-import javax.naming.directory.Attributes;
-import javax.naming.directory.DirContext;
-import javax.naming.directory.InitialDirContext;
-import java.io.File;
-import java.io.FileFilter;
-import java.io.IOException;
-import java.net.InetSocketAddress;
-import java.util.ArrayList;
-import java.util.Hashtable;
-import java.util.Iterator;
-import java.util.List;
-import java.util.concurrent.ExecutorService;
-import java.util.concurrent.Executors;
-import java.util.concurrent.TimeUnit;
-
 
 /**
  * Apache Directory Server top level.
@@ -104,12 +99,8 @@
     private File ldifDirectory;
     private final List<LdifLoadFilter> ldifFilters = new ArrayList<LdifLoadFilter>();
 
-    private KdcConfiguration kdcConfiguration = new KdcConfiguration();
-    private NtpConfiguration ntpConfiguration = new NtpConfiguration();
-    private ChangePasswordConfiguration changePasswordConfiguration = new ChangePasswordConfiguration();
     private LdapConfiguration ldapConfiguration = new LdapConfiguration();
     private LdapConfiguration ldapsConfiguration = new LdapConfiguration();
-    private DnsConfiguration dnsConfiguration = new DnsConfiguration();
     private DirectoryService directoryService = new DefaultDirectoryService();
 
     private IoAcceptor tcpAcceptor;
@@ -118,15 +109,6 @@
     protected ExecutorService logicExecutor;
     private boolean ldapsStarted;
     private boolean ldapStarted;
-    private KerberosServer tcpKdcServer;
-    private KerberosServer udpKdcServer;
-    private ChangePasswordServer tcpChangePasswordServer;
-    private ChangePasswordServer udpChangePasswordServer;
-    private NtpServer tcpNtpServer;
-    private NtpServer udpNtpServer;
-    private DnsServer tcpDnsServer;
-    private DnsServer udpDnsServer;
-
 
     public ApacheDS()
     {
@@ -162,10 +144,6 @@
         {
             startLDAP();
             startLDAPS();
-            startKerberos();
-            startChangePassword();
-            startNTP();
-            startDNS();
         }
     }
 
@@ -190,86 +168,6 @@
             ldapsStarted = false;
         }
 
-        if ( tcpKdcServer != null )
-        {
-            tcpKdcServer.destroy();
-            if ( LOG.isInfoEnabled() )
-            {
-                LOG.info( "Unbind of KRB5 Service (TCP) complete: " + tcpKdcServer );
-            }
-            tcpKdcServer = null;
-        }
-
-        if ( udpKdcServer != null )
-        {
-            udpKdcServer.destroy();
-            if ( LOG.isInfoEnabled() )
-            {
-                LOG.info( "Unbind of KRB5 Service (UDP) complete: " + udpKdcServer );
-            }
-            udpKdcServer = null;
-        }
-
-        if ( tcpChangePasswordServer != null )
-        {
-            tcpChangePasswordServer.destroy();
-            if ( LOG.isInfoEnabled() )
-            {
-                LOG.info( "Unbind of Change Password Service (TCP) complete: " + tcpChangePasswordServer
);
-            }
-            tcpChangePasswordServer = null;
-        }
-
-        if ( udpChangePasswordServer != null )
-        {
-            udpChangePasswordServer.destroy();
-            if ( LOG.isInfoEnabled() )
-            {
-                LOG.info( "Unbind of Change Password Service (UDP) complete: " + udpChangePasswordServer
);
-            }
-            udpChangePasswordServer = null;
-        }
-
-        if ( tcpNtpServer != null )
-        {
-            tcpNtpServer.destroy();
-            if ( LOG.isInfoEnabled() )
-            {
-                LOG.info( "Unbind of NTP Service (TCP) complete: " + tcpNtpServer );
-            }
-            tcpNtpServer = null;
-        }
-
-        if ( udpNtpServer != null )
-        {
-            udpNtpServer.destroy();
-            if ( LOG.isInfoEnabled() )
-            {
-                LOG.info( "Unbind of NTP Service (UDP) complete: " + udpNtpServer );
-            }
-            udpNtpServer = null;
-        }
-
-        if ( tcpDnsServer != null )
-        {
-            tcpDnsServer.destroy();
-            if ( LOG.isInfoEnabled() )
-            {
-                LOG.info( "Unbind of DNS Service (TCP) complete: " + tcpDnsServer );
-            }
-            tcpDnsServer = null;
-        }
-
-        if ( udpDnsServer != null )
-        {
-            udpDnsServer.destroy();
-            if ( LOG.isInfoEnabled() )
-            {
-                LOG.info( "Unbind of DNS Service (UDP) complete: " + udpDnsServer );
-            }
-            udpDnsServer = null;
-        }
-
         logicExecutor.shutdown();
         for (;;) {
             try {
@@ -302,42 +200,6 @@
     }
 
 
-    public KdcConfiguration getKdcConfiguration()
-    {
-        return kdcConfiguration;
-    }
-
-
-    public void setKdcConfiguration( KdcConfiguration kdcConfiguration )
-    {
-        this.kdcConfiguration = kdcConfiguration;
-    }
-
-
-    public NtpConfiguration getNtpConfiguration()
-    {
-        return ntpConfiguration;
-    }
-
-
-    public void setNtpConfiguration( NtpConfiguration ntpConfiguration )
-    {
-        this.ntpConfiguration = ntpConfiguration;
-    }
-
-
-    public ChangePasswordConfiguration getChangePasswordConfiguration()
-    {
-        return changePasswordConfiguration;
-    }
-
-
-    public void setChangePasswordConfiguration( ChangePasswordConfiguration changePasswordConfiguration
)
-    {
-        this.changePasswordConfiguration = changePasswordConfiguration;
-    }
-
-
     public LdapConfiguration getLdapConfiguration()
     {
         return ldapConfiguration;
@@ -361,19 +223,6 @@
         this.ldapsConfiguration = ldapsConfiguration;
     }
 
-
-    public DnsConfiguration getDnsConfiguration()
-    {
-        return dnsConfiguration;
-    }
-
-
-    public void setDnsConfiguration( DnsConfiguration dnsConfiguration )
-    {
-        this.dnsConfiguration = dnsConfiguration;
-    }
-
-
     public DirectoryService getDirectoryService()
     {
         return directoryService;
@@ -469,6 +318,15 @@
         this.ldifFilters.addAll( filters );
     }
 
+    public IoAcceptor getTcpAcceptor()
+    {
+        return tcpAcceptor;
+    }
+
+    public IoAcceptor getUdpAcceptor()
+    {
+        return udpAcceptor;
+    }
 
     // ----------------------------------------------------------------------
     // From ServerContextFactory: presently in intermediate step but these
@@ -737,127 +595,6 @@
             throw lce;
         }
     }
-
-
-    private void startKerberos()
-    {
-        // Skip if disabled
-        if ( ! kdcConfiguration.isEnabled() )
-        {
-            return;
-        }
-
-        try
-        {
-            PrincipalStore kdcStore = new JndiPrincipalStoreImpl( kdcConfiguration, directoryService
);
-
-            DatagramAcceptorConfig udpConfig = new DatagramAcceptorConfig();
-            udpConfig.setThreadModel( ThreadModel.MANUAL );
-
-            SocketAcceptorConfig tcpConfig = new SocketAcceptorConfig();
-            tcpConfig.setDisconnectOnUnbind( false );
-            tcpConfig.setReuseAddress( true );
-            tcpConfig.setThreadModel( ThreadModel.MANUAL );
-
-            tcpKdcServer = new KerberosServer( kdcConfiguration, tcpAcceptor, tcpConfig,
kdcStore );
-            udpKdcServer = new KerberosServer( kdcConfiguration, udpAcceptor, udpConfig,
kdcStore );
-        }
-        catch ( Throwable t )
-        {
-            LOG.error( "Failed to start the Kerberos service", t );
-        }
-    }
-
-
-    private void startChangePassword()
-    {
-        // Skip if disabled
-        if ( ! changePasswordConfiguration.isEnabled() )
-        {
-            return;
-        }
-
-        try
-        {
-            PrincipalStore store = new JndiPrincipalStoreImpl( changePasswordConfiguration,
directoryService );
-
-            DatagramAcceptorConfig udpConfig = new DatagramAcceptorConfig();
-            udpConfig.setThreadModel( ThreadModel.MANUAL );
-
-            SocketAcceptorConfig tcpConfig = new SocketAcceptorConfig();
-            tcpConfig.setDisconnectOnUnbind( false );
-            tcpConfig.setReuseAddress( true );
-            tcpConfig.setThreadModel( ThreadModel.MANUAL );
-
-            tcpChangePasswordServer = new ChangePasswordServer( changePasswordConfiguration,
-                    tcpAcceptor, tcpConfig, store );
-            udpChangePasswordServer = new ChangePasswordServer( changePasswordConfiguration,
-                    udpAcceptor, udpConfig, store );
-        }
-        catch ( Throwable t )
-        {
-            LOG.error( "Failed to start the Change Password service", t );
-        }
-    }
-
-
-    private void startNTP()
-    {
-        // Skip if disabled
-        if ( ! ntpConfiguration.isEnabled() )
-        {
-            return;
-        }
-
-        try
-        {
-            DatagramAcceptorConfig udpConfig = new DatagramAcceptorConfig();
-            udpConfig.setThreadModel( ThreadModel.MANUAL );
-
-            SocketAcceptorConfig tcpConfig = new SocketAcceptorConfig();
-            tcpConfig.setDisconnectOnUnbind( false );
-            tcpConfig.setReuseAddress( true );
-            tcpConfig.setThreadModel( ThreadModel.MANUAL );
-
-            tcpNtpServer = new NtpServer( ntpConfiguration, tcpAcceptor, tcpConfig );
-            udpNtpServer = new NtpServer( ntpConfiguration, udpAcceptor, udpConfig );
-        }
-        catch ( Throwable t )
-        {
-            LOG.error( "Failed to start the NTP service", t );
-        }
-    }
-
-
-    private void startDNS()
-    {
-        // Skip if disabled
-        if ( ! dnsConfiguration.isEnabled() )
-        {
-            return;
-        }
-
-        try
-        {
-            RecordStore store = new JndiRecordStoreImpl( dnsConfiguration, directoryService
);
-
-            DatagramAcceptorConfig udpConfig = new DatagramAcceptorConfig();
-            udpConfig.setThreadModel( ThreadModel.MANUAL );
-
-            SocketAcceptorConfig tcpConfig = new SocketAcceptorConfig();
-            tcpConfig.setDisconnectOnUnbind( false );
-            tcpConfig.setReuseAddress( true );
-            tcpConfig.setThreadModel( ThreadModel.MANUAL );
-
-            tcpDnsServer = new DnsServer( dnsConfiguration, tcpAcceptor, tcpConfig, store
);
-            udpDnsServer = new DnsServer( dnsConfiguration, udpAcceptor, udpConfig, store
);
-        }
-        catch ( Throwable t )
-        {
-            LOG.error( "Failed to start the DNS service", t );
-        }
-    }
-
 
     private void stopLDAP0( int port )
     {

Modified: directory/apacheds/branches/bigbang/server-xml/src/main/resources/server.xml
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/server-xml/src/main/resources/server.xml?rev=583375&r1=583374&r2=583375&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/server-xml/src/main/resources/server.xml (original)
+++ directory/apacheds/branches/bigbang/server-xml/src/main/resources/server.xml Wed Oct 10
00:31:43 2007
@@ -1,9 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
 
-<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN"
-        "http://www.springframework.org/dtd/spring-beans.dtd">
 
-<beans>
+<spring:beans xmlns:spring="http://xbean.apache.org/schemas/spring/1.0">
   <apacheDS id="apacheDS" xmlns="http://apacheds.org/config/1.0"
                           synchPeriodMillis="15000"
                           maxThreads="8"
@@ -108,22 +106,6 @@
       </defaultDirectoryService>
     </directoryService>
 
-    <changePasswordConfiguration>
-      <changePasswordConfiguration enabled="false" ipPort="464"/>
-    </changePasswordConfiguration>
-
-    <ntpConfiguration>
-      <ntpConfiguration enabled="false" ipPort="123"/>
-    </ntpConfiguration>
-
-    <dnsConfiguration>
-      <dnsConfiguration enabled="false" ipPort="53"/>
-    </dnsConfiguration>
-
-    <kdcConfiguration>
-      <kdcConfiguration enabled="false" ipPort="88"/>
-    </kdcConfiguration>
-
     <ldapsConfiguration>
       <ldapConfiguration enabled="false" ipPort="636" enableLdaps="true"/>
     </ldapsConfiguration>
@@ -151,7 +133,7 @@
         <saslRealms>
           <value xmlns="http://www.springframework.org/schema/beans">example.com</value>
           <value xmlns="http://www.springframework.org/schema/beans">apache.org</value>
-        </saslRealms>
+        </saslRealms>                                     
 
         <!-- the collection of extended operation handlers to install           -->
         <extendedOperationHandlers>
@@ -165,14 +147,36 @@
     </ldapConfiguration>
   </apacheDS>
 
+  <changePasswordConfiguration ipPort="80464">
+    <directoryService>#directoryService</directoryService>
+    <apacheDs>#apacheDS</apacheDs>
+  </changePasswordConfiguration>
+  <kdcConfiguration ipPort="80088">
+    <directoryService>#directoryService</directoryService>
+    <apacheDs>#apacheDS</apacheDs>
+  </kdcConfiguration>
+  <ntpConfiguration ipPort="80123">
+    <apacheDs>#apacheDS</apacheDs>
+  </ntpConfiguration>
+  <udpNtpConfiguration ipPort="81123">
+    <apacheDs>#apacheDS</apacheDs>
+  </udpNtpConfiguration>
+  <tcpNtpConfiguration ipPort="81123">
+    <apacheDs>#apacheDS</apacheDs>
+  </tcpNtpConfiguration>
+  <dnsConfiguration ipPort="8053">
+    <directoryService>#directoryService</directoryService>
+    <apacheDs>#apacheDS</apacheDs>
+  </dnsConfiguration>
+
   <!-- another bean I didn't convert -->
-  <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>
+  <spring:bean class="org.springframework.beans.factory.config.CustomEditorConfigurer">
+    <spring:property name="customEditors">
+      <spring:map>
+        <spring:entry key="javax.naming.directory.Attributes">
+          <spring:bean class="org.apache.directory.server.core.configuration.AttributesPropertyEditor"/>
+        </spring:entry>
+      </spring:map>
+    </spring:property>
+  </spring:bean>
+</spring:beans>



Mime
View raw message