directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From erodrig...@apache.org
Subject svn commit: r396101 - in /directory/trunks/apacheds/osgi: ./ apacheds/ apacheds/src/main/java/org/apache/ldap/server/ changepw/ changepw/src/main/java/org/apache/changepw/ changepw/src/main/resources/ dns/ dns/src/main/java/org/apache/dns/ dns/src/main...
Date Sat, 22 Apr 2006 09:00:06 GMT
Author: erodriguez
Date: Sat Apr 22 02:00:03 2006
New Revision: 396101

URL: http://svn.apache.org/viewcvs?rev=396101&view=rev
Log:
Updated Apache Directory OSGi build to use Maven M2, latest MINA, latest Directory core and protocols, and Apache Felix:
o  Added Maven M2 POM's.  Removed all Maven 1 infrastructure.
o  Added a parent POM for building OSGi bundles.  This is *NOT* wired into the topmost Directory parent POM.
o  Updated to use latest MINA, refactored from ServiceRegistry to IoAcceptor.
o  Updated to use latest Directory, refactored to use recent package name changes.
o  Refactored to use Apache Felix Service Binder, refactored from org.ungoverned to org.apache.felix
o  Completed other refactoring from Oscar to Felix.
o  Added serialVersionUID's to satisfy compiler warnings.
o  Added log4j.properties to each bundle to make logging work.

TODO:
o  Test more and wire OSGi build parent POM into Directory parent POM.  Possibly merge directly into Directory artifacts.
o  Make logging its own library bundle and pull all logging dependencies out of individual bundles.
o  Update from Service Binder to OSGi R4 SCR now that Felix has a working SCR.
o  Migrate Config Admin service from Apache Directory to Apache Felix.  Directory bundles are CM-ready and will receive configuration from CM.  Dependency resolution is automatic with a Service Binder 0..n cardinality.
o  Figure out how to deploy Apache Felix "strict modularity" config.properties.  Felix system packages must include javax.naming, javax.naming.spi, javax.naming.directory, javax.naming.ldap, and javax.security.auth.kerberos.

Added:
    directory/trunks/apacheds/osgi/apacheds/pom.xml   (with props)
    directory/trunks/apacheds/osgi/changepw/pom.xml   (with props)
    directory/trunks/apacheds/osgi/changepw/src/main/resources/log4j.properties   (with props)
    directory/trunks/apacheds/osgi/dns/pom.xml   (with props)
    directory/trunks/apacheds/osgi/dns/src/main/resources/log4j.properties   (with props)
    directory/trunks/apacheds/osgi/jmx/pom.xml   (with props)
    directory/trunks/apacheds/osgi/kerberos/pom.xml   (with props)
    directory/trunks/apacheds/osgi/kerberos/src/main/resources/log4j.properties   (with props)
    directory/trunks/apacheds/osgi/ldap/pom.xml   (with props)
    directory/trunks/apacheds/osgi/ldap/src/main/resources/log4j.properties   (with props)
    directory/trunks/apacheds/osgi/loader/pom.xml   (with props)
    directory/trunks/apacheds/osgi/loader/src/main/resources/log4j.properties   (with props)
    directory/trunks/apacheds/osgi/network/pom.xml   (with props)
    directory/trunks/apacheds/osgi/ntp/pom.xml   (with props)
    directory/trunks/apacheds/osgi/ntp/src/main/resources/log4j.properties   (with props)
    directory/trunks/apacheds/osgi/pom.xml   (with props)
Modified:
    directory/trunks/apacheds/osgi/apacheds/src/main/java/org/apache/ldap/server/Activator.java
    directory/trunks/apacheds/osgi/changepw/src/main/java/org/apache/changepw/Activator.java
    directory/trunks/apacheds/osgi/changepw/src/main/java/org/apache/changepw/ChangePasswordServerFactory.java
    directory/trunks/apacheds/osgi/dns/src/main/java/org/apache/dns/Activator.java
    directory/trunks/apacheds/osgi/dns/src/main/java/org/apache/dns/DnsServerFactory.java
    directory/trunks/apacheds/osgi/kerberos/src/main/java/org/apache/kerberos/Activator.java
    directory/trunks/apacheds/osgi/kerberos/src/main/java/org/apache/kerberos/KerberosServerFactory.java
    directory/trunks/apacheds/osgi/launcher/src/main/java/org/apache/launcher/Launcher.java
    directory/trunks/apacheds/osgi/ldap/src/main/java/org/apache/ldap/Activator.java
    directory/trunks/apacheds/osgi/ldap/src/main/java/org/apache/ldap/LdapConfig.java
    directory/trunks/apacheds/osgi/ldap/src/main/java/org/apache/ldap/LdapServer.java
    directory/trunks/apacheds/osgi/ldap/src/main/java/org/apache/ldap/LdapServerFactory.java
    directory/trunks/apacheds/osgi/loader/src/main/java/org/apache/ldap/server/loader/Activator.java
    directory/trunks/apacheds/osgi/loader/src/main/java/org/apache/ldap/server/loader/LoadCommand.java
    directory/trunks/apacheds/osgi/loader/src/main/java/org/apache/ldap/server/loader/LoaderConfiguration.java
    directory/trunks/apacheds/osgi/ntp/src/main/java/org/apache/ntp/Activator.java
    directory/trunks/apacheds/osgi/ntp/src/main/java/org/apache/ntp/NtpServerFactory.java

Added: directory/trunks/apacheds/osgi/apacheds/pom.xml
URL: http://svn.apache.org/viewcvs/directory/trunks/apacheds/osgi/apacheds/pom.xml?rev=396101&view=auto
==============================================================================
--- directory/trunks/apacheds/osgi/apacheds/pom.xml (added)
+++ directory/trunks/apacheds/osgi/apacheds/pom.xml Sat Apr 22 02:00:03 2006
@@ -0,0 +1,64 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<project>
+  <modelVersion>4.0.0</modelVersion>
+  <parent>
+    <groupId>org.apache.directory.server</groupId>
+    <artifactId>build</artifactId>
+    <version>1.1.0-SNAPSHOT</version>
+  </parent>
+  <artifactId>apacheds-core-osgi</artifactId>
+  <name>ApacheDS JNDI Backing Store</name>
+  <description>
+    The ApacheDS JNDI Backing Store packaged as an OSGi bundle.
+  </description>
+  <packaging>osgi-bundle</packaging>  
+  <dependencies>
+    <dependency>
+      <groupId>org.slf4j</groupId>
+      <artifactId>nlog4j</artifactId>
+      <version>1.2.19</version>
+      <!--<scope>provided</scope>-->
+    </dependency>
+    <dependency>
+      <groupId>org.apache.directory.server</groupId>
+      <artifactId>apacheds-core</artifactId>
+      <version>${pom.version}</version>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.felix</groupId>
+      <artifactId>org.osgi.core</artifactId>
+      <version>0.8.0-SNAPSHOT</version>
+      <scope>provided</scope>
+    </dependency>
+  </dependencies>
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.felix.plugins</groupId>
+        <artifactId>maven-osgi-plugin</artifactId>
+        <version>0.8.0-SNAPSHOT</version>
+        <extensions>true</extensions>
+        <configuration>
+          <osgiManifest>
+            <bundleName>ApacheDS JNDI Backing Store Bundle</bundleName>
+            <bundleVendor>Apache Software Foundation</bundleVendor>
+            <bundleCategory>Network Service</bundleCategory>
+            <bundleDescription>
+              A bundle that registers the Apache Directory JNDI provider backing store.
+            </bundleDescription>
+            <bundleActivator>
+              org.apache.ldap.server.Activator
+            </bundleActivator>
+            <importPackage>
+              org.osgi.framework,javax.naming,javax.naming.directory,javax.naming.ldap,javax.naming.spi
+            </importPackage>
+            <exportPackage>
+              org.apache.directory.shared.ldap.exception,org.apache.ldap.common.filter,org.apache.ldap.server.jndi,org.apache.directory.server.core.configuration
+            </exportPackage>
+          </osgiManifest>
+        </configuration>
+      </plugin>
+    </plugins>
+  </build>
+</project>
+

Propchange: directory/trunks/apacheds/osgi/apacheds/pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: directory/trunks/apacheds/osgi/apacheds/src/main/java/org/apache/ldap/server/Activator.java
URL: http://svn.apache.org/viewcvs/directory/trunks/apacheds/osgi/apacheds/src/main/java/org/apache/ldap/server/Activator.java?rev=396101&r1=396100&r2=396101&view=diff
==============================================================================
--- directory/trunks/apacheds/osgi/apacheds/src/main/java/org/apache/ldap/server/Activator.java (original)
+++ directory/trunks/apacheds/osgi/apacheds/src/main/java/org/apache/ldap/server/Activator.java Sat Apr 22 02:00:03 2006
@@ -26,19 +26,19 @@
 import javax.naming.NamingException;
 import javax.naming.spi.InitialContextFactory;
 
-import org.apache.ldap.common.message.LockableAttributeImpl;
-import org.apache.ldap.common.message.LockableAttributesImpl;
-import org.apache.ldap.server.configuration.MutableDirectoryPartitionConfiguration;
-import org.apache.ldap.server.configuration.MutableStartupConfiguration;
-import org.apache.ldap.server.configuration.ShutdownConfiguration;
-import org.apache.ldap.server.jndi.CoreContextFactory;
-import org.apache.ldap.server.schema.bootstrap.ApacheSchema;
-import org.apache.ldap.server.schema.bootstrap.ApachednsSchema;
-import org.apache.ldap.server.schema.bootstrap.CoreSchema;
-import org.apache.ldap.server.schema.bootstrap.CosineSchema;
-import org.apache.ldap.server.schema.bootstrap.InetorgpersonSchema;
-import org.apache.ldap.server.schema.bootstrap.Krb5kdcSchema;
-import org.apache.ldap.server.schema.bootstrap.SystemSchema;
+import org.apache.directory.server.core.configuration.MutableDirectoryPartitionConfiguration;
+import org.apache.directory.server.core.configuration.MutableStartupConfiguration;
+import org.apache.directory.server.core.configuration.ShutdownConfiguration;
+import org.apache.directory.server.core.jndi.CoreContextFactory;
+import org.apache.directory.server.core.schema.bootstrap.ApacheSchema;
+import org.apache.directory.server.core.schema.bootstrap.ApachednsSchema;
+import org.apache.directory.server.core.schema.bootstrap.CoreSchema;
+import org.apache.directory.server.core.schema.bootstrap.CosineSchema;
+import org.apache.directory.server.core.schema.bootstrap.InetorgpersonSchema;
+import org.apache.directory.server.core.schema.bootstrap.Krb5kdcSchema;
+import org.apache.directory.server.core.schema.bootstrap.SystemSchema;
+import org.apache.directory.shared.ldap.message.LockableAttributeImpl;
+import org.apache.directory.shared.ldap.message.LockableAttributesImpl;
 import org.osgi.framework.BundleActivator;
 import org.osgi.framework.BundleContext;
 import org.osgi.framework.BundleException;
@@ -61,20 +61,20 @@
      */
     public void start( BundleContext context ) throws BundleException
     {
-        log.debug( "Starting Apache Backing Store." );
+        try
+        {
+            log.debug( "Starting Apache Backing Store." );
 
-        Hashtable env = new Hashtable( setUpPartition() );
+            Hashtable env = new Hashtable( setUpPartition() );
 
-        env.put( Context.PROVIDER_URL, "dc=example,dc=com" );
-        env.put( Context.SECURITY_PRINCIPAL, "uid=admin,ou=system" );
-        env.put( Context.SECURITY_AUTHENTICATION, "simple" );
-        env.put( Context.SECURITY_CREDENTIALS, "secret" );
-        env.put( Context.INITIAL_CONTEXT_FACTORY, "org.apache.ldap.server.jndi.CoreContextFactory" );
+            env.put( Context.PROVIDER_URL, "dc=example,dc=com" );
+            env.put( Context.SECURITY_PRINCIPAL, "uid=admin,ou=system" );
+            env.put( Context.SECURITY_AUTHENTICATION, "simple" );
+            env.put( Context.SECURITY_CREDENTIALS, "secret" );
+            env.put( Context.INITIAL_CONTEXT_FACTORY, "org.apache.ldap.server.jndi.CoreContextFactory" );
 
-        factory = new CoreContextFactory();
+            factory = new CoreContextFactory();
 
-        try
-        {
             factory.getInitialContext( env );
         }
         catch ( NamingException ne )
@@ -120,7 +120,7 @@
         registration = null;
     }
 
-    private Hashtable setUpPartition()
+    private Hashtable setUpPartition() throws NamingException
     {
         MutableStartupConfiguration config = new MutableStartupConfiguration();
 

Added: directory/trunks/apacheds/osgi/changepw/pom.xml
URL: http://svn.apache.org/viewcvs/directory/trunks/apacheds/osgi/changepw/pom.xml?rev=396101&view=auto
==============================================================================
--- directory/trunks/apacheds/osgi/changepw/pom.xml (added)
+++ directory/trunks/apacheds/osgi/changepw/pom.xml Sat Apr 22 02:00:03 2006
@@ -0,0 +1,88 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<project>
+  <modelVersion>4.0.0</modelVersion>
+  <parent>
+    <groupId>org.apache.directory.server</groupId>
+    <artifactId>build</artifactId>
+    <version>1.1.0-SNAPSHOT</version>
+  </parent>
+  <artifactId>apacheds-protocol-osgi-changepw</artifactId>
+  <name>ApacheDS Change Password Protocol Bundle</name>
+  <description>
+    The Change Password Protocol Provider for ApacheDS packaged as an OSGi bundle.
+  </description>
+  <packaging>osgi-bundle</packaging>  
+  <dependencies>
+    <dependency>
+      <groupId>org.slf4j</groupId>
+      <artifactId>nlog4j</artifactId>
+      <version>1.2.19</version>
+      <!--<scope>provided</scope>-->
+    </dependency>
+    <dependency>
+      <groupId>org.apache.directory.mina</groupId>
+      <artifactId>mina-core</artifactId>
+      <version>0.9.2</version>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.directory.server</groupId>
+      <artifactId>apacheds-protocol-shared</artifactId>
+      <version>${pom.version}</version>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.directory.server</groupId>
+      <artifactId>apacheds-kerberos-shared</artifactId>
+      <version>${pom.version}</version>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.directory.server</groupId>
+      <artifactId>apacheds-protocol-changepw</artifactId>
+      <version>${pom.version}</version>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.felix</groupId>
+      <artifactId>org.osgi.core</artifactId>
+      <version>0.8.0-SNAPSHOT</version>
+      <scope>provided</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.felix</groupId>
+      <artifactId>org.osgi.compendium</artifactId>
+      <version>0.8.0-SNAPSHOT</version>
+      <scope>provided</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.felix</groupId>
+      <artifactId>org.apache.felix.servicebinder</artifactId>
+      <version>0.8.0-SNAPSHOT</version>
+      <scope>provided</scope>
+    </dependency>
+  </dependencies>
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.felix.plugins</groupId>
+        <artifactId>maven-osgi-plugin</artifactId>
+        <version>0.8.0-SNAPSHOT</version>
+        <extensions>true</extensions>
+        <configuration>
+          <osgiManifest>
+            <metadataLocation>metadata.xml</metadataLocation>
+            <bundleName>ApacheDS Change Password Server Bundle</bundleName>
+            <bundleVendor>Apache Software Foundation</bundleVendor>
+            <bundleCategory>Network Service</bundleCategory>
+            <bundleDescription>
+              A bundle that registers an Change Password server using the service binder.
+            </bundleDescription>
+            <bundleActivator>
+              org.apache.changepw.Activator
+            </bundleActivator>
+            <importPackage>
+              javax.security.auth.kerberos,org.apache.directory.shared.ldap.exception,javax.naming.directory,org.apache.directory.server.core.configuration,javax.naming,javax.naming.spi,org.apache.felix.servicebinder,org.osgi.framework,org.apache.mina.registry,org.apache.mina.filter,org.apache.mina.filter.codec,org.apache.mina.common,org.osgi.service.cm
+            </importPackage>
+          </osgiManifest>
+        </configuration>
+      </plugin>
+    </plugins>
+  </build>
+</project>

Propchange: directory/trunks/apacheds/osgi/changepw/pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: directory/trunks/apacheds/osgi/changepw/src/main/java/org/apache/changepw/Activator.java
URL: http://svn.apache.org/viewcvs/directory/trunks/apacheds/osgi/changepw/src/main/java/org/apache/changepw/Activator.java?rev=396101&r1=396100&r2=396101&view=diff
==============================================================================
--- directory/trunks/apacheds/osgi/changepw/src/main/java/org/apache/changepw/Activator.java (original)
+++ directory/trunks/apacheds/osgi/changepw/src/main/java/org/apache/changepw/Activator.java Sat Apr 22 02:00:03 2006
@@ -17,7 +17,7 @@
 
 package org.apache.changepw;
 
-import org.ungoverned.gravity.servicebinder.GenericActivator;
+import org.apache.felix.servicebinder.GenericActivator;
 
 public class Activator extends GenericActivator
 {

Modified: directory/trunks/apacheds/osgi/changepw/src/main/java/org/apache/changepw/ChangePasswordServerFactory.java
URL: http://svn.apache.org/viewcvs/directory/trunks/apacheds/osgi/changepw/src/main/java/org/apache/changepw/ChangePasswordServerFactory.java?rev=396101&r1=396100&r2=396101&view=diff
==============================================================================
--- directory/trunks/apacheds/osgi/changepw/src/main/java/org/apache/changepw/ChangePasswordServerFactory.java (original)
+++ directory/trunks/apacheds/osgi/changepw/src/main/java/org/apache/changepw/ChangePasswordServerFactory.java Sat Apr 22 02:00:03 2006
@@ -26,16 +26,19 @@
 
 import javax.naming.spi.InitialContextFactory;
 
-import org.apache.kerberos.store.JndiPrincipalStoreImpl;
-import org.apache.kerberos.store.PrincipalStore;
-import org.apache.mina.registry.ServiceRegistry;
-import org.apache.protocol.common.MapAdapter;
+import org.apache.directory.server.changepw.ChangePasswordConfiguration;
+import org.apache.directory.server.changepw.ChangePasswordServer;
+import org.apache.directory.server.kerberos.shared.store.JndiPrincipalStoreImpl;
+import org.apache.directory.server.kerberos.shared.store.PrincipalStore;
+import org.apache.directory.server.protocol.shared.MapAdapter;
+import org.apache.felix.servicebinder.Lifecycle;
+import org.apache.mina.common.IoAcceptor;
+import org.apache.mina.transport.socket.nio.DatagramAcceptor;
 import org.osgi.service.cm.ConfigurationAdmin;
 import org.osgi.service.cm.ConfigurationException;
 import org.osgi.service.cm.ManagedServiceFactory;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
-import org.ungoverned.gravity.servicebinder.Lifecycle;
 
 public class ChangePasswordServerFactory implements ManagedServiceFactory, Lifecycle
 {
@@ -45,7 +48,7 @@
     private static final String DEFAULT_PID = "org.apache.changepw.default";
 
     private ConfigurationAdmin cm;
-    private ServiceRegistry registry;
+    private IoAcceptor acceptor = new DatagramAcceptor();
     private InitialContextFactory factory;
 
     private Map servers = Collections.synchronizedMap( new HashMap() );
@@ -78,7 +81,7 @@
             {
                 deleted( pid );
                 PrincipalStore store = new JndiPrincipalStoreImpl( changepwConfig, factory );
-                changepwServer = new ChangePasswordServer( changepwConfig, registry, store );
+                changepwServer = new ChangePasswordServer( changepwConfig, acceptor, store );
                 servers.put( pid, changepwServer );
             }
         }
@@ -155,18 +158,6 @@
     {
         this.factory = null;
         log.debug( getName() + " has unbound from " + factory );
-    }
-
-    public void setServiceRegistry( ServiceRegistry registry )
-    {
-        this.registry = registry;
-        log.debug( getName() + " has bound to " + registry );
-    }
-
-    public void unsetServiceRegistry( ServiceRegistry registry )
-    {
-        this.registry = null;
-        log.debug( getName() + " has unbound from " + registry );
     }
 
     public void setConfigurationAdmin( ConfigurationAdmin cm )

Added: directory/trunks/apacheds/osgi/changepw/src/main/resources/log4j.properties
URL: http://svn.apache.org/viewcvs/directory/trunks/apacheds/osgi/changepw/src/main/resources/log4j.properties?rev=396101&view=auto
==============================================================================
--- directory/trunks/apacheds/osgi/changepw/src/main/resources/log4j.properties (added)
+++ directory/trunks/apacheds/osgi/changepw/src/main/resources/log4j.properties Sat Apr 22 02:00:03 2006
@@ -0,0 +1,9 @@
+# Set root logger level to DEBUG and its only appender to A1.
+log4j.rootLogger=DEBUG, A1
+
+# A1 is set to be a ConsoleAppender.
+log4j.appender.A1=org.apache.log4j.ConsoleAppender
+
+# A1 uses PatternLayout.
+log4j.appender.A1.layout=org.apache.log4j.PatternLayout
+log4j.appender.A1.layout.ConversionPattern=%-4r [%t] %-5p %c %x - %m%n

Propchange: directory/trunks/apacheds/osgi/changepw/src/main/resources/log4j.properties
------------------------------------------------------------------------------
    svn:eol-style = native

Added: directory/trunks/apacheds/osgi/dns/pom.xml
URL: http://svn.apache.org/viewcvs/directory/trunks/apacheds/osgi/dns/pom.xml?rev=396101&view=auto
==============================================================================
--- directory/trunks/apacheds/osgi/dns/pom.xml (added)
+++ directory/trunks/apacheds/osgi/dns/pom.xml Sat Apr 22 02:00:03 2006
@@ -0,0 +1,83 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<project>
+  <modelVersion>4.0.0</modelVersion>
+  <parent>
+    <groupId>org.apache.directory.server</groupId>
+    <artifactId>build</artifactId>
+    <version>1.1.0-SNAPSHOT</version>
+  </parent>
+  <artifactId>apacheds-protocol-osgi-dns</artifactId>
+  <name>ApacheDS DNS Protocol Bundle</name>
+  <description>
+    The DNS Protocol Provider for ApacheDS packaged as an OSGi bundle.
+  </description>
+  <packaging>osgi-bundle</packaging>  
+  <dependencies>
+    <dependency>
+      <groupId>org.slf4j</groupId>
+      <artifactId>nlog4j</artifactId>
+      <version>1.2.19</version>
+      <!--<scope>provided</scope>-->
+    </dependency>
+    <dependency>
+      <groupId>org.apache.directory.mina</groupId>
+      <artifactId>mina-core</artifactId>
+      <version>0.9.2</version>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.directory.server</groupId>
+      <artifactId>apacheds-protocol-shared</artifactId>
+      <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.felix</groupId>
+      <artifactId>org.osgi.core</artifactId>
+      <version>0.8.0-SNAPSHOT</version>
+      <scope>provided</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.felix</groupId>
+      <artifactId>org.osgi.compendium</artifactId>
+      <version>0.8.0-SNAPSHOT</version>
+      <scope>provided</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.felix</groupId>
+      <artifactId>org.apache.felix.servicebinder</artifactId>
+      <version>0.8.0-SNAPSHOT</version>
+      <scope>provided</scope>
+    </dependency>
+  </dependencies>
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.felix.plugins</groupId>
+        <artifactId>maven-osgi-plugin</artifactId>
+        <version>0.8.0-SNAPSHOT</version>
+        <extensions>true</extensions>
+        <configuration>
+          <osgiManifest>
+            <metadataLocation>metadata.xml</metadataLocation>
+            <bundleName>ApacheDS DNS Server Bundle</bundleName>
+            <bundleVendor>Apache Software Foundation</bundleVendor>
+            <bundleCategory>Network Service</bundleCategory>
+            <bundleDescription>
+              A bundle that registers an DNS server using the service binder.
+            </bundleDescription>
+            <bundleActivator>
+              org.apache.dns.Activator
+            </bundleActivator>
+            <importPackage>
+              org.apache.directory.shared.ldap.exception,javax.naming.directory,org.apache.directory.server.core.configuration,javax.naming,javax.naming.spi,org.apache.felix.servicebinder,org.osgi.framework,org.apache.mina.registry,org.apache.mina.filter,org.apache.mina.filter.codec,org.apache.mina.common,org.osgi.service.cm
+            </importPackage>
+          </osgiManifest>
+        </configuration>
+      </plugin>
+    </plugins>
+  </build>
+</project>

Propchange: directory/trunks/apacheds/osgi/dns/pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: directory/trunks/apacheds/osgi/dns/src/main/java/org/apache/dns/Activator.java
URL: http://svn.apache.org/viewcvs/directory/trunks/apacheds/osgi/dns/src/main/java/org/apache/dns/Activator.java?rev=396101&r1=396100&r2=396101&view=diff
==============================================================================
--- directory/trunks/apacheds/osgi/dns/src/main/java/org/apache/dns/Activator.java (original)
+++ directory/trunks/apacheds/osgi/dns/src/main/java/org/apache/dns/Activator.java Sat Apr 22 02:00:03 2006
@@ -17,7 +17,7 @@
 
 package org.apache.dns;
 
-import org.ungoverned.gravity.servicebinder.GenericActivator;
+import org.apache.felix.servicebinder.GenericActivator;
 
 public class Activator extends GenericActivator
 {

Modified: directory/trunks/apacheds/osgi/dns/src/main/java/org/apache/dns/DnsServerFactory.java
URL: http://svn.apache.org/viewcvs/directory/trunks/apacheds/osgi/dns/src/main/java/org/apache/dns/DnsServerFactory.java?rev=396101&r1=396100&r2=396101&view=diff
==============================================================================
--- directory/trunks/apacheds/osgi/dns/src/main/java/org/apache/dns/DnsServerFactory.java (original)
+++ directory/trunks/apacheds/osgi/dns/src/main/java/org/apache/dns/DnsServerFactory.java Sat Apr 22 02:00:03 2006
@@ -26,16 +26,19 @@
 
 import javax.naming.spi.InitialContextFactory;
 
-import org.apache.dns.store.JndiRecordStoreImpl;
-import org.apache.dns.store.RecordStore;
-import org.apache.mina.registry.ServiceRegistry;
-import org.apache.protocol.common.MapAdapter;
+import org.apache.directory.server.dns.DnsConfiguration;
+import org.apache.directory.server.dns.DnsServer;
+import org.apache.directory.server.dns.store.JndiRecordStoreImpl;
+import org.apache.directory.server.dns.store.RecordStore;
+import org.apache.directory.server.protocol.shared.MapAdapter;
+import org.apache.felix.servicebinder.Lifecycle;
+import org.apache.mina.common.IoAcceptor;
+import org.apache.mina.transport.socket.nio.DatagramAcceptor;
 import org.osgi.service.cm.ConfigurationAdmin;
 import org.osgi.service.cm.ConfigurationException;
 import org.osgi.service.cm.ManagedServiceFactory;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
-import org.ungoverned.gravity.servicebinder.Lifecycle;
 
 public class DnsServerFactory implements ManagedServiceFactory, Lifecycle
 {
@@ -45,7 +48,7 @@
     private static final String DEFAULT_PID = "org.apache.dns.default";
 
     private ConfigurationAdmin cm;
-    private ServiceRegistry registry;
+    private IoAcceptor acceptor = new DatagramAcceptor();
     private InitialContextFactory factory;
 
     private Map servers = Collections.synchronizedMap( new HashMap() );
@@ -78,7 +81,7 @@
             {
                 deleted( pid );
                 RecordStore store = new JndiRecordStoreImpl( dnsConfig, factory );
-                dnsServer = new DnsServer( dnsConfig, registry, store );
+                dnsServer = new DnsServer( dnsConfig, acceptor, store );
                 servers.put( pid, dnsServer );
             }
         }
@@ -155,18 +158,6 @@
     {
         this.factory = null;
         log.debug( getName() + " has unbound from " + factory );
-    }
-
-    public void setServiceRegistry( ServiceRegistry registry )
-    {
-        this.registry = registry;
-        log.debug( getName() + " has bound to " + registry );
-    }
-
-    public void unsetServiceRegistry( ServiceRegistry registry )
-    {
-        this.registry = null;
-        log.debug( getName() + " has unbound from " + registry );
     }
 
     public void setConfigurationAdmin( ConfigurationAdmin cm )

Added: directory/trunks/apacheds/osgi/dns/src/main/resources/log4j.properties
URL: http://svn.apache.org/viewcvs/directory/trunks/apacheds/osgi/dns/src/main/resources/log4j.properties?rev=396101&view=auto
==============================================================================
--- directory/trunks/apacheds/osgi/dns/src/main/resources/log4j.properties (added)
+++ directory/trunks/apacheds/osgi/dns/src/main/resources/log4j.properties Sat Apr 22 02:00:03 2006
@@ -0,0 +1,9 @@
+# Set root logger level to DEBUG and its only appender to A1.
+log4j.rootLogger=DEBUG, A1
+
+# A1 is set to be a ConsoleAppender.
+log4j.appender.A1=org.apache.log4j.ConsoleAppender
+
+# A1 uses PatternLayout.
+log4j.appender.A1.layout=org.apache.log4j.PatternLayout
+log4j.appender.A1.layout.ConversionPattern=%-4r [%t] %-5p %c %x - %m%n

Propchange: directory/trunks/apacheds/osgi/dns/src/main/resources/log4j.properties
------------------------------------------------------------------------------
    svn:eol-style = native

Added: directory/trunks/apacheds/osgi/jmx/pom.xml
URL: http://svn.apache.org/viewcvs/directory/trunks/apacheds/osgi/jmx/pom.xml?rev=396101&view=auto
==============================================================================
--- directory/trunks/apacheds/osgi/jmx/pom.xml (added)
+++ directory/trunks/apacheds/osgi/jmx/pom.xml Sat Apr 22 02:00:03 2006
@@ -0,0 +1,61 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<project>
+  <modelVersion>4.0.0</modelVersion>
+  <parent>
+    <groupId>org.apache.directory.server</groupId>
+    <artifactId>build</artifactId>
+    <version>1.1.0-SNAPSHOT</version>
+  </parent>
+  <artifactId>apacheds-jmx-osgi</artifactId>
+  <name>ApacheDS JMX Logger Bundle</name>
+  <description>
+    An example showing how to use a JMX subsystem with OSGi bundles.
+  </description>
+  <packaging>osgi-bundle</packaging>  
+  <dependencies>
+    <dependency>
+      <groupId>org.slf4j</groupId>
+      <artifactId>nlog4j</artifactId>
+      <version>1.2.19</version>
+      <!--<scope>provided</scope>-->
+    </dependency>
+    <dependency>
+      <groupId>mx4j</groupId>
+      <artifactId>mx4j-jmx</artifactId>
+      <version>3.0.1</version>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.felix</groupId>
+      <artifactId>org.osgi.core</artifactId>
+      <version>0.8.0-SNAPSHOT</version>
+      <scope>provided</scope>
+    </dependency>
+  </dependencies>
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.felix.plugins</groupId>
+        <artifactId>maven-osgi-plugin</artifactId>
+        <version>0.8.0-SNAPSHOT</version>
+        <extensions>true</extensions>
+        <configuration>
+          <osgiManifest>
+            <metadataLocation>metadata.xml</metadataLocation>
+            <bundleName>ApacheDS JMX Logger Bundle</bundleName>
+            <bundleVendor>Apache Software Foundation</bundleVendor>
+            <bundleCategory>Network Service</bundleCategory>
+            <bundleDescription>
+              A bundle that registers an NTP server using the service binder.
+            </bundleDescription>
+            <bundleActivator>
+              org.apache.jmx.JmxLogger
+            </bundleActivator>
+            <importPackage>
+              org.osgi.framework
+            </importPackage>
+          </osgiManifest>
+        </configuration>
+      </plugin>
+    </plugins>
+  </build>
+</project>

Propchange: directory/trunks/apacheds/osgi/jmx/pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Added: directory/trunks/apacheds/osgi/kerberos/pom.xml
URL: http://svn.apache.org/viewcvs/directory/trunks/apacheds/osgi/kerberos/pom.xml?rev=396101&view=auto
==============================================================================
--- directory/trunks/apacheds/osgi/kerberos/pom.xml (added)
+++ directory/trunks/apacheds/osgi/kerberos/pom.xml Sat Apr 22 02:00:03 2006
@@ -0,0 +1,88 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<project>
+  <modelVersion>4.0.0</modelVersion>
+  <parent>
+    <groupId>org.apache.directory.server</groupId>
+    <artifactId>build</artifactId>
+    <version>1.1.0-SNAPSHOT</version>
+  </parent>
+  <artifactId>apacheds-protocol-osgi-kerberos</artifactId>
+  <name>ApacheDS Kerberos Protocol Bundle</name>
+  <description>
+    The Kerberos Protocol Provider for ApacheDS packaged as an OSGi bundle.
+  </description>
+  <packaging>osgi-bundle</packaging>  
+  <dependencies>
+    <dependency>
+      <groupId>org.slf4j</groupId>
+      <artifactId>nlog4j</artifactId>
+      <version>1.2.19</version>
+      <!--<scope>provided</scope>-->
+    </dependency>
+    <dependency>
+      <groupId>org.apache.directory.mina</groupId>
+      <artifactId>mina-core</artifactId>
+      <version>0.9.2</version>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.directory.server</groupId>
+      <artifactId>apacheds-protocol-shared</artifactId>
+      <version>${pom.version}</version>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.directory.server</groupId>
+      <artifactId>apacheds-kerberos-shared</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.felix</groupId>
+      <artifactId>org.osgi.core</artifactId>
+      <version>0.8.0-SNAPSHOT</version>
+      <scope>provided</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.felix</groupId>
+      <artifactId>org.osgi.compendium</artifactId>
+      <version>0.8.0-SNAPSHOT</version>
+      <scope>provided</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.felix</groupId>
+      <artifactId>org.apache.felix.servicebinder</artifactId>
+      <version>0.8.0-SNAPSHOT</version>
+      <scope>provided</scope>
+    </dependency>
+  </dependencies>
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.felix.plugins</groupId>
+        <artifactId>maven-osgi-plugin</artifactId>
+        <version>0.8.0-SNAPSHOT</version>
+        <extensions>true</extensions>
+        <configuration>
+          <osgiManifest>
+            <metadataLocation>metadata.xml</metadataLocation>
+            <bundleName>ApacheDS Kerberos Server Bundle</bundleName>
+            <bundleVendor>Apache Software Foundation</bundleVendor>
+            <bundleCategory>Network Service</bundleCategory>
+            <bundleDescription>
+              A bundle that registers an Kerberos server using the service binder.
+            </bundleDescription>
+            <bundleActivator>
+              org.apache.kerberos.Activator
+            </bundleActivator>
+            <importPackage>
+              javax.security.auth.kerberos,org.apache.directory.shared.ldap.exception,javax.naming.directory,org.apache.directory.server.core.configuration,javax.naming,javax.naming.spi,org.apache.felix.servicebinder,org.osgi.framework,org.apache.mina.registry,org.apache.mina.filter,org.apache.mina.filter.codec,org.apache.mina.common,org.osgi.service.cm
+            </importPackage>
+          </osgiManifest>
+        </configuration>
+      </plugin>
+    </plugins>
+  </build>
+</project>

Propchange: directory/trunks/apacheds/osgi/kerberos/pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: directory/trunks/apacheds/osgi/kerberos/src/main/java/org/apache/kerberos/Activator.java
URL: http://svn.apache.org/viewcvs/directory/trunks/apacheds/osgi/kerberos/src/main/java/org/apache/kerberos/Activator.java?rev=396101&r1=396100&r2=396101&view=diff
==============================================================================
--- directory/trunks/apacheds/osgi/kerberos/src/main/java/org/apache/kerberos/Activator.java (original)
+++ directory/trunks/apacheds/osgi/kerberos/src/main/java/org/apache/kerberos/Activator.java Sat Apr 22 02:00:03 2006
@@ -17,7 +17,7 @@
 
 package org.apache.kerberos;
 
-import org.ungoverned.gravity.servicebinder.GenericActivator;
+import org.apache.felix.servicebinder.GenericActivator;
 
 public class Activator extends GenericActivator
 {

Modified: directory/trunks/apacheds/osgi/kerberos/src/main/java/org/apache/kerberos/KerberosServerFactory.java
URL: http://svn.apache.org/viewcvs/directory/trunks/apacheds/osgi/kerberos/src/main/java/org/apache/kerberos/KerberosServerFactory.java?rev=396101&r1=396100&r2=396101&view=diff
==============================================================================
--- directory/trunks/apacheds/osgi/kerberos/src/main/java/org/apache/kerberos/KerberosServerFactory.java (original)
+++ directory/trunks/apacheds/osgi/kerberos/src/main/java/org/apache/kerberos/KerberosServerFactory.java Sat Apr 22 02:00:03 2006
@@ -26,18 +26,19 @@
 
 import javax.naming.spi.InitialContextFactory;
 
-import org.apache.kerberos.kdc.KdcConfiguration;
-import org.apache.kerberos.kdc.KerberosServer;
-import org.apache.kerberos.store.JndiPrincipalStoreImpl;
-import org.apache.kerberos.store.PrincipalStore;
-import org.apache.mina.registry.ServiceRegistry;
-import org.apache.protocol.common.MapAdapter;
+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.protocol.shared.MapAdapter;
+import org.apache.felix.servicebinder.Lifecycle;
+import org.apache.mina.common.IoAcceptor;
+import org.apache.mina.transport.socket.nio.DatagramAcceptor;
 import org.osgi.service.cm.ConfigurationAdmin;
 import org.osgi.service.cm.ConfigurationException;
 import org.osgi.service.cm.ManagedServiceFactory;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
-import org.ungoverned.gravity.servicebinder.Lifecycle;
 
 public class KerberosServerFactory implements ManagedServiceFactory, Lifecycle
 {
@@ -47,7 +48,7 @@
     private static final String DEFAULT_PID = "org.apache.kerberos.default";
 
     private ConfigurationAdmin cm;
-    private ServiceRegistry registry;
+    private IoAcceptor acceptor = new DatagramAcceptor();
     private InitialContextFactory factory;
 
     private Map servers = Collections.synchronizedMap( new HashMap() );
@@ -80,7 +81,7 @@
             {
                 deleted( pid );
                 PrincipalStore store = new JndiPrincipalStoreImpl( kerberosConfig, factory );
-                server = new KerberosServer( kerberosConfig, registry, store );
+                server = new KerberosServer( kerberosConfig, acceptor, store );
                 servers.put( pid, server );
             }
         }
@@ -157,18 +158,6 @@
     {
         this.factory = null;
         log.debug( getName() + " has unbound from " + factory );
-    }
-
-    public void setServiceRegistry( ServiceRegistry registry )
-    {
-        this.registry = registry;
-        log.debug( getName() + " has bound to " + registry );
-    }
-
-    public void unsetServiceRegistry( ServiceRegistry registry )
-    {
-        this.registry = null;
-        log.debug( getName() + " has unbound from " + registry );
     }
 
     public void setConfigurationAdmin( ConfigurationAdmin cm )

Added: directory/trunks/apacheds/osgi/kerberos/src/main/resources/log4j.properties
URL: http://svn.apache.org/viewcvs/directory/trunks/apacheds/osgi/kerberos/src/main/resources/log4j.properties?rev=396101&view=auto
==============================================================================
--- directory/trunks/apacheds/osgi/kerberos/src/main/resources/log4j.properties (added)
+++ directory/trunks/apacheds/osgi/kerberos/src/main/resources/log4j.properties Sat Apr 22 02:00:03 2006
@@ -0,0 +1,9 @@
+# Set root logger level to DEBUG and its only appender to A1.
+log4j.rootLogger=DEBUG, A1
+
+# A1 is set to be a ConsoleAppender.
+log4j.appender.A1=org.apache.log4j.ConsoleAppender
+
+# A1 uses PatternLayout.
+log4j.appender.A1.layout=org.apache.log4j.PatternLayout
+log4j.appender.A1.layout.ConversionPattern=%-4r [%t] %-5p %c %x - %m%n

Propchange: directory/trunks/apacheds/osgi/kerberos/src/main/resources/log4j.properties
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: directory/trunks/apacheds/osgi/launcher/src/main/java/org/apache/launcher/Launcher.java
URL: http://svn.apache.org/viewcvs/directory/trunks/apacheds/osgi/launcher/src/main/java/org/apache/launcher/Launcher.java?rev=396101&r1=396100&r2=396101&view=diff
==============================================================================
--- directory/trunks/apacheds/osgi/launcher/src/main/java/org/apache/launcher/Launcher.java (original)
+++ directory/trunks/apacheds/osgi/launcher/src/main/java/org/apache/launcher/Launcher.java Sat Apr 22 02:00:03 2006
@@ -25,9 +25,9 @@
 import java.util.ArrayList;
 import java.util.List;
 
+import org.apache.felix.framework.Felix;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
-import org.ungoverned.oscar.Oscar;
 
 /**
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
@@ -328,7 +328,7 @@
         System.setProperty( "oscar.strict.osgi", "false" );
         System.setProperty( "oscar.embedded.execution", embedded ? "true" : "false" );
 
-        Oscar main = new Oscar();
+        new Felix();
     }
 
     /**

Added: directory/trunks/apacheds/osgi/ldap/pom.xml
URL: http://svn.apache.org/viewcvs/directory/trunks/apacheds/osgi/ldap/pom.xml?rev=396101&view=auto
==============================================================================
--- directory/trunks/apacheds/osgi/ldap/pom.xml (added)
+++ directory/trunks/apacheds/osgi/ldap/pom.xml Sat Apr 22 02:00:03 2006
@@ -0,0 +1,91 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<project>
+  <modelVersion>4.0.0</modelVersion>
+  <parent>
+    <groupId>org.apache.directory.server</groupId>
+    <artifactId>build</artifactId>
+    <version>1.1.0-SNAPSHOT</version>
+  </parent>
+  <artifactId>apacheds-protocol-osgi-ldap</artifactId>
+  <name>ApacheDS LDAP Protocol Bundle</name>
+  <description>
+    The ApacheDS LDAP Network Service packaged as an OSGi bundle.
+  </description>
+  <packaging>osgi-bundle</packaging>  
+  <dependencies>
+    <dependency>
+      <groupId>org.slf4j</groupId>
+      <artifactId>nlog4j</artifactId>
+      <version>1.2.19</version>
+      <!--<scope>provided</scope>-->
+    </dependency>
+    <dependency>
+      <groupId>org.apache.directory.mina</groupId>
+      <artifactId>mina-core</artifactId>
+      <version>0.9.2</version>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.directory.server</groupId>
+      <artifactId>apacheds-protocol-shared</artifactId>
+      <version>${pom.version}</version>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.directory.server</groupId>
+      <artifactId>apacheds-core</artifactId>
+      <version>${pom.version}</version>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.directory.server</groupId>
+      <artifactId>apacheds-protocol-ldap</artifactId>
+      <version>${pom.version}</version>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.felix</groupId>
+      <artifactId>org.osgi.core</artifactId>
+      <version>0.8.0-SNAPSHOT</version>
+      <scope>provided</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.felix</groupId>
+      <artifactId>org.osgi.compendium</artifactId>
+      <version>0.8.0-SNAPSHOT</version>
+      <scope>provided</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.felix</groupId>
+      <artifactId>org.apache.felix.servicebinder</artifactId>
+      <version>0.8.0-SNAPSHOT</version>
+      <scope>provided</scope>
+    </dependency>
+  </dependencies>
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.felix.plugins</groupId>
+        <artifactId>maven-osgi-plugin</artifactId>
+        <version>0.8.0-SNAPSHOT</version>
+        <extensions>true</extensions>
+        <configuration>
+          <osgiManifest>
+            <bundleName>ApacheDS LDAP Protocol Bundle</bundleName>
+            <bundleVendor>Apache Software Foundation</bundleVendor>
+            <bundleCategory>Network Service</bundleCategory>
+            <bundleDescription>
+              A bundle that registers the Apache Directory JNDI provider backing store.
+            </bundleDescription>
+            <bundleActivator>
+              org.apache.ldap.Activator
+            </bundleActivator>
+            <importPackage>
+              org.osgi.framework,javax.naming,javax.naming.directory,javax.naming.ldap,javax.naming.spi,org.apache.mina.registry,org.apache.mina.protocol,org.apache.mina.protocol.handler,org.apache.mina.protocol.codec,org.apache.mina.common,org.osgi.service.cm
+            </importPackage>
+            <exportPackage>
+              org.apache.directory.shared.ldap.exception,org.apache.ldap.common.filter,org.apache.ldap.server.jndi,org.apache.directory.server.core.configuration
+            </exportPackage>
+          </osgiManifest>
+        </configuration>
+      </plugin>
+    </plugins>
+  </build>
+</project>
+

Propchange: directory/trunks/apacheds/osgi/ldap/pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: directory/trunks/apacheds/osgi/ldap/src/main/java/org/apache/ldap/Activator.java
URL: http://svn.apache.org/viewcvs/directory/trunks/apacheds/osgi/ldap/src/main/java/org/apache/ldap/Activator.java?rev=396101&r1=396100&r2=396101&view=diff
==============================================================================
--- directory/trunks/apacheds/osgi/ldap/src/main/java/org/apache/ldap/Activator.java (original)
+++ directory/trunks/apacheds/osgi/ldap/src/main/java/org/apache/ldap/Activator.java Sat Apr 22 02:00:03 2006
@@ -17,7 +17,7 @@
 
 package org.apache.ldap;
 
-import org.ungoverned.gravity.servicebinder.GenericActivator;
+import org.apache.felix.servicebinder.GenericActivator;
 
 public class Activator extends GenericActivator
 {

Modified: directory/trunks/apacheds/osgi/ldap/src/main/java/org/apache/ldap/LdapConfig.java
URL: http://svn.apache.org/viewcvs/directory/trunks/apacheds/osgi/ldap/src/main/java/org/apache/ldap/LdapConfig.java?rev=396101&r1=396100&r2=396101&view=diff
==============================================================================
--- directory/trunks/apacheds/osgi/ldap/src/main/java/org/apache/ldap/LdapConfig.java (original)
+++ directory/trunks/apacheds/osgi/ldap/src/main/java/org/apache/ldap/LdapConfig.java Sat Apr 22 02:00:03 2006
@@ -21,12 +21,14 @@
 import java.util.HashMap;
 import java.util.Map;
 
-import org.apache.ldap.server.DirectoryService;
-import org.apache.ldap.server.configuration.Configuration;
-import org.apache.ldap.server.configuration.ConfigurationException;
+import org.apache.directory.server.core.DirectoryService;
+import org.apache.directory.server.core.configuration.Configuration;
+import org.apache.directory.server.core.configuration.ConfigurationException;
 
 public class LdapConfig extends Configuration
 {
+    private static final long serialVersionUID = 6738567218407227901L;
+
     public static String LDAP_PORT_KEY = "ldap.port";
     public static String LDAPS_PORT_KEY = "ldaps.port";
 

Modified: directory/trunks/apacheds/osgi/ldap/src/main/java/org/apache/ldap/LdapServer.java
URL: http://svn.apache.org/viewcvs/directory/trunks/apacheds/osgi/ldap/src/main/java/org/apache/ldap/LdapServer.java?rev=396101&r1=396100&r2=396101&view=diff
==============================================================================
--- directory/trunks/apacheds/osgi/ldap/src/main/java/org/apache/ldap/LdapServer.java (original)
+++ directory/trunks/apacheds/osgi/ldap/src/main/java/org/apache/ldap/LdapServer.java Sat Apr 22 02:00:03 2006
@@ -18,14 +18,13 @@
 package org.apache.ldap;
 
 import java.io.IOException;
+import java.net.InetSocketAddress;
 import java.util.Dictionary;
 import java.util.Hashtable;
 
-import org.apache.ldap.common.exception.LdapNamingException;
-import org.apache.ldap.server.protocol.LdapProtocolProvider;
-import org.apache.mina.common.TransportType;
-import org.apache.mina.registry.Service;
-import org.apache.mina.registry.ServiceRegistry;
+import org.apache.directory.server.ldap.LdapProtocolProvider;
+import org.apache.directory.shared.ldap.exception.LdapNamingException;
+import org.apache.mina.common.IoAcceptor;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -34,34 +33,25 @@
     /** the log for this class */
     private static final Logger log = LoggerFactory.getLogger( LdapServer.class );
 
-    private ServiceRegistry registry;
-    private LdapProtocolProvider provider;
-    private Service tcpService;
-
     private LdapConfig config;
+    private IoAcceptor acceptor;
+    private LdapProtocolProvider provider;
 
-    private String name;
-    private int port = -1;
-
-    public LdapServer( LdapConfig config, ServiceRegistry registry, Hashtable env )
+    public LdapServer( LdapConfig config, IoAcceptor acceptor, Hashtable env )
     {
         this.config = config;
-        this.registry = registry;
+        this.acceptor = acceptor;
 
-        port = config.getPort();
-        name = config.getName();
+        String name = config.getName();
+        int port = config.getPort();
 
         try
         {
-            log.debug( name + " starting on " + port );
-
             provider = new LdapProtocolProvider( (Hashtable) env.clone() );
 
-            tcpService = new Service( name, TransportType.SOCKET, port );
-
-            registry.bind( tcpService, provider.getHandler() );
+            acceptor.bind( new InetSocketAddress( port ), provider.getHandler() );
 
-            log.debug( name + " listening on port " + port );
+            log.debug( "{} listening on port {}", name, new Integer( port ) );
         }
         catch ( LdapNamingException lne )
         {
@@ -80,12 +70,11 @@
 
     public void destroy()
     {
-        registry.unbind( tcpService );
+        acceptor.unbind( new InetSocketAddress( config.getPort() ) );
 
-        registry = null;
+        acceptor = null;
         provider = null;
-        tcpService = null;
 
-        log.debug( name + " has stopped listening on port " + port );
+        log.debug( "{} has stopped listening on port {}", config.getName(), new Integer( config.getPort() ) );
     }
 }

Modified: directory/trunks/apacheds/osgi/ldap/src/main/java/org/apache/ldap/LdapServerFactory.java
URL: http://svn.apache.org/viewcvs/directory/trunks/apacheds/osgi/ldap/src/main/java/org/apache/ldap/LdapServerFactory.java?rev=396101&r1=396100&r2=396101&view=diff
==============================================================================
--- directory/trunks/apacheds/osgi/ldap/src/main/java/org/apache/ldap/LdapServerFactory.java (original)
+++ directory/trunks/apacheds/osgi/ldap/src/main/java/org/apache/ldap/LdapServerFactory.java Sat Apr 22 02:00:03 2006
@@ -27,15 +27,16 @@
 import javax.naming.Context;
 import javax.naming.spi.InitialContextFactory;
 
-import org.apache.ldap.server.configuration.StartupConfiguration;
-import org.apache.mina.registry.ServiceRegistry;
-import org.apache.protocol.common.MapAdapter;
+import org.apache.directory.server.core.configuration.StartupConfiguration;
+import org.apache.directory.server.protocol.shared.MapAdapter;
+import org.apache.felix.servicebinder.Lifecycle;
+import org.apache.mina.common.IoAcceptor;
+import org.apache.mina.transport.socket.nio.SocketAcceptor;
 import org.osgi.service.cm.ConfigurationAdmin;
 import org.osgi.service.cm.ConfigurationException;
 import org.osgi.service.cm.ManagedServiceFactory;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
-import org.ungoverned.gravity.servicebinder.Lifecycle;
 
 public class LdapServerFactory implements ManagedServiceFactory, Lifecycle
 {
@@ -45,7 +46,7 @@
     private static final String DEFAULT_PID = "org.apache.ldap.default";
 
     private Map servers = Collections.synchronizedMap( new HashMap() );
-    private ServiceRegistry registry;
+    private IoAcceptor acceptor = new SocketAcceptor();
     private ConfigurationAdmin cm;
     private InitialContextFactory factory;
     private Hashtable env;
@@ -77,7 +78,7 @@
             if ( server == null || server.isDifferent( config ) )
             {
                 deleted( pid );
-                server = new LdapServer( ldapConfig, registry, env );
+                server = new LdapServer( ldapConfig, acceptor, env );
                 servers.put( pid, server );
             }
         }
@@ -157,18 +158,6 @@
     {
         this.factory = null;
         log.debug( getName() + " has unbound from " + factory );
-    }
-
-    public void setServiceRegistry( ServiceRegistry registry )
-    {
-        this.registry = registry;
-        log.debug( getName() + " has bound to " + registry );
-    }
-
-    public void unsetServiceRegistry( ServiceRegistry registry )
-    {
-        this.registry = null;
-        log.debug( getName() + " has unbound from " + registry );
     }
 
     public void setConfigurationAdmin( ConfigurationAdmin cm )

Added: directory/trunks/apacheds/osgi/ldap/src/main/resources/log4j.properties
URL: http://svn.apache.org/viewcvs/directory/trunks/apacheds/osgi/ldap/src/main/resources/log4j.properties?rev=396101&view=auto
==============================================================================
--- directory/trunks/apacheds/osgi/ldap/src/main/resources/log4j.properties (added)
+++ directory/trunks/apacheds/osgi/ldap/src/main/resources/log4j.properties Sat Apr 22 02:00:03 2006
@@ -0,0 +1,9 @@
+# Set root logger level to DEBUG and its only appender to A1.
+log4j.rootLogger=DEBUG, A1
+
+# A1 is set to be a ConsoleAppender.
+log4j.appender.A1=org.apache.log4j.ConsoleAppender
+
+# A1 uses PatternLayout.
+log4j.appender.A1.layout=org.apache.log4j.PatternLayout
+log4j.appender.A1.layout.ConversionPattern=%-4r [%t] %-5p %c %x - %m%n

Propchange: directory/trunks/apacheds/osgi/ldap/src/main/resources/log4j.properties
------------------------------------------------------------------------------
    svn:eol-style = native

Added: directory/trunks/apacheds/osgi/loader/pom.xml
URL: http://svn.apache.org/viewcvs/directory/trunks/apacheds/osgi/loader/pom.xml?rev=396101&view=auto
==============================================================================
--- directory/trunks/apacheds/osgi/loader/pom.xml (added)
+++ directory/trunks/apacheds/osgi/loader/pom.xml Sat Apr 22 02:00:03 2006
@@ -0,0 +1,81 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<project>
+  <modelVersion>4.0.0</modelVersion>
+  <parent>
+    <groupId>org.apache.directory.server</groupId>
+    <artifactId>build</artifactId>
+    <version>1.1.0-SNAPSHOT</version>
+  </parent>
+  <artifactId>apacheds-command-osgi-loader</artifactId>
+  <name>ApacheDS LDIF Loader Console Command</name>
+  <description>
+    The ApacheDS LDIF Loader Console Command packaged as an OSGi bundle.
+  </description>
+  <packaging>osgi-bundle</packaging>  
+  <dependencies>
+    <dependency>
+      <groupId>org.slf4j</groupId>
+      <artifactId>nlog4j</artifactId>
+      <version>1.2.19</version>
+      <!--<scope>provided</scope>-->
+    </dependency>
+    <dependency>
+      <groupId>org.apache.directory.server</groupId>
+      <artifactId>apacheds-protocol-shared</artifactId>
+      <version>${pom.version}</version>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.directory.server</groupId>
+      <artifactId>apacheds-core</artifactId>
+      <version>${pom.version}</version>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.felix</groupId>
+      <artifactId>org.osgi.core</artifactId>
+      <version>0.8.0-SNAPSHOT</version>
+      <scope>provided</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.felix</groupId>
+      <artifactId>org.apache.felix.shell</artifactId>
+      <version>0.8.0-SNAPSHOT</version>
+      <scope>provided</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.felix</groupId>
+      <artifactId>org.apache.felix.servicebinder</artifactId>
+      <version>0.8.0-SNAPSHOT</version>
+      <scope>provided</scope>
+    </dependency>
+  </dependencies>
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.felix.plugins</groupId>
+        <artifactId>maven-osgi-plugin</artifactId>
+        <version>0.8.0-SNAPSHOT</version>
+        <extensions>true</extensions>
+        <configuration>
+          <osgiManifest>
+            <bundleName>ApacheDS LDIF Loader Console Command</bundleName>
+            <bundleVendor>Apache Software Foundation</bundleVendor>
+            <bundleCategory>Network Service</bundleCategory>
+            <bundleDescription>
+              A bundle that registers the Apache Directory LDIF Loader Console Command.
+            </bundleDescription>
+            <bundleActivator>
+              org.apache.ldap.server.loader.Activator
+            </bundleActivator>
+            <importPackage>
+              org.osgi.framework,javax.naming,javax.naming.directory,javax.naming.ldap,javax.naming.spi
+            </importPackage>
+            <exportPackage>
+              org.apache.directory.shared.ldap.exception,org.apache.ldap.common.filter,org.apache.ldap.server.jndi,org.apache.directory.server.core.configuration
+            </exportPackage>
+          </osgiManifest>
+        </configuration>
+      </plugin>
+    </plugins>
+  </build>
+</project>
+

Propchange: directory/trunks/apacheds/osgi/loader/pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: directory/trunks/apacheds/osgi/loader/src/main/java/org/apache/ldap/server/loader/Activator.java
URL: http://svn.apache.org/viewcvs/directory/trunks/apacheds/osgi/loader/src/main/java/org/apache/ldap/server/loader/Activator.java?rev=396101&r1=396100&r2=396101&view=diff
==============================================================================
--- directory/trunks/apacheds/osgi/loader/src/main/java/org/apache/ldap/server/loader/Activator.java (original)
+++ directory/trunks/apacheds/osgi/loader/src/main/java/org/apache/ldap/server/loader/Activator.java Sat Apr 22 02:00:03 2006
@@ -17,7 +17,7 @@
 
 package org.apache.ldap.server.loader;
 
-import org.ungoverned.gravity.servicebinder.GenericActivator;
+import org.apache.felix.servicebinder.GenericActivator;
 
 public class Activator extends GenericActivator
 {

Modified: directory/trunks/apacheds/osgi/loader/src/main/java/org/apache/ldap/server/loader/LoadCommand.java
URL: http://svn.apache.org/viewcvs/directory/trunks/apacheds/osgi/loader/src/main/java/org/apache/ldap/server/loader/LoadCommand.java?rev=396101&r1=396100&r2=396101&view=diff
==============================================================================
--- directory/trunks/apacheds/osgi/loader/src/main/java/org/apache/ldap/server/loader/LoadCommand.java (original)
+++ directory/trunks/apacheds/osgi/loader/src/main/java/org/apache/ldap/server/loader/LoadCommand.java Sat Apr 22 02:00:03 2006
@@ -25,7 +25,7 @@
 import javax.naming.directory.DirContext;
 import javax.naming.spi.InitialContextFactory;
 
-import org.apache.protocol.common.store.LdifFileLoader;
+import org.apache.directory.server.protocol.shared.store.LdifFileLoader;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.ungoverned.osgi.service.shell.Command;

Modified: directory/trunks/apacheds/osgi/loader/src/main/java/org/apache/ldap/server/loader/LoaderConfiguration.java
URL: http://svn.apache.org/viewcvs/directory/trunks/apacheds/osgi/loader/src/main/java/org/apache/ldap/server/loader/LoaderConfiguration.java?rev=396101&r1=396100&r2=396101&view=diff
==============================================================================
--- directory/trunks/apacheds/osgi/loader/src/main/java/org/apache/ldap/server/loader/LoaderConfiguration.java (original)
+++ directory/trunks/apacheds/osgi/loader/src/main/java/org/apache/ldap/server/loader/LoaderConfiguration.java Sat Apr 22 02:00:03 2006
@@ -17,11 +17,13 @@
 
 package org.apache.ldap.server.loader;
 
-import org.apache.ldap.server.DirectoryService;
-import org.apache.ldap.server.configuration.Configuration;
+import org.apache.directory.server.core.DirectoryService;
+import org.apache.directory.server.core.configuration.Configuration;
 
 public class LoaderConfiguration extends Configuration
 {
+    private static final long serialVersionUID = 5272759707383129322L;
+
     /**
      * Creates a new instance with default settings.
      */

Added: directory/trunks/apacheds/osgi/loader/src/main/resources/log4j.properties
URL: http://svn.apache.org/viewcvs/directory/trunks/apacheds/osgi/loader/src/main/resources/log4j.properties?rev=396101&view=auto
==============================================================================
--- directory/trunks/apacheds/osgi/loader/src/main/resources/log4j.properties (added)
+++ directory/trunks/apacheds/osgi/loader/src/main/resources/log4j.properties Sat Apr 22 02:00:03 2006
@@ -0,0 +1,9 @@
+# Set root logger level to DEBUG and its only appender to A1.
+log4j.rootLogger=DEBUG, A1
+
+# A1 is set to be a ConsoleAppender.
+log4j.appender.A1=org.apache.log4j.ConsoleAppender
+
+# A1 uses PatternLayout.
+log4j.appender.A1.layout=org.apache.log4j.PatternLayout
+log4j.appender.A1.layout.ConversionPattern=%-4r [%t] %-5p %c %x - %m%n

Propchange: directory/trunks/apacheds/osgi/loader/src/main/resources/log4j.properties
------------------------------------------------------------------------------
    svn:eol-style = native

Added: directory/trunks/apacheds/osgi/network/pom.xml
URL: http://svn.apache.org/viewcvs/directory/trunks/apacheds/osgi/network/pom.xml?rev=396101&view=auto
==============================================================================
--- directory/trunks/apacheds/osgi/network/pom.xml (added)
+++ directory/trunks/apacheds/osgi/network/pom.xml Sat Apr 22 02:00:03 2006
@@ -0,0 +1,51 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project>
+  <modelVersion>4.0.0</modelVersion>
+  <parent>
+    <groupId>org.apache.directory.server</groupId>
+    <artifactId>build</artifactId>
+    <version>1.1.0-SNAPSHOT</version>
+  </parent>
+  <artifactId>apacheds-osgi-mina</artifactId>
+  <name>ApacheDS MINA Library Bundle</name>
+  <description>
+    The ApacheDS MINA library packaged as an OSGi bundle.
+  </description>
+  <packaging>osgi-bundle</packaging>  
+  <dependencies>
+    <dependency>
+      <groupId>org.slf4j</groupId>
+      <artifactId>nlog4j</artifactId>
+      <version>1.2.19</version>
+      <scope>provided</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.directory.mina</groupId>
+      <artifactId>mina-core</artifactId>
+      <version>0.9.2</version>
+    </dependency>
+  </dependencies>
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.felix.plugins</groupId>
+        <artifactId>maven-osgi-plugin</artifactId>
+        <version>0.8.0-SNAPSHOT</version>
+        <extensions>true</extensions>
+        <configuration>
+          <osgiManifest>
+            <bundleName>ApacheDS MINA Bundle</bundleName>
+            <bundleVendor>Apache Software Foundation</bundleVendor>
+            <bundleCategory>Network Service</bundleCategory>
+            <bundleDescription>
+              A bundle that registers the MINA library.
+            </bundleDescription>
+            <exportPackage>
+              org.apache.mina.protocol.handler,org.apache.mina,org.apache.mina.registry,org.apache.mina.filter,org.apache.mina.filter.codec,org.apache.mina.common
+            </exportPackage>
+          </osgiManifest>
+        </configuration>
+      </plugin>
+    </plugins>
+  </build>
+</project>

Propchange: directory/trunks/apacheds/osgi/network/pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Added: directory/trunks/apacheds/osgi/ntp/pom.xml
URL: http://svn.apache.org/viewcvs/directory/trunks/apacheds/osgi/ntp/pom.xml?rev=396101&view=auto
==============================================================================
--- directory/trunks/apacheds/osgi/ntp/pom.xml (added)
+++ directory/trunks/apacheds/osgi/ntp/pom.xml Sat Apr 22 02:00:03 2006
@@ -0,0 +1,88 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<project>
+  <modelVersion>4.0.0</modelVersion>
+  <parent>
+    <groupId>org.apache.directory.server</groupId>
+    <artifactId>build</artifactId>
+    <version>1.1.0-SNAPSHOT</version>
+  </parent>
+  <artifactId>apacheds-protocol-osgi-ntp</artifactId>
+  <name>ApacheDS NTP Protocol Bundle</name>
+  <description>
+    The NTP Protocol Provider for ApacheDS packaged as an OSGi bundle.
+  </description>
+  <packaging>osgi-bundle</packaging>  
+  <dependencies>
+    <dependency>
+      <groupId>org.slf4j</groupId>
+      <artifactId>nlog4j</artifactId>
+      <version>1.2.19</version>
+      <!--<scope>provided</scope>-->
+    </dependency>
+    <dependency>
+      <groupId>org.apache.directory.mina</groupId>
+      <artifactId>mina-core</artifactId>
+      <version>0.9.2</version>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.directory.server</groupId>
+      <artifactId>apacheds-core</artifactId>
+      <version>${pom.version}</version>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.directory.server</groupId>
+      <artifactId>apacheds-protocol-shared</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.felix</groupId>
+      <artifactId>org.osgi.core</artifactId>
+      <version>0.8.0-SNAPSHOT</version>
+      <scope>provided</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.felix</groupId>
+      <artifactId>org.osgi.compendium</artifactId>
+      <version>0.8.0-SNAPSHOT</version>
+      <scope>provided</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.felix</groupId>
+      <artifactId>org.apache.felix.servicebinder</artifactId>
+      <version>0.8.0-SNAPSHOT</version>
+      <scope>provided</scope>
+    </dependency>
+  </dependencies>
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.felix.plugins</groupId>
+        <artifactId>maven-osgi-plugin</artifactId>
+        <version>0.8.0-SNAPSHOT</version>
+        <extensions>true</extensions>
+        <configuration>
+          <osgiManifest>
+            <metadataLocation>metadata.xml</metadataLocation>
+            <bundleName>ApacheDS NTP Server Bundle</bundleName>
+            <bundleVendor>Apache Software Foundation</bundleVendor>
+            <bundleCategory>Network Service</bundleCategory>
+            <bundleDescription>
+              A bundle that registers an NTP server using the service binder.
+            </bundleDescription>
+            <bundleActivator>
+              org.apache.ntp.Activator
+            </bundleActivator>
+            <importPackage>
+              <!--org.apache.directory.server.core.configuration,-->org.apache.felix.servicebinder,org.osgi.framework,org.apache.mina.registry,org.apache.mina.filter,org.apache.mina.filter.codec,org.apache.mina.common,org.osgi.service.cm
+            </importPackage>
+          </osgiManifest>
+        </configuration>
+      </plugin>
+    </plugins>
+  </build>
+</project>

Propchange: directory/trunks/apacheds/osgi/ntp/pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: directory/trunks/apacheds/osgi/ntp/src/main/java/org/apache/ntp/Activator.java
URL: http://svn.apache.org/viewcvs/directory/trunks/apacheds/osgi/ntp/src/main/java/org/apache/ntp/Activator.java?rev=396101&r1=396100&r2=396101&view=diff
==============================================================================
--- directory/trunks/apacheds/osgi/ntp/src/main/java/org/apache/ntp/Activator.java (original)
+++ directory/trunks/apacheds/osgi/ntp/src/main/java/org/apache/ntp/Activator.java Sat Apr 22 02:00:03 2006
@@ -17,7 +17,7 @@
 
 package org.apache.ntp;
 
-import org.ungoverned.gravity.servicebinder.GenericActivator;
+import org.apache.felix.servicebinder.GenericActivator;
 
 public class Activator extends GenericActivator
 {

Modified: directory/trunks/apacheds/osgi/ntp/src/main/java/org/apache/ntp/NtpServerFactory.java
URL: http://svn.apache.org/viewcvs/directory/trunks/apacheds/osgi/ntp/src/main/java/org/apache/ntp/NtpServerFactory.java?rev=396101&r1=396100&r2=396101&view=diff
==============================================================================
--- directory/trunks/apacheds/osgi/ntp/src/main/java/org/apache/ntp/NtpServerFactory.java (original)
+++ directory/trunks/apacheds/osgi/ntp/src/main/java/org/apache/ntp/NtpServerFactory.java Sat Apr 22 02:00:03 2006
@@ -24,14 +24,17 @@
 import java.util.Iterator;
 import java.util.Map;
 
-import org.apache.mina.registry.ServiceRegistry;
-import org.apache.protocol.common.MapAdapter;
+import org.apache.directory.server.ntp.NtpConfiguration;
+import org.apache.directory.server.ntp.NtpServer;
+import org.apache.directory.server.protocol.shared.MapAdapter;
+import org.apache.felix.servicebinder.Lifecycle;
+import org.apache.mina.common.IoAcceptor;
+import org.apache.mina.transport.socket.nio.DatagramAcceptor;
 import org.osgi.service.cm.ConfigurationAdmin;
 import org.osgi.service.cm.ConfigurationException;
 import org.osgi.service.cm.ManagedServiceFactory;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
-import org.ungoverned.gravity.servicebinder.Lifecycle;
 
 public class NtpServerFactory implements ManagedServiceFactory, Lifecycle
 {
@@ -41,7 +44,7 @@
     private static final String DEFAULT_PID = "org.apache.ntp.default";
 
     private ConfigurationAdmin cm;
-    private ServiceRegistry registry;
+    private IoAcceptor acceptor = new DatagramAcceptor();
 
     private Map servers = Collections.synchronizedMap( new HashMap() );
 
@@ -77,7 +80,7 @@
             if ( ntpServer == null || ntpServer.isDifferent( config ) )
             {
                 deleted( pid );
-                ntpServer = new NtpServer( ntpConfig, registry );
+                ntpServer = new NtpServer( ntpConfig, acceptor );
                 servers.put( pid, ntpServer );
             }
         }
@@ -142,18 +145,6 @@
 
             servers.clear();
         }
-    }
-
-    public void setServiceRegistry( ServiceRegistry registry )
-    {
-        this.registry = registry;
-        log.debug( getName() + " has bound to " + registry );
-    }
-
-    public void unsetServiceRegistry( ServiceRegistry registry )
-    {
-        this.registry = null;
-        log.debug( getName() + " has unbound from " + registry );
     }
 
     public void setConfigurationAdmin( ConfigurationAdmin cm )

Added: directory/trunks/apacheds/osgi/ntp/src/main/resources/log4j.properties
URL: http://svn.apache.org/viewcvs/directory/trunks/apacheds/osgi/ntp/src/main/resources/log4j.properties?rev=396101&view=auto
==============================================================================
--- directory/trunks/apacheds/osgi/ntp/src/main/resources/log4j.properties (added)
+++ directory/trunks/apacheds/osgi/ntp/src/main/resources/log4j.properties Sat Apr 22 02:00:03 2006
@@ -0,0 +1,9 @@
+# Set root logger level to DEBUG and its only appender to A1.
+log4j.rootLogger=DEBUG, A1
+
+# A1 is set to be a ConsoleAppender.
+log4j.appender.A1=org.apache.log4j.ConsoleAppender
+
+# A1 uses PatternLayout.
+log4j.appender.A1.layout=org.apache.log4j.PatternLayout
+log4j.appender.A1.layout.ConversionPattern=%-4r [%t] %-5p %c %x - %m%n

Propchange: directory/trunks/apacheds/osgi/ntp/src/main/resources/log4j.properties
------------------------------------------------------------------------------
    svn:eol-style = native

Added: directory/trunks/apacheds/osgi/pom.xml
URL: http://svn.apache.org/viewcvs/directory/trunks/apacheds/osgi/pom.xml?rev=396101&view=auto
==============================================================================
--- directory/trunks/apacheds/osgi/pom.xml (added)
+++ directory/trunks/apacheds/osgi/pom.xml Sat Apr 22 02:00:03 2006
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<project>
+  <modelVersion>4.0.0</modelVersion>
+  <parent>
+    <groupId>org.apache.directory.server</groupId>
+    <artifactId>build</artifactId>
+    <version>1.1.0-SNAPSHOT</version>
+  </parent>
+  <artifactId>build-osgi</artifactId>
+  <packaging>pom</packaging>
+  <name>ApacheDS OSGi Bundle Build</name>
+  <modules>
+    <module>apacheds</module>
+    <module>changepw</module>
+    <module>dns</module>
+    <module>jmx</module>
+    <module>kerberos</module>
+    <module>ldap</module>
+    <module>loader</module>
+    <module>network</module>
+    <module>ntp</module>
+  </modules>
+</project>

Propchange: directory/trunks/apacheds/osgi/pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native



Mime
View raw message