directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From erodrig...@apache.org
Subject svn commit: r265053 - in /directory/sandbox/trunk/osgi-core/trunk/loader: project.xml src/main/java/org/apache/ldap/server/loader/Activator.java src/main/java/org/apache/ldap/server/loader/LoaderConfiguration.java
Date Wed, 31 Aug 2005 14:43:17 GMT
Author: erodriguez
Date: Wed Aug 31 07:43:12 2005
New Revision: 265053

URL: http://svn.apache.org/viewcvs?rev=265053&view=rev
Log:
Updates to LDIF Loader console command:
o  bumping up deps
o  initial use of apacheds-core configuration mechanism
o  initial use of SLF4J logging, library dependency to POM

Added:
    directory/sandbox/trunk/osgi-core/trunk/loader/src/main/java/org/apache/ldap/server/loader/LoaderConfiguration.java
  (with props)
Modified:
    directory/sandbox/trunk/osgi-core/trunk/loader/project.xml
    directory/sandbox/trunk/osgi-core/trunk/loader/src/main/java/org/apache/ldap/server/loader/Activator.java

Modified: directory/sandbox/trunk/osgi-core/trunk/loader/project.xml
URL: http://svn.apache.org/viewcvs/directory/sandbox/trunk/osgi-core/trunk/loader/project.xml?rev=265053&r1=265052&r2=265053&view=diff
==============================================================================
--- directory/sandbox/trunk/osgi-core/trunk/loader/project.xml (original)
+++ directory/sandbox/trunk/osgi-core/trunk/loader/project.xml Wed Aug 31 07:43:12 2005
@@ -7,7 +7,7 @@
   <name>Apache LDIF Loader</name>
   <currentVersion>0.1.1</currentVersion>
   <properties>
-    <osgi.import.package></osgi.import.package>
+    <osgi.import.package>org.apache.ldap.server.configuration</osgi.import.package>
   </properties>
   <inceptionYear>2005</inceptionYear>
   <package>org.apache.loader</package>
@@ -17,17 +17,36 @@
     <dependency>
       <groupId>directory-shared</groupId>
       <artifactId>kerberos-common</artifactId>
-      <version>0.4-SNAPSHOT</version>
+      <version>0.5.1-SNAPSHOT</version>
     </dependency>
     <dependency>
       <groupId>directory-shared</groupId>
       <artifactId>ldap-common</artifactId>
-      <version>0.9-SNAPSHOT</version>
+      <version>0.9.2-SNAPSHOT</version>
       <properties>
         <osgi.jar.bundle>true</osgi.jar.bundle>
       </properties>
     </dependency>
     <dependency>
+      <groupId>org.slf4j</groupId>
+      <artifactId>nlog4j</artifactId>
+      <version>1.2.14</version>
+      <url>http://slf4j.org/nlog4j</url>
+      <properties>
+        <osgi.jar.bundle>true</osgi.jar.bundle>
+      </properties>
+    </dependency>
+    <dependency>
+      <!-- bad containment of filter nodes -->
+      <groupId>directory-shared</groupId>
+      <artifactId>ldap-common</artifactId>
+      <version>0.9.2-SNAPSHOT</version>
+      <properties>
+        <osgi.jar.bundle>true</osgi.jar.bundle>
+      </properties>
+    </dependency>
+    <dependency>
+      <!-- bad containment of antlr exceptions -->
       <groupId>antlr</groupId>
       <artifactId>antlr</artifactId>
       <version>2.7.2</version>
@@ -35,6 +54,12 @@
       <properties>
         <osgi.jar.bundle>true</osgi.jar.bundle>
       </properties>
+    </dependency>
+    <dependency>
+      <!-- required to load Configuration base class -->
+      <groupId>directory</groupId>
+      <artifactId>apacheds-core</artifactId>
+      <version>0.9.2-SNAPSHOT</version>
     </dependency>
   </dependencies>
 </project>

Modified: directory/sandbox/trunk/osgi-core/trunk/loader/src/main/java/org/apache/ldap/server/loader/Activator.java
URL: http://svn.apache.org/viewcvs/directory/sandbox/trunk/osgi-core/trunk/loader/src/main/java/org/apache/ldap/server/loader/Activator.java?rev=265053&r1=265052&r2=265053&view=diff
==============================================================================
--- directory/sandbox/trunk/osgi-core/trunk/loader/src/main/java/org/apache/ldap/server/loader/Activator.java
(original)
+++ directory/sandbox/trunk/osgi-core/trunk/loader/src/main/java/org/apache/ldap/server/loader/Activator.java
Wed Aug 31 07:43:12 2005
@@ -49,7 +49,7 @@
         
         InitialContextFactory factory = (InitialContextFactory) context.getService( storeReference
);
         
-        Hashtable env = new Hashtable();
+        Hashtable env = new Hashtable( new LoaderConfiguration().toJndiEnvironment() );
         loadEnvironment( env );
         
         try
@@ -58,7 +58,7 @@
         }
         catch (NamingException ne)
         {
-            throw new BundleException( "Problem loading initial context.  Failing." );
+            throw new BundleException( "Unable to create initial context.", ne );
         }
         
         context.registerService( Command.class.getName(), this, new Properties() );

Added: directory/sandbox/trunk/osgi-core/trunk/loader/src/main/java/org/apache/ldap/server/loader/LoaderConfiguration.java
URL: http://svn.apache.org/viewcvs/directory/sandbox/trunk/osgi-core/trunk/loader/src/main/java/org/apache/ldap/server/loader/LoaderConfiguration.java?rev=265053&view=auto
==============================================================================
--- directory/sandbox/trunk/osgi-core/trunk/loader/src/main/java/org/apache/ldap/server/loader/LoaderConfiguration.java
(added)
+++ directory/sandbox/trunk/osgi-core/trunk/loader/src/main/java/org/apache/ldap/server/loader/LoaderConfiguration.java
Wed Aug 31 07:43:12 2005
@@ -0,0 +1,40 @@
+/*
+ *   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.ldap.server.loader;
+
+import org.apache.ldap.server.configuration.Configuration;
+import org.apache.ldap.server.jndi.ContextFactoryService;
+
+public class LoaderConfiguration extends Configuration
+{
+    /**
+     * Creates a new instance with default settings.
+     */
+    public LoaderConfiguration()
+    {
+    }
+
+    /**
+     * Creates a new instance with default settings that operates on the
+     * {@link ContextFactoryService} with the specified ID.
+     */
+    public LoaderConfiguration( String instanceId )
+    {
+        setInstanceId( instanceId );
+    }
+}

Propchange: directory/sandbox/trunk/osgi-core/trunk/loader/src/main/java/org/apache/ldap/server/loader/LoaderConfiguration.java
------------------------------------------------------------------------------
    svn:eol-style = native



Mime
View raw message