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 1306F9457 for ; Wed, 21 Sep 2011 15:40:40 +0000 (UTC) Received: (qmail 62053 invoked by uid 500); 21 Sep 2011 15:40:39 -0000 Delivered-To: apmail-directory-users-archive@directory.apache.org Received: (qmail 62024 invoked by uid 500); 21 Sep 2011 15:40:39 -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 62014 invoked by uid 99); 21 Sep 2011 15:40:39 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 21 Sep 2011 15:40:39 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of ayyagarikiran@gmail.com designates 209.85.210.178 as permitted sender) Received: from [209.85.210.178] (HELO mail-iy0-f178.google.com) (209.85.210.178) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 21 Sep 2011 15:40:32 +0000 Received: by iabz21 with SMTP id z21so2791065iab.37 for ; Wed, 21 Sep 2011 08:40:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:content-type :content-transfer-encoding; bh=ne6ZPtxEapI1xSCiPA3UXTK7SmMRc6QIOyu+Bbnr0qk=; b=xgMJfJ7PSuPWIZwRWD1h3bA/NLu1kHbu6RvZ2YFnMy80aB2SJIGbwXofG94i4ixnL0 445nXWpmix8QxM0ag5beH1KI0e855J2x8qmddwKPiK35GoEqNfMJLXwXEfeHqbomPkXP UG5F/xcIWk8BATA2bONIPmD6vJwBai6EihFpQ= MIME-Version: 1.0 Received: by 10.231.8.35 with SMTP id f35mr1874127ibf.4.1316619611150; Wed, 21 Sep 2011 08:40:11 -0700 (PDT) Sender: ayyagarikiran@gmail.com Received: by 10.231.39.198 with HTTP; Wed, 21 Sep 2011 08:40:11 -0700 (PDT) In-Reply-To: References: Date: Wed, 21 Sep 2011 11:40:11 -0400 X-Google-Sender-Auth: t1-GVshrvFSeXk7s2df6NEaa-uk Message-ID: Subject: Re: changing directory of ldif/data From: Kiran Ayyagari To: users@directory.apache.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org On Wed, Sep 21, 2011 at 11:33 AM, david jones wrote: > It doesn't need to be after the service is started, isn't there a way dur= ing > initialization to say I want all my ldap files to go somewhere besides th= e > default? > there is, use the setWorkingDirectory(), I suspect that your app is not setting this value properly or there seems to be something else going wrong, it will be helpful if you paste the code used for initializing the server/service in your app > =A0I'm thinking about possibilities such as a 2nd instance of the app run= s in > a different directory, but can use the ldap data from the first, maybe fo= r a > cheap and quick cold start redundancy > nah, the same data directory cannot be used by two instances (very dangerou= s!) but in general the time taken to start the directory is very negligible, are you doing some time consuming task during startup? > On Wed, Sep 21, 2011 at 8:51 AM, Kiran Ayyagari wro= te: > >> On Wed, Sep 21, 2011 at 8:42 AM, david jones wrote= : >> > Thanks, yes i've read your link and can read in a LDIF schema from the >> > default directory or by specifying one on LdifFileLoader. >> > >> > my main problem is changing the directories for output, how can i chan= ge >> the >> still not clear why would you want to do that, once the service is >> started changing the working directory >> will not have any effect and doing so might have unknown consequences >> > location of where the ldap data is stored? What does setWorkingDirecto= ry >> do, >> > and are there any release or environment restrictions to it (it seems = to >> do >> > nothing for me) >> > >> setWorkingDirectory() sets the main folder where ALL the ldap server's >> data is stored >> > thanks, >> > david >> > >> > On Tue, Sep 20, 2011 at 6:40 PM, Kiran Ayyagari > >wrote: >> > >> >> I guess you want to add some new schema to the directory, if that is >> >> correct you need to add >> >> them directly to the ou=3Dschema partition. >> >> >> >> This section [1] will help you in understanding the format of the sch= ema >> >> entries >> >> >> >> [1] >> >> >> http://directory.apache.org/apacheds/1.5/31-add-your-first-elements-to-t= he-schema.html#3.1.Addyourfirstelementstotheschema-UsingApacheDirectoryStud= ioSchemaEditortoloadthenewschemaelements >> >> >> >> On Tue, Sep 20, 2011 at 5:13 PM, david jones >> wrote: >> >> > i'm having trouble changing the directories of where the ldif is re= ad >> >> from >> >> > and/or where the ldap data is stored. >> >> > >> >> > 1) The below works if i set NEW_DIR to an absolute path: >> >> > >> >> > =A0LdifFileLoader ldifLoader =3D new >> >> LdifFileLoader(service.getAdminSession(), >> >> > NEW_DIR + "/newSchema.ldif"); >> >> > =A0ldifLoader.execute(); >> >> > >> >> > 2) But this does not work, i.e. its looking in >> >> > System.getProperty("user.dir");, not DIFFERENT_DIR for the ldif fil= e >> >> > >> >> > service.setWorkingDirectory(new File(DIFFERENT_DIR)); >> >> > LdifFileLoader ldifLoader =3D new >> LdifFileLoader(service.getAdminSession(), >> >> > "/newSchema.ldif"); >> >> > >> >> > 3) Is there away to change where the schema and system folders are >> >> stored? >> >> > They seem to always go in to "user.dir"/server-work >> >> > >> >> > 4) does being on 1.5.5 vs. being on 1.5.6,1.5.7 change this behavio= r? >> >> > >> >> > 5) does creating a new partition instead of adding my new schema >> elements >> >> in >> >> > cn=3Dother,ou=3Dschema help/hinder this or anything else? >> >> > >> >> > thanks, >> >> > david >> >> > >> >> > On Tue, Sep 20, 2011 at 1:11 PM, Kiran Ayyagari > >> >wrote: >> >> > >> >> >> On Tue, Sep 20, 2011 at 12:59 PM, david jones >> >> wrote: >> >> >> > For an embedded server, is it possible to read an ldif in from 1 >> >> >> directory >> >> >> > (i.e packaged with the product) , and store LDAP data >> >> >> (server-work/system) >> >> >> > in a different one (i.e. outside of the product directory)? >> >> >> > >> >> >> no, it is not possible in the way you are doing, >> >> >> >> >> >> > I'm using apacheds 1.5, i tried the below code, but it seems to = be >> >> >> ignored >> >> >> > when reading in my ldif: >> >> >> > service.setWorkingDirectory(new File("\newdir")); >> >> >> > >> >> >> > Currently i'm adding my schema changes to ou=3Dschema,cn=3Dother= , does >> >> that >> >> >> > affect ldif input vs. creating a new partition? >> >> >> > >> >> >> sorry didn't understand, can you elaborate a bit about the above t= wo >> >> >> questions >> >> >> > >> >> >> > Thanks, >> >> >> > David >> >> >> > >> >> >> >> >> >> >> >> >> >> >> >> -- >> >> >> Kiran Ayyagari >> >> >> >> >> > >> >> > >> >> > >> >> > -- >> >> > David Jones >> >> > jonesda24@gmail.com >> >> > c) 302-5648 >> >> > >> >> >> >> >> >> >> >> -- >> >> Kiran Ayyagari >> >> >> > >> > >> > >> > -- >> > David Jones >> > jonesda24@gmail.com >> > c) 302-5648 >> > >> >> >> >> -- >> Kiran Ayyagari >> > > > > -- > David Jones > jonesda24@gmail.com > c) 302-5648 > --=20 Kiran Ayyagari