directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akaras...@apache.org
Subject svn commit: r1071126 - in /directory/apacheds/branches/m1: core-api/ core-api/src/main/java/org/apache/directory/server/core/ core-integ/ core-integ/src/test/java/org/apache/directory/server/core/authn/ppolicy/ core-integ/src/test/java/org/apache/direc...
Date Wed, 16 Feb 2011 02:31:30 GMT
Author: akarasulu
Date: Wed Feb 16 02:31:29 2011
New Revision: 1071126

URL: http://svn.apache.org/viewvc?rev=1071126&view=rev
Log:
DIRSHARED-91: changes for apacheds modules

  o making sure only the factory is being used to get a handle on the 
    LdapCodecService implementation singleton instance
  o making poms setup the shared-ldap-codec-standalone module as either a 
    provided scope dependency or a test scope dependency where appropriate


Modified:
    directory/apacheds/branches/m1/core-api/pom.xml
    directory/apacheds/branches/m1/core-api/src/main/java/org/apache/directory/server/core/LdapCoreSessionConnection.java
    directory/apacheds/branches/m1/core-integ/pom.xml
    directory/apacheds/branches/m1/core-integ/src/test/java/org/apache/directory/server/core/authn/ppolicy/PasswordPolicyTest.java
    directory/apacheds/branches/m1/core-integ/src/test/java/org/apache/directory/server/core/subtree/SubentryServiceIT.java
    directory/apacheds/branches/m1/core/pom.xml
    directory/apacheds/branches/m1/core/src/main/java/org/apache/directory/server/core/DefaultDirectoryService.java
    directory/apacheds/branches/m1/protocol-ldap/pom.xml
    directory/apacheds/branches/m1/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/ReplicaEventMessage.java
    directory/apacheds/branches/m1/server-annotations/pom.xml
    directory/apacheds/branches/m1/server-annotations/src/test/java/org/apache/directory/server/factory/DirectoryServiceAnnotationTest.java
    directory/apacheds/branches/m1/server-integ/pom.xml
    directory/apacheds/branches/m1/server-integ/src/test/java/org/apache/directory/server/operations/search/PagedSearchIT.java

Modified: directory/apacheds/branches/m1/core-api/pom.xml
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/m1/core-api/pom.xml?rev=1071126&r1=1071125&r2=1071126&view=diff
==============================================================================
--- directory/apacheds/branches/m1/core-api/pom.xml (original)
+++ directory/apacheds/branches/m1/core-api/pom.xml Wed Feb 16 02:31:29 2011
@@ -91,6 +91,12 @@
     <dependency>
       <groupId>org.apache.directory.shared</groupId>
       <artifactId>shared-ldap-codec-standalone</artifactId>
+      <scope>provided</scope>
+    </dependency>
+    
+    <dependency>
+      <groupId>org.apache.directory.shared</groupId>
+      <artifactId>shared-ldap-codec</artifactId>
     </dependency>
     
     <dependency>

Modified: directory/apacheds/branches/m1/core-api/src/main/java/org/apache/directory/server/core/LdapCoreSessionConnection.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/m1/core-api/src/main/java/org/apache/directory/server/core/LdapCoreSessionConnection.java?rev=1071126&r1=1071125&r2=1071126&view=diff
==============================================================================
--- directory/apacheds/branches/m1/core-api/src/main/java/org/apache/directory/server/core/LdapCoreSessionConnection.java
(original)
+++ directory/apacheds/branches/m1/core-api/src/main/java/org/apache/directory/server/core/LdapCoreSessionConnection.java
Wed Feb 16 02:31:29 2011
@@ -17,7 +17,6 @@
  *   under the License.
  *
  */
-
 package org.apache.directory.server.core;
 
 
@@ -33,7 +32,7 @@ import org.apache.directory.server.core.
 import org.apache.directory.server.core.interceptor.context.BindOperationContext;
 import org.apache.directory.shared.asn1.util.OID;
 import org.apache.directory.shared.ldap.codec.api.LdapCodecService;
-import org.apache.directory.shared.ldap.codec.standalone.StandaloneLdapCodecService;
+import org.apache.directory.shared.ldap.codec.api.LdapCodecServiceFactory;
 import org.apache.directory.shared.ldap.model.constants.SchemaConstants;
 import org.apache.directory.shared.ldap.model.cursor.EmptyCursor;
 import org.apache.directory.shared.ldap.model.cursor.SearchCursor;
@@ -113,7 +112,7 @@ public class LdapCoreSessionConnection i
     /** The MessageId counter */
     private AtomicInteger messageId = new AtomicInteger( 0 );
 
-    private LdapCodecService codec = new StandaloneLdapCodecService();
+    private LdapCodecService codec = LdapCodecServiceFactory.getSingleton();
 
 
     public LdapCoreSessionConnection()

Modified: directory/apacheds/branches/m1/core-integ/pom.xml
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/m1/core-integ/pom.xml?rev=1071126&r1=1071125&r2=1071126&view=diff
==============================================================================
--- directory/apacheds/branches/m1/core-integ/pom.xml (original)
+++ directory/apacheds/branches/m1/core-integ/pom.xml Wed Feb 16 02:31:29 2011
@@ -34,6 +34,12 @@
 
   <dependencies>
     <dependency>
+      <groupId>org.apache.directory.shared</groupId>
+      <artifactId>shared-ldap-codec-standalone</artifactId>
+      <scope>test</scope>
+    </dependency>
+    
+    <dependency>
       <groupId>${project.groupId}</groupId>
       <artifactId>apacheds-core</artifactId>
     </dependency>

Modified: directory/apacheds/branches/m1/core-integ/src/test/java/org/apache/directory/server/core/authn/ppolicy/PasswordPolicyTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/m1/core-integ/src/test/java/org/apache/directory/server/core/authn/ppolicy/PasswordPolicyTest.java?rev=1071126&r1=1071125&r2=1071126&view=diff
==============================================================================
--- directory/apacheds/branches/m1/core-integ/src/test/java/org/apache/directory/server/core/authn/ppolicy/PasswordPolicyTest.java
(original)
+++ directory/apacheds/branches/m1/core-integ/src/test/java/org/apache/directory/server/core/authn/ppolicy/PasswordPolicyTest.java
Wed Feb 16 02:31:29 2011
@@ -43,7 +43,7 @@ import org.apache.directory.server.core.
 import org.apache.directory.server.core.integ.FrameworkRunner;
 import org.apache.directory.server.core.integ.IntegrationUtils;
 import org.apache.directory.shared.ldap.codec.api.CodecControl;
-import org.apache.directory.shared.ldap.codec.standalone.StandaloneLdapCodecService;
+import org.apache.directory.shared.ldap.codec.api.LdapCodecServiceFactory;
 import org.apache.directory.shared.ldap.codec.api.LdapCodecService;
 import org.apache.directory.shared.ldap.extras.controls.PasswordPolicy;
 import org.apache.directory.shared.ldap.extras.controls.PasswordPolicyImpl;
@@ -77,7 +77,7 @@ public class PasswordPolicyTest extends 
 {
     private PasswordPolicyConfiguration policyConfig;
 
-    private static final LdapCodecService codec = new StandaloneLdapCodecService();
+    private static final LdapCodecService codec = LdapCodecServiceFactory.getSingleton();
     
     private static final PasswordPolicyDecorator PP_REQ_CTRL = 
         new PasswordPolicyDecorator( codec, new PasswordPolicyImpl() );

Modified: directory/apacheds/branches/m1/core-integ/src/test/java/org/apache/directory/server/core/subtree/SubentryServiceIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/m1/core-integ/src/test/java/org/apache/directory/server/core/subtree/SubentryServiceIT.java?rev=1071126&r1=1071125&r2=1071126&view=diff
==============================================================================
--- directory/apacheds/branches/m1/core-integ/src/test/java/org/apache/directory/server/core/subtree/SubentryServiceIT.java
(original)
+++ directory/apacheds/branches/m1/core-integ/src/test/java/org/apache/directory/server/core/subtree/SubentryServiceIT.java
Wed Feb 16 02:31:29 2011
@@ -48,8 +48,8 @@ import org.apache.directory.server.core.
 import org.apache.directory.server.core.integ.FrameworkRunner;
 import org.apache.directory.server.core.integ.IntegrationUtils;
 import org.apache.directory.shared.ldap.model.message.controls.Subentries;
-import org.apache.directory.shared.ldap.codec.standalone.StandaloneLdapCodecService;
 import org.apache.directory.shared.ldap.codec.api.LdapCodecService;
+import org.apache.directory.shared.ldap.codec.api.LdapCodecServiceFactory;
 import org.apache.directory.shared.ldap.codec.controls.search.subentries.SubentriesDecorator;
 import org.apache.directory.shared.ldap.model.cursor.Cursor;
 import org.apache.directory.shared.ldap.model.entry.Entry;
@@ -171,6 +171,7 @@ public class SubentryServiceIT extends A
 
     private class JndiSubentriesControl implements javax.naming.ldap.Control
     {
+        private static final long serialVersionUID = -5773336005348321396L;
 
         public boolean isCritical()
         {
@@ -1265,7 +1266,7 @@ public class SubentryServiceIT extends A
 
         // now add the control with visibility set to true where all entries
         // except subentries disappear
-        LdapCodecService codec = new StandaloneLdapCodecService();
+        LdapCodecService codec = LdapCodecServiceFactory.getSingleton();
         SubentriesDecorator decorator = new SubentriesDecorator( codec );
         Subentries ctl = ( Subentries ) decorator.getDecorated();
         ctl.setVisibility( true );

Modified: directory/apacheds/branches/m1/core/pom.xml
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/m1/core/pom.xml?rev=1071126&r1=1071125&r2=1071126&view=diff
==============================================================================
--- directory/apacheds/branches/m1/core/pom.xml (original)
+++ directory/apacheds/branches/m1/core/pom.xml Wed Feb 16 02:31:29 2011
@@ -89,6 +89,12 @@
     
     <dependency>
       <groupId>org.apache.directory.shared</groupId>
+      <artifactId>shared-ldap-codec-standalone</artifactId>
+      <scope>provided</scope>
+    </dependency>
+    
+    <dependency>
+      <groupId>org.apache.directory.shared</groupId>
       <artifactId>shared-ldap-codec</artifactId>
     </dependency>
     

Modified: directory/apacheds/branches/m1/core/src/main/java/org/apache/directory/server/core/DefaultDirectoryService.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/m1/core/src/main/java/org/apache/directory/server/core/DefaultDirectoryService.java?rev=1071126&r1=1071125&r2=1071126&view=diff
==============================================================================
--- directory/apacheds/branches/m1/core/src/main/java/org/apache/directory/server/core/DefaultDirectoryService.java
(original)
+++ directory/apacheds/branches/m1/core/src/main/java/org/apache/directory/server/core/DefaultDirectoryService.java
Wed Feb 16 02:31:29 2011
@@ -81,7 +81,7 @@ import org.apache.directory.server.core.
 import org.apache.directory.server.core.trigger.TriggerInterceptor;
 import org.apache.directory.server.i18n.I18n;
 import org.apache.directory.shared.ldap.codec.api.LdapCodecService;
-import org.apache.directory.shared.ldap.codec.standalone.StandaloneLdapCodecService;
+import org.apache.directory.shared.ldap.codec.api.LdapCodecServiceFactory;
 import org.apache.directory.shared.ldap.model.constants.AuthenticationLevel;
 import org.apache.directory.shared.ldap.model.constants.SchemaConstants;
 import org.apache.directory.shared.ldap.model.csn.Csn;
@@ -1477,7 +1477,7 @@ public class DefaultDirectoryService imp
             LOG.debug( "---> Initializing the DefaultDirectoryService " );
         }
         
-                cacheService = new CacheService();
+        cacheService = new CacheService();
         cacheService.initialize( this );
 
         // Initialize the AP caches
@@ -1488,7 +1488,7 @@ public class DefaultDirectoryService imp
 
         dnFactory = new DefaultDnFactory( schemaManager, cacheService.getCache( "dnCache"
) );
 
-        ldapCodecService = new StandaloneLdapCodecService();
+        ldapCodecService = LdapCodecServiceFactory.getSingleton();
         
         // triggers partition to load schema fully from schema partition
         schemaService.initialize();

Modified: directory/apacheds/branches/m1/protocol-ldap/pom.xml
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/m1/protocol-ldap/pom.xml?rev=1071126&r1=1071125&r2=1071126&view=diff
==============================================================================
--- directory/apacheds/branches/m1/protocol-ldap/pom.xml (original)
+++ directory/apacheds/branches/m1/protocol-ldap/pom.xml Wed Feb 16 02:31:29 2011
@@ -126,6 +126,12 @@
     </dependency>
 
     <dependency>
+      <groupId>org.apache.directory.shared</groupId>
+      <artifactId>shared-ldap-codec-standalone</artifactId>
+      <scope>provided</scope>
+    </dependency>
+
+    <dependency>
         <groupId>bouncycastle</groupId>
         <artifactId>bcprov-jdk15</artifactId>
     </dependency>

Modified: directory/apacheds/branches/m1/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/ReplicaEventMessage.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/m1/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/ReplicaEventMessage.java?rev=1071126&r1=1071125&r2=1071126&view=diff
==============================================================================
--- directory/apacheds/branches/m1/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/ReplicaEventMessage.java
(original)
+++ directory/apacheds/branches/m1/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/ReplicaEventMessage.java
Wed Feb 16 02:31:29 2011
@@ -29,8 +29,8 @@ import java.util.Iterator;
 
 import org.apache.directory.server.core.event.EventType;
 import org.apache.directory.shared.i18n.I18n;
-import org.apache.directory.shared.ldap.codec.standalone.StandaloneLdapCodecService;
 import org.apache.directory.shared.ldap.codec.api.LdapCodecService;
+import org.apache.directory.shared.ldap.codec.api.LdapCodecServiceFactory;
 import org.apache.directory.shared.ldap.extras.controls.SyncModifyDnType;
 import org.apache.directory.shared.ldap.extras.controls.syncrepl_impl.SyncModifyDnDecorator;
 import org.apache.directory.shared.ldap.model.entry.DefaultEntry;
@@ -68,7 +68,7 @@ public class ReplicaEventMessage impleme
     public ReplicaEventMessage()
     {
         // used by deserializer
-        codec = new StandaloneLdapCodecService();
+        codec = LdapCodecServiceFactory.getSingleton();
     }
 
 
@@ -81,7 +81,7 @@ public class ReplicaEventMessage impleme
 
     public ReplicaEventMessage( SyncModifyDnDecorator modDnControl, Entry entry )
     {
-        codec = new StandaloneLdapCodecService();
+        codec = LdapCodecServiceFactory.getSingleton();
         this.modDnControl = modDnControl;
         this.entry = entry;
     }

Modified: directory/apacheds/branches/m1/server-annotations/pom.xml
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/m1/server-annotations/pom.xml?rev=1071126&r1=1071125&r2=1071126&view=diff
==============================================================================
--- directory/apacheds/branches/m1/server-annotations/pom.xml (original)
+++ directory/apacheds/branches/m1/server-annotations/pom.xml Wed Feb 16 02:31:29 2011
@@ -73,6 +73,12 @@
     
     <dependency>
       <groupId>org.apache.directory.shared</groupId>
+      <artifactId>shared-ldap-codec-standalone</artifactId>
+      <scope>provided</scope>
+    </dependency>
+    
+    <dependency>
+      <groupId>org.apache.directory.shared</groupId>
       <artifactId>shared-ldap-model</artifactId>
     </dependency>
     

Modified: directory/apacheds/branches/m1/server-annotations/src/test/java/org/apache/directory/server/factory/DirectoryServiceAnnotationTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/m1/server-annotations/src/test/java/org/apache/directory/server/factory/DirectoryServiceAnnotationTest.java?rev=1071126&r1=1071125&r2=1071126&view=diff
==============================================================================
--- directory/apacheds/branches/m1/server-annotations/src/test/java/org/apache/directory/server/factory/DirectoryServiceAnnotationTest.java
(original)
+++ directory/apacheds/branches/m1/server-annotations/src/test/java/org/apache/directory/server/factory/DirectoryServiceAnnotationTest.java
Wed Feb 16 02:31:29 2011
@@ -46,7 +46,7 @@ import org.apache.directory.server.core.
 import org.apache.directory.server.core.factory.DSAnnotationProcessor;
 import org.apache.directory.server.core.partition.Partition;
 import org.apache.directory.server.ldap.LdapServer;
-import org.apache.directory.shared.ldap.codec.standalone.StandaloneLdapCodecService;
+import org.apache.directory.shared.ldap.codec.api.LdapCodecServiceFactory;
 import org.apache.directory.shared.ldap.model.message.Control;
 import org.apache.directory.shared.ldap.model.name.Dn;
 import org.apache.directory.shared.ldap.util.JndiUtils;
@@ -81,7 +81,7 @@ public class DirectoryServiceAnnotationT
         env.put( Context.SECURITY_PRINCIPAL, ServerDNConstants.ADMIN_SYSTEM_DN );
         env.put( Context.SECURITY_CREDENTIALS, "secret" );
         env.put( Context.SECURITY_AUTHENTICATION, "simple" );
-        return new InitialLdapContext( env, JndiUtils.toJndiControls( new StandaloneLdapCodecService(),
controls ) );
+        return new InitialLdapContext( env, JndiUtils.toJndiControls( LdapCodecServiceFactory.getSingleton(),
controls ) );
     }
     
 

Modified: directory/apacheds/branches/m1/server-integ/pom.xml
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/m1/server-integ/pom.xml?rev=1071126&r1=1071125&r2=1071126&view=diff
==============================================================================
--- directory/apacheds/branches/m1/server-integ/pom.xml (original)
+++ directory/apacheds/branches/m1/server-integ/pom.xml Wed Feb 16 02:31:29 2011
@@ -141,6 +141,12 @@
     
     <dependency>
       <groupId>org.apache.directory.shared</groupId>
+      <artifactId>shared-ldap-codec-standalone</artifactId>
+      <scope>test</scope>
+    </dependency>
+
+    <dependency>
+      <groupId>org.apache.directory.shared</groupId>
       <artifactId>ldap-client-api</artifactId>
     </dependency>  
   </dependencies>

Modified: directory/apacheds/branches/m1/server-integ/src/test/java/org/apache/directory/server/operations/search/PagedSearchIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/m1/server-integ/src/test/java/org/apache/directory/server/operations/search/PagedSearchIT.java?rev=1071126&r1=1071125&r2=1071126&view=diff
==============================================================================
--- directory/apacheds/branches/m1/server-integ/src/test/java/org/apache/directory/server/operations/search/PagedSearchIT.java
(original)
+++ directory/apacheds/branches/m1/server-integ/src/test/java/org/apache/directory/server/operations/search/PagedSearchIT.java
Wed Feb 16 02:31:29 2011
@@ -20,7 +20,7 @@
 package org.apache.directory.server.operations.search;
 
  
-import static org.apache.directory.server.integ.ServerIntegrationUtils.getWiredContext;
+import static org.apache.directory.server.integ.ServerIntegrationUtils.getWiredContext; 
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertTrue;
 
@@ -45,8 +45,8 @@ import org.apache.directory.server.core.
 import org.apache.directory.server.core.integ.FrameworkRunner;
 import org.apache.directory.server.ldap.LdapServer;
 import org.apache.directory.shared.asn1.EncoderException;
-import org.apache.directory.shared.ldap.codec.standalone.StandaloneLdapCodecService;
 import org.apache.directory.shared.ldap.codec.api.LdapCodecService;
+import org.apache.directory.shared.ldap.codec.api.LdapCodecServiceFactory;
 import org.apache.directory.shared.ldap.codec.controls.search.pagedSearch.PagedResultsDecorator;
 import org.apache.directory.shared.ldap.model.message.Control;
 import org.apache.directory.shared.ldap.util.JndiUtils;
@@ -200,7 +200,7 @@ public class PagedSearchIT extends Abstr
     @Rule
     public MultiThreadedMultiInvoker i = new MultiThreadedMultiInvoker( MultiThreadedMultiInvoker.THREADSAFE
);
 
-    private LdapCodecService codec = new StandaloneLdapCodecService();
+    private LdapCodecService codec = LdapCodecServiceFactory.getSingleton();
     
     
     /**



Mime
View raw message