From users-return-4042-apmail-directory-users-archive=directory.apache.org@directory.apache.org Fri Sep 16 21:38:14 2011 Return-Path: X-Original-To: apmail-directory-users-archive@www.apache.org Delivered-To: apmail-directory-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id AC6997DDC for ; Fri, 16 Sep 2011 21:38:14 +0000 (UTC) Received: (qmail 55022 invoked by uid 500); 16 Sep 2011 21:38:14 -0000 Delivered-To: apmail-directory-users-archive@directory.apache.org Received: (qmail 54991 invoked by uid 500); 16 Sep 2011 21:38:14 -0000 Mailing-List: contact users-help@directory.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@directory.apache.org Delivered-To: mailing list users@directory.apache.org Received: (qmail 54982 invoked by uid 99); 16 Sep 2011 21:38:14 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 16 Sep 2011 21:38:14 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (athena.apache.org: local policy) Received: from [209.85.161.50] (HELO mail-fx0-f50.google.com) (209.85.161.50) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 16 Sep 2011 21:38:09 +0000 Received: by fxh10 with SMTP id 10so2514385fxh.37 for ; Fri, 16 Sep 2011 14:37:47 -0700 (PDT) MIME-Version: 1.0 Received: by 10.223.44.90 with SMTP id z26mr1963279fae.28.1316209067060; Fri, 16 Sep 2011 14:37:47 -0700 (PDT) Sender: mail@stefan-seelmann.de Received: by 10.152.29.236 with HTTP; Fri, 16 Sep 2011 14:37:46 -0700 (PDT) In-Reply-To: References: Date: Fri, 16 Sep 2011 23:37:46 +0200 X-Google-Sender-Auth: zmo1AbUzjbsUWaIMcGICqMurFro Message-ID: Subject: Re: @CreateDS From: Stefan Seelmann To: users@directory.apache.org Content-Type: text/plain; charset=UTF-8 On Fri, Sep 16, 2011 at 8:49 PM, Jonathan Carlson wrote: > I'm probably not as familiar with the differences between these as I should be but I can't seem to find it in the documentation. > > What is the difference between > > > @CreateDS(name = "SampleDS", allowAnonAccess = true) > > and > > @CreateLdapServer( > allowAnonymousAccess = true, > transports = { @CreateTransport(protocol = "LDAP") }) @CreateDS only creates and start the "core" server. There is no network layer started. You only have access to the DirectoryService but there is also an JNDI DirContext implementation available. @CreateLdapServer starts the "core" server and also the LDAP network protocol. If you want to write integration tests for your custom code and you use e.g. JNDI than you should use the latter because it is closer to your real environment and communicates over the the wire. Kind Regards, Stefan