directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From erodrig...@apache.org
Subject svn commit: r331269 - in /directory/sandbox/erodriguez/osgi-spec/configuration/src: main/java/org/apache/configuration/ main/java/org/apache/configuration/impl/ main/java/org/apache/configuration/store/ test/java/org/apache/configuration/
Date Mon, 07 Nov 2005 13:35:44 GMT
Author: erodriguez
Date: Mon Nov  7 05:35:34 2005
New Revision: 331269

URL: http://svn.apache.org/viewcvs?rev=331269&view=rev
Log:
Added basic context listening to the Config Admin service, with test cases.

Added:
    directory/sandbox/erodriguez/osgi-spec/configuration/src/main/java/org/apache/configuration/ConfigurationConfig.java   (with props)
    directory/sandbox/erodriguez/osgi-spec/configuration/src/main/java/org/apache/configuration/ConfigurationListener.java   (with props)
    directory/sandbox/erodriguez/osgi-spec/configuration/src/main/java/org/apache/configuration/impl/JndiConfigurationStore.java   (with props)
    directory/sandbox/erodriguez/osgi-spec/configuration/src/main/java/org/apache/configuration/store/EventConfigurationStore.java   (with props)
    directory/sandbox/erodriguez/osgi-spec/configuration/src/main/java/org/apache/configuration/store/EventDirContextListener.java   (with props)
    directory/sandbox/erodriguez/osgi-spec/configuration/src/main/java/org/apache/configuration/store/JndiEventConfigurationStoreImpl.java   (with props)
    directory/sandbox/erodriguez/osgi-spec/configuration/src/test/java/org/apache/configuration/ConfigurationTest.java   (with props)
    directory/sandbox/erodriguez/osgi-spec/configuration/src/test/java/org/apache/configuration/DictionaryFactory.java   (with props)
    directory/sandbox/erodriguez/osgi-spec/configuration/src/test/java/org/apache/configuration/JndiQueryBuilderTest.java   (with props)
    directory/sandbox/erodriguez/osgi-spec/configuration/src/test/java/org/apache/configuration/PrimeSearchActivator.java   (with props)
    directory/sandbox/erodriguez/osgi-spec/configuration/src/test/java/org/apache/configuration/ServiceConfigurationTest.java   (with props)
    directory/sandbox/erodriguez/osgi-spec/configuration/src/test/java/org/apache/configuration/configuration-changepw.ldif
    directory/sandbox/erodriguez/osgi-spec/configuration/src/test/java/org/apache/configuration/configuration-dns.ldif
    directory/sandbox/erodriguez/osgi-spec/configuration/src/test/java/org/apache/configuration/configuration-kerberos.ldif
    directory/sandbox/erodriguez/osgi-spec/configuration/src/test/java/org/apache/configuration/configuration-ntp.ldif

Added: directory/sandbox/erodriguez/osgi-spec/configuration/src/main/java/org/apache/configuration/ConfigurationConfig.java
URL: http://svn.apache.org/viewcvs/directory/sandbox/erodriguez/osgi-spec/configuration/src/main/java/org/apache/configuration/ConfigurationConfig.java?rev=331269&view=auto
==============================================================================
--- directory/sandbox/erodriguez/osgi-spec/configuration/src/main/java/org/apache/configuration/ConfigurationConfig.java (added)
+++ directory/sandbox/erodriguez/osgi-spec/configuration/src/main/java/org/apache/configuration/ConfigurationConfig.java Mon Nov  7 05:35:34 2005
@@ -0,0 +1,46 @@
+/*
+ *   Copyright 2005 The Apache Software Foundation
+ *
+ *   Licensed under the Apache License, Version 2.0 (the "License");
+ *   you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *       http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *   Unless required by applicable law or agreed to in writing, software
+ *   distributed under the License is distributed on an "AS IS" BASIS,
+ *   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *   See the License for the specific language governing permissions and
+ *   limitations under the License.
+ *
+ */
+
+package org.apache.configuration;
+
+import org.apache.ldap.server.DirectoryService;
+import org.apache.ldap.server.configuration.Configuration;
+
+public class ConfigurationConfig extends Configuration
+{
+    private static final long serialVersionUID = 8173869543480836087L;
+
+    private static final String name = "Apache Configuration Admin Service";
+
+    public ConfigurationConfig()
+    {
+    }
+
+    /**
+     * Creates a new instance with default settings that operates on the
+     * {@link DirectoryService} with the specified ID.
+     */
+    public ConfigurationConfig( String instanceId )
+    {
+        setInstanceId( instanceId );
+    }
+
+    public String getName()
+    {
+        return name;
+    }
+}

Propchange: directory/sandbox/erodriguez/osgi-spec/configuration/src/main/java/org/apache/configuration/ConfigurationConfig.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: directory/sandbox/erodriguez/osgi-spec/configuration/src/main/java/org/apache/configuration/ConfigurationListener.java
URL: http://svn.apache.org/viewcvs/directory/sandbox/erodriguez/osgi-spec/configuration/src/main/java/org/apache/configuration/ConfigurationListener.java?rev=331269&view=auto
==============================================================================
--- directory/sandbox/erodriguez/osgi-spec/configuration/src/main/java/org/apache/configuration/ConfigurationListener.java (added)
+++ directory/sandbox/erodriguez/osgi-spec/configuration/src/main/java/org/apache/configuration/ConfigurationListener.java Mon Nov  7 05:35:34 2005
@@ -0,0 +1,25 @@
+/*
+ *   Copyright 2005 The Apache Software Foundation
+ *
+ *   Licensed under the Apache License, Version 2.0 (the "License");
+ *   you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *       http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *   Unless required by applicable law or agreed to in writing, software
+ *   distributed under the License is distributed on an "AS IS" BASIS,
+ *   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *   See the License for the specific language governing permissions and
+ *   limitations under the License.
+ *
+ */
+
+package org.apache.configuration;
+
+import java.util.Dictionary;
+
+public interface ConfigurationListener
+{
+    public void configurationChanged( Dictionary configuration );
+}

Propchange: directory/sandbox/erodriguez/osgi-spec/configuration/src/main/java/org/apache/configuration/ConfigurationListener.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: directory/sandbox/erodriguez/osgi-spec/configuration/src/main/java/org/apache/configuration/impl/JndiConfigurationStore.java
URL: http://svn.apache.org/viewcvs/directory/sandbox/erodriguez/osgi-spec/configuration/src/main/java/org/apache/configuration/impl/JndiConfigurationStore.java?rev=331269&view=auto
==============================================================================
--- directory/sandbox/erodriguez/osgi-spec/configuration/src/main/java/org/apache/configuration/impl/JndiConfigurationStore.java (added)
+++ directory/sandbox/erodriguez/osgi-spec/configuration/src/main/java/org/apache/configuration/impl/JndiConfigurationStore.java Mon Nov  7 05:35:34 2005
@@ -0,0 +1,336 @@
+/*
+ *   Copyright 2005 The Apache Software Foundation
+ *
+ *   Licensed under the Apache License, Version 2.0 (the "License");
+ *   you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *       http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *   Unless required by applicable law or agreed to in writing, software
+ *   distributed under the License is distributed on an "AS IS" BASIS,
+ *   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *   See the License for the specific language governing permissions and
+ *   limitations under the License.
+ *
+ */
+
+package org.apache.configuration.impl;
+
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.Dictionary;
+import java.util.Enumeration;
+import java.util.HashMap;
+import java.util.Hashtable;
+import java.util.List;
+import java.util.Map;
+import java.util.Properties;
+
+import javax.naming.CompoundName;
+import javax.naming.Context;
+import javax.naming.Name;
+import javax.naming.NamingException;
+import javax.naming.directory.DirContext;
+import javax.naming.event.EventContext;
+import javax.naming.event.EventDirContext;
+import javax.naming.spi.InitialContextFactory;
+
+import org.apache.configuration.ConfigurationConfig;
+import org.apache.configuration.ConfigurationListener;
+import org.apache.configuration.ConfigurationStore;
+import org.apache.configuration.store.EventConfigurationStore;
+import org.apache.configuration.store.EventDirContextListener;
+import org.apache.configuration.store.JndiEventConfigurationStoreImpl;
+import org.osgi.framework.Constants;
+import org.osgi.framework.InvalidSyntaxException;
+import org.osgi.service.cm.Configuration;
+import org.osgi.service.cm.ConfigurationAdmin;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class JndiConfigurationStore implements ConfigurationStore, ConfigurationListener
+{
+    /** the log for this class */
+    private static final Logger log = LoggerFactory.getLogger( JndiConfigurationStore.class );
+
+    /** a handle on the provider context */
+    private EventDirContext ctx;
+
+    /** a handle on the factory */
+    private InitialContextFactory factory;
+
+    /** a handle on the listener */
+    private EventDirContextListener directoryListener;
+
+    /** a handle on the listener */
+    private ConfigurationListener storeListener;
+
+    /** a handle on the store */
+    private EventConfigurationStore commandStore;
+
+    /** a handle on the configs */
+    private Map configs;
+
+    /**
+     * The key of the property specifying where configuration is stored.  If this
+     * property is not set the store defaults to performing a subtree search
+     * from the DN in the {@link Context#PROVIDER_URL}. If it is present a more
+     * efficient search is conducted on the more specific DN.
+     */
+    public static final String CM_ENTRY_BASEDN_KEY = "cm.entry.basedn";
+
+    /**
+     * Creates the action to be used against the embedded ApacheDS DIT.  Note
+     * the searchBase is a relative name to the context and not a DN.
+     *
+     * @param factory the JNDI context to the store
+     */
+    public JndiConfigurationStore( InitialContextFactory factory )
+    {
+        this.factory = factory;
+
+        activate();
+    }
+
+    public void configurationChanged( Dictionary dictionary )
+    {
+        log.debug( "Got " + dictionary );
+
+        String servicePid = (String) dictionary.get( Constants.SERVICE_PID );
+        configs.put( servicePid, dictionary );
+
+        storeListener.configurationChanged( dictionary );
+    }
+
+    /**
+     * All required services have been bound, but our service(s) are not yet
+     * registered.
+     */
+    public void activate()
+    {
+        configs = new HashMap();
+
+        Hashtable env = new Hashtable( new ConfigurationConfig().toJndiEnvironment() );
+        loadEnvironment( env );
+
+        try
+        {
+            ctx = (EventDirContext) factory.getInitialContext( env );
+        }
+        catch ( NamingException ne )
+        {
+            log.error( ne.getMessage(), ne );
+        }
+
+        Name searchBaseDn = null;
+
+        try
+        {
+            if ( env.containsKey( CM_ENTRY_BASEDN_KEY ) )
+            {
+                String baseDn = (String) env.get( CM_ENTRY_BASEDN_KEY );
+                searchBaseDn = getRelativeName( ctx, baseDn );
+
+                log.debug( "Using searchBaseDn " + searchBaseDn );
+
+                String listenerName = "Listener-" + System.currentTimeMillis();
+                directoryListener = new EventDirContextListener( listenerName );
+                directoryListener.setConfigurationListener( this );
+
+                ctx.addNamingListener( searchBaseDn, EventContext.SUBTREE_SCOPE, directoryListener );
+            }
+        }
+        catch ( NamingException ne )
+        {
+            log.error( ne.getMessage(), ne );
+        }
+
+        commandStore = new JndiEventConfigurationStoreImpl( ctx, searchBaseDn );
+    }
+
+    /**
+     * Invalidation has started and our services have been unregistered, but
+     * any required services have not been unbound yet.
+     */
+    public void deactivate()
+    {
+        try
+        {
+            log.debug( "Removing listener " + directoryListener );
+            ctx.removeNamingListener( directoryListener );
+            ctx.close();
+        }
+        catch ( NamingException ne )
+        {
+            log.error( ne.getMessage(), ne );
+        }
+    }
+
+    private Name getRelativeName( DirContext ctx, String baseDn ) throws NamingException
+    {
+        Properties props = new Properties();
+        props.setProperty( "jndi.syntax.direction", "right_to_left" );
+        props.setProperty( "jndi.syntax.separator", "," );
+
+        Name searchBaseDn = null;
+
+        try
+        {
+            Name ctxRoot = new CompoundName( ctx.getNameInNamespace(), props );
+            searchBaseDn = new CompoundName( baseDn, props );
+
+            if ( !searchBaseDn.startsWith( ctxRoot ) )
+            {
+                throw new NamingException( "Invalid search base for configuration:  " + baseDn );
+            }
+
+            for ( int ii = 0; ii < ctxRoot.size(); ii++ )
+            {
+                searchBaseDn.remove( 0 );
+            }
+        }
+        catch ( NamingException e )
+        {
+            throw new NamingException( "Failed to initialize search base " + baseDn + " for configuration." );
+        }
+
+        return searchBaseDn;
+    }
+
+    private void loadEnvironment( Hashtable env )
+    {
+        env.put( Context.PROVIDER_URL, "ou=configuration,ou=system" );
+        env.put( Context.INITIAL_CONTEXT_FACTORY, "org.apache.ldap.server.jndi.CoreContextFactory" );
+
+        env.put( CM_ENTRY_BASEDN_KEY, "ou=services,ou=configuration,ou=system" );
+    }
+
+    public ConfigurationDictionary delete( String pid ) throws IOException
+    {
+        log.debug( "Got request to delete configuration for pid " + pid );
+
+        // store must call the listener with the deleted dictionary
+        // storeListener.configurationChanged( dictionary );
+
+        return null;
+    }
+
+    public void deleteAll( String factoryPid ) throws IOException
+    {
+        log.debug( "Got request to delete all configurations for managed factory " + factoryPid );
+
+        // store must call the listener with the deleted dictionary
+        // storeListener.configurationChanged( dictionary );
+    }
+
+    public String generatePid( String factoryPid ) throws IOException
+    {
+        log.debug( "Got request to generate PID for managed factory " + factoryPid );
+
+        return null;
+    }
+
+    public Enumeration listPids()
+    {
+        log.debug( "Got request to list all PIDs" );
+
+        return Collections.enumeration( configs.keySet() );
+    }
+
+    public Configuration[] listConfigurations( String filterString ) throws IOException, InvalidSyntaxException
+    {
+        Enumeration configurationPids = listPids();
+
+        List results = new ArrayList();
+
+        while ( configurationPids.hasMoreElements() )
+        {
+            String pid = (String) configurationPids.nextElement();
+            ConfigurationDictionary config = load( pid );
+
+            if ( config == null )
+            {
+                continue;
+            }
+
+            if ( filterString == null )
+            {
+                results.add( new ConfigurationImpl( this, config ) );
+            }
+            else
+            {
+                if ( LDAPQuery.query( filterString, config ) )
+                {
+                    results.add( new ConfigurationImpl( this, config ) );
+                }
+            }
+        }
+
+        return (Configuration[]) results.toArray( new Configuration[ results.size() ] );
+    }
+
+    public ConfigurationDictionary load( String pid ) throws IOException
+    {
+        log.debug( "Got request to load configuration for pid " + pid );
+
+        Hashtable config = (Hashtable) configs.get( pid );
+
+        log.debug( "Returning single configuration of size " + config.size() );
+
+        return new ConfigurationDictionary( config );
+    }
+
+    public ConfigurationDictionary[] loadAll( String factoryPid ) throws IOException
+    {
+        log.debug( "Got request to load all configurations for managed factory " + factoryPid );
+
+        List results = new ArrayList();
+
+        Enumeration candidates = Collections.enumeration( configs.values() );
+
+        while ( candidates.hasMoreElements() )
+        {
+            Hashtable candidate = (Hashtable) candidates.nextElement();
+            String factory = (String) candidate.get( ConfigurationAdmin.SERVICE_FACTORYPID );
+
+            if ( factory != null && factory.equals( factoryPid ) )
+            {
+                results.add( new ConfigurationDictionary( candidate ) );
+            }
+        }
+
+        ConfigurationDictionary[] dictionaries = new ConfigurationDictionary[ results.size() ];
+        ConfigurationDictionary[] returned = (ConfigurationDictionary[]) results.toArray( dictionaries );
+
+        log.debug( "Returning " + returned.length + " configuration(s)." );
+
+        return returned;
+    }
+
+    public void store( String pid, String factoryPid, Dictionary configuration ) throws IOException
+    {
+        log.debug( "Got request to store configuration for pid " + pid );
+
+        // store must call the listener with the stored dictionary
+        // storeListener.configurationChanged( dictionary );
+    }
+
+    public void setConfigurationListener( ConfigurationListener configurationListener )
+    {
+        this.storeListener = configurationListener;
+        log.debug( "Store received listener " + configurationListener );
+    }
+
+    public Configuration getNewConfiguration( String bundleLocation, String factoryPid, String servicePid,
+            ConfigurationDictionary properties )
+    {
+        return new ConfigurationImpl( this, bundleLocation, factoryPid, servicePid, properties );
+    }
+
+    public Configuration getNewConfiguration( String bundleLocation, String factoryPid, String servicePid )
+    {
+        return new ConfigurationImpl( this, bundleLocation, factoryPid, servicePid );
+    }
+}

Propchange: directory/sandbox/erodriguez/osgi-spec/configuration/src/main/java/org/apache/configuration/impl/JndiConfigurationStore.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: directory/sandbox/erodriguez/osgi-spec/configuration/src/main/java/org/apache/configuration/store/EventConfigurationStore.java
URL: http://svn.apache.org/viewcvs/directory/sandbox/erodriguez/osgi-spec/configuration/src/main/java/org/apache/configuration/store/EventConfigurationStore.java?rev=331269&view=auto
==============================================================================
--- directory/sandbox/erodriguez/osgi-spec/configuration/src/main/java/org/apache/configuration/store/EventConfigurationStore.java (added)
+++ directory/sandbox/erodriguez/osgi-spec/configuration/src/main/java/org/apache/configuration/store/EventConfigurationStore.java Mon Nov  7 05:35:34 2005
@@ -0,0 +1,27 @@
+/*
+ *   Copyright 2004 The Apache Software Foundation
+ *
+ *   Licensed under the Apache License, Version 2.0 (the "License");
+ *   you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *       http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *   Unless required by applicable law or agreed to in writing, software
+ *   distributed under the License is distributed on an "AS IS" BASIS,
+ *   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *   See the License for the specific language governing permissions and
+ *   limitations under the License.
+ *
+ */
+package org.apache.configuration.store;
+
+import org.apache.configuration.ConfigurationListener;
+import org.apache.protocol.common.store.ContextOperation;
+
+public interface EventConfigurationStore
+{
+    public Object execute( ContextOperation operation ) throws Exception;
+
+    public void setConfigurationListener( ConfigurationListener configurationListener );
+}

Propchange: directory/sandbox/erodriguez/osgi-spec/configuration/src/main/java/org/apache/configuration/store/EventConfigurationStore.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: directory/sandbox/erodriguez/osgi-spec/configuration/src/main/java/org/apache/configuration/store/EventDirContextListener.java
URL: http://svn.apache.org/viewcvs/directory/sandbox/erodriguez/osgi-spec/configuration/src/main/java/org/apache/configuration/store/EventDirContextListener.java?rev=331269&view=auto
==============================================================================
--- directory/sandbox/erodriguez/osgi-spec/configuration/src/main/java/org/apache/configuration/store/EventDirContextListener.java (added)
+++ directory/sandbox/erodriguez/osgi-spec/configuration/src/main/java/org/apache/configuration/store/EventDirContextListener.java Mon Nov  7 05:35:34 2005
@@ -0,0 +1,147 @@
+/*
+ *   Copyright 2005 The Apache Software Foundation
+ *
+ *   Licensed under the Apache License, Version 2.0 (the "License");
+ *   you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *       http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *   Unless required by applicable law or agreed to in writing, software
+ *   distributed under the License is distributed on an "AS IS" BASIS,
+ *   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *   See the License for the specific language governing permissions and
+ *   limitations under the License.
+ *
+ */
+
+package org.apache.configuration.store;
+
+import java.util.Dictionary;
+import java.util.Enumeration;
+import java.util.Hashtable;
+
+import javax.naming.Binding;
+import javax.naming.NamingException;
+import javax.naming.directory.Attribute;
+import javax.naming.directory.Attributes;
+import javax.naming.event.NamespaceChangeListener;
+import javax.naming.event.NamingEvent;
+import javax.naming.event.NamingExceptionEvent;
+import javax.naming.event.ObjectChangeListener;
+
+import org.apache.configuration.ConfigurationListener;
+import org.osgi.framework.Constants;
+import org.osgi.service.cm.ConfigurationAdmin;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class EventDirContextListener implements NamespaceChangeListener, ObjectChangeListener
+{
+    private static final String APACHE_SERVICE_PID = "apacheServicePid";
+    private static final String APACHE_FACTORY_PID = "apacheServiceFactoryPid";
+    private static final String CATALOG_BASEDN_KEY = "catalogBaseDn";
+
+    /** the log for this class */
+    private static final Logger log = LoggerFactory.getLogger( EventDirContextListener.class );
+
+    private String id;
+    private ConfigurationListener listener;
+
+    public EventDirContextListener( String id )
+    {
+        this.id = id;
+    }
+
+    public void setConfigurationListener( ConfigurationListener listener )
+    {
+        this.listener = listener;
+    }
+
+    public void objectAdded( NamingEvent evt )
+    {
+        log.debug( id + " >>> added: " + evt.getNewBinding() );
+    }
+
+    /**
+     * When an object has been added, getOldBinding() will always return null
+     * because it wasn't in the namespace prior to its being added.
+     */
+    public void objectRemoved( NamingEvent evt )
+    {
+        log.debug( id + " >>> removed: " + evt.getOldBinding() );
+    }
+
+    /**
+     * When an object has been removed, getNewBinding() will always be null
+     * because it won't be in the namespace after it has been removed.
+     */
+    public void objectRenamed( NamingEvent evt )
+    {
+        log.debug( id + " >>> renamed: " + evt.getNewBinding() + " from " + evt.getOldBinding() );
+    }
+
+    public void objectChanged( NamingEvent evt )
+    {
+        log.debug( id + " >>> object changed: " + evt.getNewBinding() + " from " + evt.getOldBinding() );
+
+        if ( listener != null )
+        {
+            try
+            {
+                Dictionary newConfig = getConfigFrom( evt.getNewBinding() );
+                listener.configurationChanged( newConfig );
+            }
+            catch ( NamingException ne )
+            {
+                log.error( ne.getMessage(), ne );
+            }
+        }
+    }
+
+    public void namingExceptionThrown( NamingExceptionEvent evt )
+    {
+        log.error( id + " >>> exception: ", evt.getException() );
+    }
+
+    /**
+     * Convert the binding to a Dictionary, while replacing certain attribute types
+     * with the OSGi standard constants.  LDAP attribute types must not contain periods,
+     * but some of the OSGi constants do.
+     * 
+     * @param binding
+     * @return Hashtable
+     * @throws NamingException
+     */
+    private Hashtable getConfigFrom( Binding binding ) throws NamingException
+    {
+        Attributes attrs = (Attributes) binding.getObject();
+
+        Hashtable config = new Hashtable();
+
+        config.put( CATALOG_BASEDN_KEY, binding.getName() );
+
+        Enumeration attributes = attrs.getAll();
+
+        while ( attributes.hasMoreElements() )
+        {
+            Attribute attr = (Attribute) attributes.nextElement();
+
+            if ( attr.getID().equals( APACHE_SERVICE_PID ) )
+            {
+                config.put( Constants.SERVICE_PID, attr.get() );
+            }
+            else
+                if ( attr.getID().equals( APACHE_FACTORY_PID ) )
+                {
+                    config.put( ConfigurationAdmin.SERVICE_FACTORYPID, attr.get() );
+                }
+                else
+                {
+                    config.put( attr.getID(), attr.get() );
+                }
+        }
+
+        return config;
+    }
+}

Propchange: directory/sandbox/erodriguez/osgi-spec/configuration/src/main/java/org/apache/configuration/store/EventDirContextListener.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: directory/sandbox/erodriguez/osgi-spec/configuration/src/main/java/org/apache/configuration/store/JndiEventConfigurationStoreImpl.java
URL: http://svn.apache.org/viewcvs/directory/sandbox/erodriguez/osgi-spec/configuration/src/main/java/org/apache/configuration/store/JndiEventConfigurationStoreImpl.java?rev=331269&view=auto
==============================================================================
--- directory/sandbox/erodriguez/osgi-spec/configuration/src/main/java/org/apache/configuration/store/JndiEventConfigurationStoreImpl.java (added)
+++ directory/sandbox/erodriguez/osgi-spec/configuration/src/main/java/org/apache/configuration/store/JndiEventConfigurationStoreImpl.java Mon Nov  7 05:35:34 2005
@@ -0,0 +1,65 @@
+/*
+ *   Copyright 2005 The Apache Software Foundation
+ *
+ *   Licensed under the Apache License, Version 2.0 (the "License");
+ *   you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *       http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *   Unless required by applicable law or agreed to in writing, software
+ *   distributed under the License is distributed on an "AS IS" BASIS,
+ *   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *   See the License for the specific language governing permissions and
+ *   limitations under the License.
+ *
+ */
+package org.apache.configuration.store;
+
+import javax.naming.Name;
+import javax.naming.event.EventDirContext;
+
+import org.apache.configuration.ConfigurationListener;
+import org.apache.protocol.common.store.ContextOperation;
+
+/**
+ * A simple implementation of the EventConfigurationStore interface using a JNDI
+ * based store.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$
+ */
+public class JndiEventConfigurationStoreImpl implements EventConfigurationStore
+{
+    /** a handle on the provider context */
+    private EventDirContext ctx;
+
+    /** the search searchBase relative to the DN of the context supplied */
+    private Name searchBase;
+
+    /** a handle on the listener */
+    private ConfigurationListener listener;
+
+    /**
+     * Creates the action to be used against the embedded ApacheDS DIT.  Note
+     * the searchBase is a relative name to the context and not a DN.
+     *
+     * @param ctx the JNDI context to the store
+     * @param searchBase the name relative to the context to use as the search base
+     */
+    public JndiEventConfigurationStoreImpl( EventDirContext ctx, Name searchBase )
+    {
+        this.ctx = ctx;
+        this.searchBase = searchBase;
+    }
+
+    public Object execute( ContextOperation operation ) throws Exception
+    {
+        return operation.execute( ctx, searchBase );
+    }
+
+    public void setConfigurationListener( ConfigurationListener listener )
+    {
+        this.listener = listener;
+    }
+}

Propchange: directory/sandbox/erodriguez/osgi-spec/configuration/src/main/java/org/apache/configuration/store/JndiEventConfigurationStoreImpl.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: directory/sandbox/erodriguez/osgi-spec/configuration/src/test/java/org/apache/configuration/ConfigurationTest.java
URL: http://svn.apache.org/viewcvs/directory/sandbox/erodriguez/osgi-spec/configuration/src/test/java/org/apache/configuration/ConfigurationTest.java?rev=331269&view=auto
==============================================================================
--- directory/sandbox/erodriguez/osgi-spec/configuration/src/test/java/org/apache/configuration/ConfigurationTest.java (added)
+++ directory/sandbox/erodriguez/osgi-spec/configuration/src/test/java/org/apache/configuration/ConfigurationTest.java Mon Nov  7 05:35:34 2005
@@ -0,0 +1,29 @@
+/*
+ *   Copyright 2005 The Apache Software Foundation
+ *
+ *   Licensed under the Apache License, Version 2.0 (the "License");
+ *   you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *       http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *   Unless required by applicable law or agreed to in writing, software
+ *   distributed under the License is distributed on an "AS IS" BASIS,
+ *   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *   See the License for the specific language governing permissions and
+ *   limitations under the License.
+ *
+ */
+
+package org.apache.configuration;
+
+import junit.framework.TestCase;
+
+/**
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+public class ConfigurationTest extends TestCase
+{
+
+}

Propchange: directory/sandbox/erodriguez/osgi-spec/configuration/src/test/java/org/apache/configuration/ConfigurationTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: directory/sandbox/erodriguez/osgi-spec/configuration/src/test/java/org/apache/configuration/DictionaryFactory.java
URL: http://svn.apache.org/viewcvs/directory/sandbox/erodriguez/osgi-spec/configuration/src/test/java/org/apache/configuration/DictionaryFactory.java?rev=331269&view=auto
==============================================================================
--- directory/sandbox/erodriguez/osgi-spec/configuration/src/test/java/org/apache/configuration/DictionaryFactory.java (added)
+++ directory/sandbox/erodriguez/osgi-spec/configuration/src/test/java/org/apache/configuration/DictionaryFactory.java Mon Nov  7 05:35:34 2005
@@ -0,0 +1,32 @@
+/*
+ *   Copyright 2005 The Apache Software Foundation
+ *
+ *   Licensed under the Apache License, Version 2.0 (the "License");
+ *   you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *       http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *   Unless required by applicable law or agreed to in writing, software
+ *   distributed under the License is distributed on an "AS IS" BASIS,
+ *   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *   See the License for the specific language governing permissions and
+ *   limitations under the License.
+ *
+ */
+
+package org.apache.configuration;
+
+import java.util.Map;
+
+import javax.naming.directory.Attributes;
+
+import org.apache.protocol.common.store.ObjectFactory;
+
+public class DictionaryFactory implements ObjectFactory
+{
+    public Object getObject( Map defaults, Attributes attrs )
+    {
+        return null;
+    }
+}

Propchange: directory/sandbox/erodriguez/osgi-spec/configuration/src/test/java/org/apache/configuration/DictionaryFactory.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: directory/sandbox/erodriguez/osgi-spec/configuration/src/test/java/org/apache/configuration/JndiQueryBuilderTest.java
URL: http://svn.apache.org/viewcvs/directory/sandbox/erodriguez/osgi-spec/configuration/src/test/java/org/apache/configuration/JndiQueryBuilderTest.java?rev=331269&view=auto
==============================================================================
--- directory/sandbox/erodriguez/osgi-spec/configuration/src/test/java/org/apache/configuration/JndiQueryBuilderTest.java (added)
+++ directory/sandbox/erodriguez/osgi-spec/configuration/src/test/java/org/apache/configuration/JndiQueryBuilderTest.java Mon Nov  7 05:35:34 2005
@@ -0,0 +1,115 @@
+/*
+ *   Copyright 2005 The Apache Software Foundation
+ *
+ *   Licensed under the Apache License, Version 2.0 (the "License");
+ *   you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *       http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *   Unless required by applicable law or agreed to in writing, software
+ *   distributed under the License is distributed on an "AS IS" BASIS,
+ *   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *   See the License for the specific language governing permissions and
+ *   limitations under the License.
+ *
+ */
+
+package org.apache.configuration;
+
+import java.util.Map;
+
+import junit.framework.TestCase;
+
+import org.apache.protocol.common.store.ObjectFactory;
+
+/**
+ * 1)  Configured baseDn to get started.
+ * 2)  Subtree search to find object 1 node name.
+ * 3)  Subtree search to find targeted object 2 under object 1.
+ * 4)  Convert attributes to object.
+ * 5)  During 4 apply any defaults, possible based on rdn processing.
+ * 
+ * config baseDN, apacheFactory, set of apacheService as Dictionary.
+ * apacheFactory as baseDN, set of catalogEntry as CatalogEntry in Map.
+ * 
+ * children:
+ * a factory's children are services.
+ * a service's children are catalog entry's.
+ * a catalog entry's children are resourcerecords.
+ * a catalog entry's children are princpals.
+ * 
+ */
+public class JndiQueryBuilderTest extends TestCase
+{
+    /**
+     * Get child configurations below a parent service factory
+     * 
+     * make service configuration a Dictionary
+     */
+    public void testLookupServiceInstances()
+    {
+        String baseDn = "ou=services,ou=configuration,ou=system";
+        
+        String filter = "(&(objectClass=apacheFactoryConfiguration)(servicePid=org.apache.dns.factory))";
+        String parentBaseDn = getName( baseDn, filter );
+        
+        // Map servicePid, Dictionary
+        filter = "(objectClass=apacheServiceConfiguration)";
+        ObjectFactory objectFactory = new DictionaryFactory();
+        Map configs = getChildren( parentBaseDn, filter, objectFactory );
+    }
+    
+    private String getName( String baseDn, String filter )
+    {
+        
+        
+        return null;
+    }
+
+    private Map getChildren( String baseDn, String filter, ObjectFactory objectFactory )
+    {
+        
+        //objectFactory.getObject( new HashMap(), attrs );
+        
+        return null;
+    }
+    
+    /**
+     * Get from ConfigurationDictionary
+     * cn=org.apache.dns.1,cn=dns,ou=services,ou=configuration,ou=system
+     * 
+     * apacheCatalogEntry
+     * 
+     * make catalog entries into a Map (or Set of Catalog.Entry
+     */
+    public void testLookupCatalogEntries()
+    {
+        
+    }
+
+    /**
+     * dc=apache,dc=org,ou=Zones,dc=apache,dc=org
+     * 
+     * apacheAbstractResourceRecord
+     * 
+     * make resource record set
+     */
+    public void testLookupZones()
+    {
+        
+    }
+
+    /**
+     * ou=Users,dc=apache,dc=org
+     * 
+     * krb5Principal
+     * krb5PrincipalName
+     * 
+     * make PrincipalStoreEntry
+     */
+    public void testLookupRealms()
+    {
+        
+    }
+}

Propchange: directory/sandbox/erodriguez/osgi-spec/configuration/src/test/java/org/apache/configuration/JndiQueryBuilderTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: directory/sandbox/erodriguez/osgi-spec/configuration/src/test/java/org/apache/configuration/PrimeSearchActivator.java
URL: http://svn.apache.org/viewcvs/directory/sandbox/erodriguez/osgi-spec/configuration/src/test/java/org/apache/configuration/PrimeSearchActivator.java?rev=331269&view=auto
==============================================================================
--- directory/sandbox/erodriguez/osgi-spec/configuration/src/test/java/org/apache/configuration/PrimeSearchActivator.java (added)
+++ directory/sandbox/erodriguez/osgi-spec/configuration/src/test/java/org/apache/configuration/PrimeSearchActivator.java Mon Nov  7 05:35:34 2005
@@ -0,0 +1,52 @@
+/*
+ *   Copyright 2005 The Apache Software Foundation
+ *
+ *   Licensed under the Apache License, Version 2.0 (the "License");
+ *   you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *       http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *   Unless required by applicable law or agreed to in writing, software
+ *   distributed under the License is distributed on an "AS IS" BASIS,
+ *   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *   See the License for the specific language governing permissions and
+ *   limitations under the License.
+ *
+ */
+
+package org.apache.configuration;
+
+public class PrimeSearchActivator
+{
+    PrimeSearch t;
+
+    public void start()
+    {
+        t = new PrimeSearch();
+        t.start();
+    }
+
+    public void stop()
+    {
+        t.terminate();
+    }
+}
+
+class PrimeSearch extends Thread
+{
+    private volatile boolean running = true;
+
+    public void run()
+    {
+        while ( running )
+        {
+            /* compute primes */
+        }
+    }
+
+    void terminate()
+    {
+        running = false;
+    }
+}

Propchange: directory/sandbox/erodriguez/osgi-spec/configuration/src/test/java/org/apache/configuration/PrimeSearchActivator.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: directory/sandbox/erodriguez/osgi-spec/configuration/src/test/java/org/apache/configuration/ServiceConfigurationTest.java
URL: http://svn.apache.org/viewcvs/directory/sandbox/erodriguez/osgi-spec/configuration/src/test/java/org/apache/configuration/ServiceConfigurationTest.java?rev=331269&view=auto
==============================================================================
--- directory/sandbox/erodriguez/osgi-spec/configuration/src/test/java/org/apache/configuration/ServiceConfigurationTest.java (added)
+++ directory/sandbox/erodriguez/osgi-spec/configuration/src/test/java/org/apache/configuration/ServiceConfigurationTest.java Mon Nov  7 05:35:34 2005
@@ -0,0 +1,224 @@
+/*
+ *   Copyright 2005 The Apache Software Foundation
+ *
+ *   Licensed under the Apache License, Version 2.0 (the "License");
+ *   you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *       http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *   Unless required by applicable law or agreed to in writing, software
+ *   distributed under the License is distributed on an "AS IS" BASIS,
+ *   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *   See the License for the specific language governing permissions and
+ *   limitations under the License.
+ *
+ */
+
+package org.apache.configuration;
+
+import java.util.Dictionary;
+import java.util.HashSet;
+import java.util.Hashtable;
+import java.util.Iterator;
+import java.util.Set;
+
+import javax.naming.Context;
+import javax.naming.Name;
+import javax.naming.NamingEnumeration;
+import javax.naming.NamingException;
+import javax.naming.directory.Attribute;
+import javax.naming.directory.Attributes;
+import javax.naming.directory.DirContext;
+import javax.naming.directory.SearchControls;
+import javax.naming.directory.SearchResult;
+
+import org.apache.protocol.common.AbstractBackingStoreTest;
+
+public class ServiceConfigurationTest extends AbstractBackingStoreTest
+{
+    private static final String BASE_DN = "ou=services,ou=configuration,ou=system";
+
+    private DirContext ctx;
+
+    /**
+     * Setup the backing store with test partitions.
+     */
+    public void setUp() throws Exception
+    {
+        super.setUp();
+
+        loadPartition( "ou=system", "configuration-dns.ldif" );
+        loadPartition( "ou=system", "configuration-ntp.ldif" );
+
+        env.put( Context.PROVIDER_URL, BASE_DN );
+        ctx = (DirContext) factory.getInitialContext( env );
+    }
+
+    public void testListAllConfigurations() throws Exception
+    {
+        String filter = "(objectClass=apacheServiceConfiguration)";
+        Set set = getSet( filter );
+
+        assertTrue( set.contains( "cn=org.apache.dns.1,cn=dns,ou=services,ou=configuration,ou=system" ) );
+        assertTrue( set.contains( "cn=org.apache.dns.2,cn=dns,ou=services,ou=configuration,ou=system" ) );
+        assertTrue( set.contains( "cn=org.apache.ntp.1,cn=ntp,ou=services,ou=configuration,ou=system" ) );
+        assertTrue( set.contains( "cn=org.apache.ntp.2,cn=ntp,ou=services,ou=configuration,ou=system" ) );
+    }
+
+    public void testListSubSetOfConfigurations() throws Exception
+    {
+        String filter = "(objectClass=apacheServiceConfiguration)";
+        Set set = getSubSet( filter, "cn=dns" );
+
+        assertTrue( set.contains( "cn=org.apache.dns.1,cn=dns,ou=services,ou=configuration,ou=system" ) );
+        assertTrue( set.contains( "cn=org.apache.dns.2,cn=dns,ou=services,ou=configuration,ou=system" ) );
+        assertFalse( set.contains( "cn=org.apache.ntp.1,cn=ntp,ou=services,ou=configuration,ou=system" ) );
+        assertFalse( set.contains( "cn=org.apache.ntp.2,cn=ntp,ou=services,ou=configuration,ou=system" ) );
+    }
+
+    public void testListFactoryServices() throws Exception
+    {
+        // find factory
+
+        String servicePid = "org.apache.dns.factory";
+
+        // getRelative
+        // get apacheServiceConfiguration's below that
+        // generate Dictionary for each
+        // add self as catalog location
+        String filter = "(&(objectClass=apacheFactoryConfiguration)(apacheServicePid=" + servicePid + "))";
+        System.out.println( filter );
+
+        Set set = getSet( filter );
+
+        assertTrue( set.contains( "cn=dns,ou=services,ou=configuration,ou=system" ) );
+        assertFalse( set.contains( "cn=ntp,ou=services,ou=configuration,ou=system" ) );
+
+        Name rdn = null;
+
+        Iterator it = set.iterator();
+        if ( it.hasNext() )
+        {
+            String name = (String) it.next();
+            rdn = getRelativeName( ctx.getNameInNamespace(), name );
+        }
+
+        filter = "(objectClass=apacheServiceConfiguration)";
+        System.out.println( filter );
+
+        set = getSubSet( filter, rdn.toString() );
+
+        assertTrue( set.contains( "cn=org.apache.dns.1,cn=dns,ou=services,ou=configuration,ou=system" ) );
+        assertTrue( set.contains( "cn=org.apache.dns.2,cn=dns,ou=services,ou=configuration,ou=system" ) );
+        assertFalse( set.contains( "cn=org.apache.ntp.1,cn=ntp,ou=services,ou=configuration,ou=system" ) );
+        assertFalse( set.contains( "cn=org.apache.ntp.2,cn=ntp,ou=services,ou=configuration,ou=system" ) );
+
+        it = set.iterator();
+        if ( it.hasNext() )
+        {
+            String name = (String) it.next();
+            rdn = getRelativeName( ctx.getNameInNamespace(), name );
+        }
+    }
+
+    private Dictionary getDictionary( Attributes attrs, String name ) throws NamingException
+    {
+        Dictionary dictionary = new Hashtable();
+
+        dictionary.put( "serviceBaseDn", name );
+
+        NamingEnumeration ids = attrs.getIDs();
+
+        while ( ids.hasMore() )
+        {
+            String key = (String) ids.next();
+
+            Attribute attr;
+            String value = ( attr = attrs.get( key ) ) != null ? (String) attr.get() : null;
+
+            dictionary.put( key, value );
+        }
+
+        return dictionary;
+    }
+
+    private Set getDictionarySubset( String filter, String name ) throws NamingException
+    {
+        SearchControls controls = new SearchControls();
+        controls.setSearchScope( SearchControls.SUBTREE_SCOPE );
+
+        NamingEnumeration list = ctx.search( name, filter, controls );
+
+        Set set = new HashSet();
+
+        while ( list.hasMore() )
+        {
+            SearchResult result = (SearchResult) list.next();
+            System.out.println( "Name:      " + result.getName() );
+            System.out.println( "Namespace: " + result.getNameInNamespace() );
+            set.add( getDictionary( result.getAttributes(), result.getName() ) );
+        }
+
+        return set;
+    }
+
+    private Set getSet( String filter ) throws NamingException
+    {
+        return getSubSet( filter, "" );
+    }
+
+    private Set getSubSet( String filter, String name ) throws NamingException
+    {
+        SearchControls controls = new SearchControls();
+        controls.setSearchScope( SearchControls.SUBTREE_SCOPE );
+
+        NamingEnumeration list = ctx.search( name, filter, controls );
+
+        Set set = new HashSet();
+
+        while ( list.hasMore() )
+        {
+            SearchResult result = (SearchResult) list.next();
+            System.out.println( result.getAttributes() );
+            set.add( result.getName() );
+        }
+
+        return set;
+    }
+
+    // objectClass: apacheServiceConfiguration
+    // service.pid: org.apache.dns.1
+    // service.factoryPid: org.apache.dns.factory
+
+    // for service.pid dns1 get my zone catalog
+    // with catalog lookup a domain name
+
+    // factory comes online, get name with factory's service.pid
+    // below factory, get all serviceConfigurations || get all serviceConfig's with factoryPid
+
+    // service comes online, get one serviceConfiguration with service.pid service
+
+    /**
+     * When a factory comes online, get its service.pid and pass it Dictionary's for service.pid's
+     * below it.
+     * Use:
+     * objectClass=apacheServiceConfiguration
+     * In each Dictionary, put name of apacheServiceConfig node dn for catalog searches.
+     */
+
+    /**
+     * When a service comes online, get its service.pid and pass it a Dictionary.
+     * Use:
+     * objectClass=apacheServiceConfiguration
+     * In each Dictionary, put name of apacheServiceConfig node dn for catalog searches.
+     */
+
+    /**
+     * Detect a config being added.
+     */
+
+    /**
+     * Detect a config being deleted.
+     */
+}

Propchange: directory/sandbox/erodriguez/osgi-spec/configuration/src/test/java/org/apache/configuration/ServiceConfigurationTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: directory/sandbox/erodriguez/osgi-spec/configuration/src/test/java/org/apache/configuration/configuration-changepw.ldif
URL: http://svn.apache.org/viewcvs/directory/sandbox/erodriguez/osgi-spec/configuration/src/test/java/org/apache/configuration/configuration-changepw.ldif?rev=331269&view=auto
==============================================================================
--- directory/sandbox/erodriguez/osgi-spec/configuration/src/test/java/org/apache/configuration/configuration-changepw.ldif (added)
+++ directory/sandbox/erodriguez/osgi-spec/configuration/src/test/java/org/apache/configuration/configuration-changepw.ldif Mon Nov  7 05:35:34 2005
@@ -0,0 +1,80 @@
+#
+#   Copyright 2005 The Apache Software Foundation
+#
+#   Licensed under the Apache License, Version 2.0 (the "License");
+#   you may not use this file except in compliance with the License.
+#   You may obtain a copy of the License at
+#
+#       http://www.apache.org/licenses/LICENSE-2.0
+#
+#   Unless required by applicable law or agreed to in writing, software
+#   distributed under the License is distributed on an "AS IS" BASIS,
+#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#   See the License for the specific language governing permissions and
+#   limitations under the License.
+#
+#   EXAMPLE.COM is reserved for testing according to this RFC:
+#
+#   http://www.rfc-editor.org/rfc/rfc2606.txt
+#
+
+version: 1
+dn: ou=configuration,ou=system
+objectClass: top
+objectClass: organizationalUnit
+ou: configuration
+
+dn: ou=services,ou=configuration,ou=system
+objectClass: top
+objectClass: organizationalUnit
+ou: services
+
+dn: cn=changepw,ou=services,ou=configuration,ou=system
+objectClass: top
+objectClass: apacheFactoryConfiguration
+cn: changepw
+apacheServicePid: org.apache.changepw.factory
+
+dn: cn=org.apache.changepw.1,cn=changepw,ou=services,ou=configuration,ou=system
+objectClass: apacheServiceConfiguration
+objectClass: extensibleObject
+cn: org.apache.changepw.1
+ipAddress: 192.168.0.1
+ipPort: 464
+baseDn: dc=example,dc=com
+apacheServicePid: org.apache.changepw.1
+apacheServiceFactoryPid: org.apache.changepw.factory
+
+dn: ou=catalog,cn=org.apache.changepw.1,cn=changepw,ou=services,ou=configuration,ou=system
+objectClass: top
+objectClass: organizationalUnit
+ou: catalog
+
+dn: cn=example.com,ou=catalog,cn=org.apache.changepw.1,cn=changepw,ou=services,ou=configuration,ou=system
+objectClass: top
+objectClass: apacheCatalogEntry
+cn: example.com
+apacheCatalogEntryName: example.com
+apacheCatalogEntryBaseDn: ou=users,dc=example,dc=com
+
+dn: cn=org.apache.changepw.2,cn=changepw,ou=services,ou=configuration,ou=system
+objectClass: apacheServiceConfiguration
+objectClass: extensibleObject
+cn: org.apache.changepw.2
+ipAddress:  10.0.0.1
+ipPort: 10000
+baseDn: dc=apache,dc=org
+apacheServicePid: org.apache.changepw.2
+apacheServiceFactoryPid: org.apache.changepw.factory
+
+dn: ou=catalog,cn=org.apache.changepw.2,cn=changepw,ou=services,ou=configuration,ou=system
+objectClass: top
+objectClass: organizationalUnit
+ou: catalog
+
+dn: cn=apache.org,ou=catalog,cn=org.apache.changepw.2,cn=changepw,ou=services,ou=configuration,ou=system
+objectClass: top
+objectClass: apacheCatalogEntry
+cn: apache.org
+apacheCatalogEntryName: apache.org
+apacheCatalogEntryBaseDn: ou=users,dc=apache,dc=org

Added: directory/sandbox/erodriguez/osgi-spec/configuration/src/test/java/org/apache/configuration/configuration-dns.ldif
URL: http://svn.apache.org/viewcvs/directory/sandbox/erodriguez/osgi-spec/configuration/src/test/java/org/apache/configuration/configuration-dns.ldif?rev=331269&view=auto
==============================================================================
--- directory/sandbox/erodriguez/osgi-spec/configuration/src/test/java/org/apache/configuration/configuration-dns.ldif (added)
+++ directory/sandbox/erodriguez/osgi-spec/configuration/src/test/java/org/apache/configuration/configuration-dns.ldif Mon Nov  7 05:35:34 2005
@@ -0,0 +1,80 @@
+#
+#   Copyright 2005 The Apache Software Foundation
+#
+#   Licensed under the Apache License, Version 2.0 (the "License");
+#   you may not use this file except in compliance with the License.
+#   You may obtain a copy of the License at
+#
+#       http://www.apache.org/licenses/LICENSE-2.0
+#
+#   Unless required by applicable law or agreed to in writing, software
+#   distributed under the License is distributed on an "AS IS" BASIS,
+#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#   See the License for the specific language governing permissions and
+#   limitations under the License.
+#
+#   EXAMPLE.COM is reserved for testing according to this RFC:
+#
+#   http://www.rfc-editor.org/rfc/rfc2606.txt
+#
+
+version: 1
+dn: ou=configuration,ou=system
+objectClass: top
+objectClass: organizationalUnit
+ou: configuration
+
+dn: ou=services,ou=configuration,ou=system
+objectClass: top
+objectClass: organizationalUnit
+ou: services
+
+dn: cn=dns,ou=services,ou=configuration,ou=system
+objectClass: top
+objectClass: apacheFactoryConfiguration
+cn: dns
+apacheServicePid: org.apache.dns.factory
+
+dn: cn=org.apache.dns.1,cn=dns,ou=services,ou=configuration,ou=system
+objectClass: apacheServiceConfiguration
+objectClass: extensibleObject
+cn: org.apache.dns.1
+ipAddress: 192.168.0.1
+ipPort: 53
+baseDn: dc=example,dc=com
+apacheServicePid: org.apache.dns.1
+apacheServiceFactoryPid: org.apache.dns.factory
+
+dn: ou=catalog,cn=org.apache.dns.1,cn=dns,ou=services,ou=configuration,ou=system
+objectClass: top
+objectClass: organizationalUnit
+ou: catalog
+
+dn: cn=example.com,ou=catalog,cn=org.apache.dns.1,cn=dns,ou=services,ou=configuration,ou=system
+objectClass: top
+objectClass: apacheCatalogEntry
+cn: example.com
+apacheCatalogEntryName: example.com
+apacheCatalogEntryBaseDn: ou=zones,dc=example,dc=com
+
+dn: cn=org.apache.dns.2,cn=dns,ou=services,ou=configuration,ou=system
+objectClass: apacheServiceConfiguration
+objectClass: extensibleObject
+cn: org.apache.dns.2
+ipAddress:  10.0.0.1
+ipPort: 10000
+baseDn: dc=apache,dc=org
+apacheServicePid: org.apache.dns.2
+apacheServiceFactoryPid: org.apache.dns.factory
+
+dn: ou=catalog,cn=org.apache.dns.2,cn=dns,ou=services,ou=configuration,ou=system
+objectClass: top
+objectClass: organizationalUnit
+ou: catalog
+
+dn: cn=apache.org,ou=catalog,cn=org.apache.dns.2,cn=dns,ou=services,ou=configuration,ou=system
+objectClass: top
+objectClass: apacheCatalogEntry
+cn: apache.org
+apacheCatalogEntryName: apache.org
+apacheCatalogEntryBaseDn: ou=zones,dc=apache,dc=org

Added: directory/sandbox/erodriguez/osgi-spec/configuration/src/test/java/org/apache/configuration/configuration-kerberos.ldif
URL: http://svn.apache.org/viewcvs/directory/sandbox/erodriguez/osgi-spec/configuration/src/test/java/org/apache/configuration/configuration-kerberos.ldif?rev=331269&view=auto
==============================================================================
--- directory/sandbox/erodriguez/osgi-spec/configuration/src/test/java/org/apache/configuration/configuration-kerberos.ldif (added)
+++ directory/sandbox/erodriguez/osgi-spec/configuration/src/test/java/org/apache/configuration/configuration-kerberos.ldif Mon Nov  7 05:35:34 2005
@@ -0,0 +1,80 @@
+#
+#   Copyright 2005 The Apache Software Foundation
+#
+#   Licensed under the Apache License, Version 2.0 (the "License");
+#   you may not use this file except in compliance with the License.
+#   You may obtain a copy of the License at
+#
+#       http://www.apache.org/licenses/LICENSE-2.0
+#
+#   Unless required by applicable law or agreed to in writing, software
+#   distributed under the License is distributed on an "AS IS" BASIS,
+#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#   See the License for the specific language governing permissions and
+#   limitations under the License.
+#
+#   EXAMPLE.COM is reserved for testing according to this RFC:
+#
+#   http://www.rfc-editor.org/rfc/rfc2606.txt
+#
+
+version: 1
+dn: ou=configuration,ou=system
+objectClass: top
+objectClass: organizationalUnit
+ou: configuration
+
+dn: ou=services,ou=configuration,ou=system
+objectClass: top
+objectClass: organizationalUnit
+ou: services
+
+dn: cn=kerberos,ou=services,ou=configuration,ou=system
+objectClass: top
+objectClass: apacheFactoryConfiguration
+cn: kerberos
+apacheServicePid: org.apache.kerberos.factory
+
+dn: cn=org.apache.kerberos.1,cn=kerberos,ou=services,ou=configuration,ou=system
+objectClass: apacheServiceConfiguration
+objectClass: extensibleObject
+cn: org.apache.kerberos.1
+ipAddress: 192.168.0.1
+ipPort: 88
+baseDn: dc=example,dc=com
+apacheServicePid: org.apache.kerberos.1
+apacheServiceFactoryPid: org.apache.kerberos.factory
+
+dn: ou=catalog,cn=org.apache.kerberos.1,cn=kerberos,ou=services,ou=configuration,ou=system
+objectClass: top
+objectClass: organizationalUnit
+ou: catalog
+
+dn: cn=example.com,ou=catalog,cn=org.apache.kerberos.1,cn=kerberos,ou=services,ou=configuration,ou=system
+objectClass: top
+objectClass: apacheCatalogEntry
+cn: example.com
+apacheCatalogEntryName: example.com
+apacheCatalogEntryBaseDn: ou=users,dc=example,dc=com
+
+dn: cn=org.apache.kerberos.2,cn=kerberos,ou=services,ou=configuration,ou=system
+objectClass: apacheServiceConfiguration
+objectClass: extensibleObject
+cn: org.apache.kerberos.2
+ipAddress:  10.0.0.1
+ipPort: 10000
+baseDn: dc=apache,dc=org
+apacheServicePid: org.apache.kerberos.2
+apacheServiceFactoryPid: org.apache.kerberos.factory
+
+dn: ou=catalog,cn=org.apache.kerberos.2,cn=kerberos,ou=services,ou=configuration,ou=system
+objectClass: top
+objectClass: organizationalUnit
+ou: catalog
+
+dn: cn=apache.org,ou=catalog,cn=org.apache.kerberos.2,cn=kerberos,ou=services,ou=configuration,ou=system
+objectClass: top
+objectClass: apacheCatalogEntry
+cn: apache.org
+apacheCatalogEntryName: apache.org
+apacheCatalogEntryBaseDn: ou=users,dc=apache,dc=org

Added: directory/sandbox/erodriguez/osgi-spec/configuration/src/test/java/org/apache/configuration/configuration-ntp.ldif
URL: http://svn.apache.org/viewcvs/directory/sandbox/erodriguez/osgi-spec/configuration/src/test/java/org/apache/configuration/configuration-ntp.ldif?rev=331269&view=auto
==============================================================================
--- directory/sandbox/erodriguez/osgi-spec/configuration/src/test/java/org/apache/configuration/configuration-ntp.ldif (added)
+++ directory/sandbox/erodriguez/osgi-spec/configuration/src/test/java/org/apache/configuration/configuration-ntp.ldif Mon Nov  7 05:35:34 2005
@@ -0,0 +1,55 @@
+#
+#   Copyright 2005 The Apache Software Foundation
+#
+#   Licensed under the Apache License, Version 2.0 (the "License");
+#   you may not use this file except in compliance with the License.
+#   You may obtain a copy of the License at
+#
+#       http://www.apache.org/licenses/LICENSE-2.0
+#
+#   Unless required by applicable law or agreed to in writing, software
+#   distributed under the License is distributed on an "AS IS" BASIS,
+#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#   See the License for the specific language governing permissions and
+#   limitations under the License.
+#
+#   EXAMPLE.COM is reserved for testing according to this RFC:
+#
+#   http://www.rfc-editor.org/rfc/rfc2606.txt
+#
+
+version: 1
+dn: ou=configuration,ou=system
+objectClass: top
+objectClass: organizationalUnit
+ou: configuration
+
+dn: ou=services,ou=configuration,ou=system
+objectClass: top
+objectClass: organizationalUnit
+ou: services
+
+dn: cn=ntp,ou=services,ou=configuration,ou=system
+objectClass: top
+objectClass: organizationalUnit
+objectClass: apacheFactoryConfiguration
+cn: ntp
+apacheServicePid: org.apache.ntp.factory
+
+dn: cn=org.apache.ntp.1,cn=ntp,ou=services,ou=configuration,ou=system
+objectClass: apacheServiceConfiguration
+objectClass: extensibleObject
+cn: org.apache.ntp.1
+ipAddress: 192.168.0.1
+ipPort: 123
+apacheServicePid: org.apache.ntp.1
+apacheServiceFactoryPid: org.apache.ntp.factory
+
+dn: cn=org.apache.ntp.2,cn=ntp,ou=services,ou=configuration,ou=system
+objectClass: apacheServiceConfiguration
+objectClass: extensibleObject
+cn: org.apache.ntp.2
+ipAddress: 192.168.0.1
+ipPort: 10000
+apacheServicePid: org.apache.ntp.2
+apacheServiceFactoryPid: org.apache.ntp.factory



Mime
View raw message