directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ole Ersoy <ole.er...@gmail.com>
Subject Re: [jira] Created: (DIRSERVER-950) Server Left in Unstable State
Date Thu, 31 May 2007 19:22:56 GMT
OK OK OK - I'll change it - OK :-)
Just wanted to make
all the "Fans" don't start
writing in asking me to change it back :-)

Thanks,
- Ole



Ersin Er wrote:
> Definately +1.
> 
> On 5/31/07, David Jencks <david_jencks@yahoo.com> wrote:
>> I agree with Emmanuel
>>
>> david jencks
>>
>> On May 31, 2007, at 10:43 AM, Ole Ersoy wrote:
>>
>> >
>> >
>> > Emmanuel Lecharny wrote:
>> >> On 5/31/07, Ole Ersoy <ole.ersoy@gmail.com> wrote:
>> >>> Emmanuel,
>> >>>
>> >>> I do my best to please you
>> >> It's not only about me...
>> >
>> > Oh yes it is.  You are the
>> > only one who has commented on this.
>> >
>> > This is strictly your preference,
>> > unless you get 5 people
>> > on the "Entire" mailing list to
>> > agree with you.
>> >
>> > I'm being pretty flexible here.
>> >
>> > 5/200
>> >
>> > As a matter of fact I'll attach
>> > one of Alex's emails to show
>> > you his writing style.
>> >
>> > Compare that to mine.  Do they
>> > look wildly different to you?
>> >
>> > Be honest.  When was the last time
>> > you addressed the list and asked
>> > what our email style preferences are?
>> >
>> >
>> >>> whenever I think it's fair (
>> >>> and I realize you have put
>> >>> a massive amount of time
>> >>> into the server, and I benefit
>> >>> a great deal from this)
>> >>> but this happens to be my
>> >>> preferred writing style.
>> >> It's not about what *you* prefer, but how the community is likely to
>> >> like it.
>> >
>> > Precisely.  That's why I issued the Challenge.
>> >
>> > Just get 5/200 people to agree with you.
>> >
>> > SNIP
>> >
>> >> Also be fair : your mails are supposed to please the many who read
>> >> them, not the one who writes them ...
>> >
>> > Right - Back to my previous point.  Are you sure
>> > that your preference is the preference of the many?
>> >
>> > Guys - If you are reading this - Please
>> > let me know if you agree with Emmanuel.
>> > I'm all for acting in the communities best interest.
>> >
>> >> Ok, I want it to be clear. You can write the mail using one char per
>> >> column, there is nothing we can do about that. Just understand
>> >> that at
>> >> some point, if you just continue with such mails, they will simply be
>> >> ignored. This is where I want to get you : be part of the band,
>> >> accept
>> >> the common rules, and play with us, or you will be like the poor
>> >> lonely child in the playground, simply because you want to play the
>> >> game with your own rules. There are no punishments, no bashing,
>> >> nothing, just you will feel alone. And that will be a loss for all of
>> >> us, because what we are trying to do is to build a community of smart
>> >> people. And you are smart.
>> >
>> >
>> > Right back to the point.  Prove that you are right.
>> > It's an open list.  Guys, I really want to act
>> > in the communities best interest.  If you agree
>> > with Emmanuel, then please speak up.
>> >
>> >> Be one of us. Just accept that if we have a different opinion, by no
>> >> mean it should be seen as a constraint on you that we ask you to
>> >> change your habits. It's just a request, for the good of the project.
>> >
>> > Right - lets make sure that your preference
>> > covers 80% of the core contributors though.
>> >
>> > Thanks,
>> > - Ole
>> > X-Account-Key: account2
>> > Delivered-To: ole.ersoy@gmail.com
>> > Received: by 10.67.19.4 with SMTP id w4cs224013ugi;
>> >         Wed, 28 Mar 2007 22:33:21 -0700 (PDT)
>> > Received: by 10.114.151.13 with SMTP id y13mr115517wad.1175146400119;
>> >         Wed, 28 Mar 2007 22:33:20 -0700 (PDT)
>> > Return-Path: <dev-return-17025-
>> > ole.ersoy=gmail.com@directory.apache.org>
>> > Received: from mail.apache.org (hermes.apache.org [140.211.11.2])
>> >         by mx.google.com with SMTP id y11si1009095pod.
>> > 2007.03.28.22.33.19;
>> >         Wed, 28 Mar 2007 22:33:20 -0700 (PDT)
>> > Received-SPF: pass (google.com: domain of dev-return-17025-
>> > ole.ersoy=gmail.com@directory.apache.org designates 140.211.11.2 as
>> > permitted sender)
>> > DomainKey-Status: good (test mode)
>> > Received: (qmail 47172 invoked by uid 500); 29 Mar 2007 05:33:26 -0000
>> > Mailing-List: contact dev-help@directory.apache.org; run by ezmlm
>> > Precedence: bulk
>> > List-Help: <mailto:dev-help@directory.apache.org>
>> > List-Unsubscribe: <mailto:dev-unsubscribe@directory.apache.org>
>> > List-Post: <mailto:dev@directory.apache.org>
>> > List-Id: <dev.directory.apache.org>
>> > Reply-To: "Apache Directory Developers List"
>> > <dev@directory.apache.org>
>> > Delivered-To: mailing list dev@directory.apache.org
>> > Received: (qmail 47161 invoked by uid 99); 29 Mar 2007 05:33:26 -0000
>> > Received: from herse.apache.org (HELO herse.apache.org)
>> > (140.211.11.133)
>> >     by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 28 Mar 2007
>> > 22:33:26 -0700
>> > X-ASF-Spam-Status: No, hits=2.0 required=10.0
>> >       tests=HTML_MESSAGE,SPF_PASS
>> > X-Spam-Check-By: apache.org
>> > Received-SPF: pass (herse.apache.org: domain of akarasulu@gmail.com
>> > designates 66.249.82.233 as permitted sender)
>> > Received: from [66.249.82.233] (HELO wx-out-0506.google.com)
>> > (66.249.82.233)
>> >     by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 28 Mar 2007
>> > 22:33:17 -0700
>> > Received: by wx-out-0506.google.com with SMTP id h31so78674wxd
>> >         for <dev@directory.apache.org>; Wed, 28 Mar 2007 22:32:56
>> > -0700 (PDT)
>> > DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed;
>> >         d=gmail.com; s=beta;
>> >         h=domainkey-signature:received:received:message-
>> > id:date:from:sender:to:subject:in-reply-to:mime-version:content-
>> > type:references:x-google-sender-auth;
>> >         b=e15PRujCWW6xjvZSo8oKxPYC/
>> > 2fuw6mEL8CNLY5AwHmpTplUn5DgmN04qk6fEBGya/
>> > RRAaYqjzKZ1FOzeOZpPV2dSPbATXk2alvNKM1VFbG85ObNo1Jegc/
>> > BzRFzc4DwHrnWJB8XRsynJGA+tBZfB1Zcrh2IBrs5FuDyaqPtYc4=
>> > DomainKey-Signature: a=rsa-sha1; c=nofws;
>> >         d=gmail.com; s=beta;
>> >         h=received:message-id:date:from:sender:to:subject:in-reply-
>> > to:mime-version:content-type:references:x-google-sender-auth;
>> >
>> > b=oRBm4lDbj2gCMg01i9BMnCTgo4nC259sJhldW0N3bfIv9SpPmXLgycpEn0WBUzPN5TGU
>> > RTonNGG9wOKzDC5tuN5L9Fn0yD4y19V8ZoKxTYN35pfLYtdhpZpPDFNn07ltbHjCH6zOGM
>> > 12+br9nNwIutPYMaeXkPwXOnzkB4yQomk=
>> > Received: by 10.70.32.6 with SMTP id f6mr623651wxf.1175146376870;
>> >         Wed, 28 Mar 2007 22:32:56 -0700 (PDT)
>> > Received: by 10.70.78.18 with HTTP; Wed, 28 Mar 2007 22:32:56 -0700
>> > (PDT)
>> > Message-ID:
>> > <a32f6b020703282232j2db0bfe0rf17aab2bfc35981f@mail.gmail.com>
>> > Date: Thu, 29 Mar 2007 01:32:56 -0400
>> > From: "Alex Karasulu" <akarasulu@apache.org>
>> > Sender: akarasulu@gmail.com
>> > To: "Apache Directory Developers List" <dev@directory.apache.org>
>> > Subject: Re: [Schema] How do I write a new ObjectClass to ApacheDS
>> > In-Reply-To: <460B1F48.20401@gmail.com>
>> > MIME-Version: 1.0
>> > Content-Type: multipart/alternative;
>> >       boundary="----=_Part_19730_26330448.1175146376809"
>> > References: <460AC99F.5030600@gmail.com>
>> >        <a32f6b020703281737s53a3fb38o1c7d7cf7fbaba4c1@mail.gmail.com>
>> >        <460B1152.9030207@gmail.com>
>> >        <a32f6b020703281849o7bc4f3d2odd194151e4aa489@mail.gmail.com>
>> >        <460B1F48.20401@gmail.com>
>> > X-Google-Sender-Auth: df9be979cd896b8d
>> > X-Virus-Checked: Checked by ClamAV on apache.org
>> >
>> > ------=_Part_19730_26330448.1175146376809
>> > Content-Type: text/plain; charset=ISO-8859-1; format=flowed
>> > Content-Transfer-Encoding: 7bit
>> > Content-Disposition: inline
>> >
>> > Ole,
>> >
>> > On 3/28/07, Ole Ersoy <ole.ersoy@gmail.com> wrote:
>> >
>> >> Ahhh - You are still out there - Lucky Dog!
>> >
>> >
>> > Yeah baby!
>> >
>> >
>> >
>> >> Thanks for wading through all these "Books" while on vacation!
>> >
>> >
>> > NP.
>> >
>> >
>> > SNIP ...
>> >
>> >
>> >
>> >
>> >> how do I create an ObjectClass on the fly before storing a (Java
>> >> Class
>> >> instance)?
>> >
>> >
>> > Ahh that's way easy now.  You're timing is great ... you would
>> > never have
>> > been
>> > able to do this with 1.0 without a restart which blows.
>> >
>> > Anyways there's a special schema partition: ou=schema.  Under that
>> > context
>> > are a bunch of schema names like ..
>> >
>> > cn=nis
>> > cn=inetorgperson
>> > cn=blah blah blan
>> >
>> > Under these are container ou's that each store various schema
>> > entities for
>> > that schema such as attributeTypes, syntaxes, objectClasses etc.  I
>> > just
>> > realized that if you read that document on the schema subsystem
>> > redesign you
>> > can save me some typing brotha man :).
>> >
>> > So basically you can create your own schema object for the
>> > namespace.  Then
>> > under that schema object create teh containers.  Then create the
>> > objects
>> > according to that redesign document.
>> >
>> > You basically create entries with the createSubcontext command and
>> > that
>> > document tells you what those metadata entries describing schema
>> > objects
>> > looks like in terms of the attributes they need to contain.  It's
>> > pretty
>> > simple stuff.  If you create something that is not allowed or
>> > incorrect the
>> > server will let you know.
>> >
>> >
>> >
>> >> On the wiki here:
>> >>
>> >> http://cwiki.apache.org/confluence/display/DIRxSRVx11/Schema
>> >> +Subsystem+Redesign
>> >
>> >
>> > Yeah this is the doco to read.
>> >
>> >
>> >
>> >> It says:
>> >> The new design will enable dynamic yet persistent updates to schema
>> >> elements within the server.
>> >
>> >
>> > yep.
>> >
>> >
>> >
>> >> So how do I do it using a JNDI Context?
>> >
>> >
>> > Easy just use JNDI to create objects.  Take a look at the test
>> > classes we
>> > have in the repository for testing the new dynamic schema
>> > capabilities.
>> > It's got JNDI code for doing this that you can adapt to your
>> > needs.  Here's
>> > a link to one:
>> >
>> > https://svn.apache.org/repos/asf/directory/apacheds/trunk/core-unit/
>> > src/test/java/org/apache/directory/server/core/schema/
>> > MetaObjectClassHandlerITest.java
>> >
>> > Take a look at the testAddObjectClass() method.  That should have
>> > the logic
>> > in there that you
>> > need to create a new objectClass in a schema in the server.
>> >
>> > SNIP ...
>> >
>> > HTH,
>> > Alex
>> >
>> > Alex Karasulu wrote:
>> >> Hi Ole,
>> >>
>> >> On 3/28/07, *Ole Ersoy* <ole.ersoy@gmail.com
>> >> <mailto: ole.ersoy@gmail.com>> wrote:
>> >>
>> >>     Hey Alex,
>> >>
>> >>     Yes - I think we're getting warmer!
>> >>
>> >>     Here's the thing.  Suppose I want to store an object that has
>> >>     String members
>> >>
>> >>     shoeSize
>> >>     weight
>> >>     height
>> >>     name
>> >>
>> >>     etc.
>> >>
>> >>     I probably have name on some ObjectClass already defined in
>> >> ApacheDS.
>> >>
>> >>     However I still want to duplicate name on a completely different
>> >>     ObjectClass.
>> >>
>> >>
>> >> No problem.  Really it does not matter; you can create a new xyzName
>> >> attribute.  Sometimes that's not so bad.  Now I see that you want to
>> >> autogenerate a schema from the Class
>> >> metadata and creating the attributes for your objectClass with
>> >> namespace qualification might
>> >> be a good idea.
>> >>
>> >>
>> >>
>> >>     The ObjectClass I want has a 1:1 correspondence with the Java
>> >> Class I
>> >>     want to store.
>> >>     That way a simple convention can be used to store the object,
>> >> and no
>> >>     configuration file
>> >>     or index searching is needed to include a preexisting
>> >> ObjectClass that
>> >
>> >>     has the name attribute on it.
>> >>
>> >>
>> >> Yep I agree (now that I understand your motives more) just create all
>> >> the LDAP
>> >> metadata you need on the fly to establish the mapping.
>> >>
>> >>
>> >>
>> >>     I guess I could create an index with all the LDAP
>> >> attributeTypes and
>> >>     look to see whether a certain attribute
>> >>     already exists, and use it, but I think it's simpler just to
>> >> create a
>> >>     brand new ObjectClass.
>> >>
>> >>
>> >> Nah don't bother.
>> >>
>> >>
>> >>
>> >>     Which leads me to another question.
>> >>
>> >>     Can ObjectClass names have periods or underscores in them
>> >>
>> >>     For Instance there's inetOrgPerson?
>> >>
>> >>     Could it be
>> >>     inet.org.person?
>> >>
>> >>
>> >> I think so.
>> >>
>> >>
>> >>
>> >>     The reason I ask is because I want to create ObjectClasses on
>> >> the fly
>> >>     that are namespaced.
>> >>
>> >>
>> >> Gotchya.
>> >>
>> >> SNIP ...
>> >>
>> >> Hope fishing was a blast.  I'm sure you're really glad to out of the
>> >> Sun, blue clear water,
>> >> and cool breeze environment and  be back in front of a monitor.
>> >>
>> >> Hey I still have a few more days to go :).  It's not over yet.
>> >>
>> >> Regards,
>> >> Alex
>> >>
>> >> Alex Karasulu wrote:
>> >>> Hi Ole,
>> >>>
>> >>> Looks like you got some good advice already.  Let me just add one
>> >>> more
>> >>> suggestion
>> >>> while you're looking into creating a schema.  Sometimes you'll find
>> >>> that the
>> >>> attributeTypes and objectClasses you're looking for are already
>> >>> defined in published
>> >>> schemas.
>> >>>
>> >>> For example for users you might want to take a look at something
>> >>> like
>> >>> inetOrgPerson etc.
>> >>>
>> >>> Second I suppose you're thinking of staying bleeding edge by
>> >>> using 1.5
>> >>> rather than using
>> >>> 1.0.  I'd recommend this.  And if so then merely adding the schema
>> >>> description entry for
>> >>> the objectClass in the ou=schema partition in the appropriate place
>> >>> should work.  The schema
>> >>> is dynamic in 1.5 but I guess Emmanuel and Stephan already pointed
>> >>> this out.
>> >>>
>> >>> I will try to back read this thread.  As you can imagine I have a
>> >>> lot
>> >>> to catch up on since
>> >>> I've been on vacation fishing all week :D.  Yeah I don't miss LDAP
>> >> he he.
>> >>>
>> >>> Regards,
>> >>> Alex
>> >>>
>> >>> On 3/28/07, *Ole Ersoy* < ole.ersoy@gmail.com
>> >> <mailto:ole.ersoy@gmail.com>
>> >>> <mailto:ole.ersoy@gmail.com <mailto:ole.ersoy@gmail.com>>>
wrote:
>> >>>
>> >>>     Hey Guys,
>> >>>
>> >>>     I'm in the middle of designing the DAS and
>> >>>     decided that I can probably make it way more efficient
>> >>>     if I create an ObjectClass per Java Class that I want to
>> >>> write to
>> >>>     ADS.
>> >>>
>> >>>     So how do I programmatically create a ObjectClass and store it
>> >>>     in ApacheDS?
>> >>>
>> >>>     Do we have a description somewhere or is this a standard JNDI
>> >>> thing?
>> >>>
>> >>>     Here's a little further elaboration on what I want to do for
>> >>> those
>> >>>     interested.
>> >>>
>> >>>     Keep in mind this is just an example.  The Class User could
>> >>> be any
>> >>>     java
>> >>>     class used in a model.
>> >>>
>> >>>     I have a Java Class >> User
>> >>>
>> >>>     The Class User has String members [firstName, lastName,
>> >>> password]
>> >>>
>> >>>     So I want to create a Structural ObjectClass in ApacheDS so that
>> >>>     I can add it as an attribute to the DN where a User instance
>> >>> will be
>> >
>> >>>     stored (The java object instance).
>> >>>
>> >>>     If I were doing this in a relational database, I would create a
>> >> table
>> >>>     definition instead of a ObjectClass.
>> >>>
>> >>>     So I'm looking for something like this:
>> >>>
>> >>>     ObjectClass objectClass = LDAPSchemaFactory.createObjectClass();
>> >>>     objectClass.setName ("User");
>> >>>     ObjectClassAttribute objectClassAttribute =
>> >>>     LDAPSchemaFactory.createObjectClassAttribute();
>> >>>     objectClassAttribute.setName("firstName");
>> >>>     objectClassAttribute.setType (LDAP_STRING_ATTRIBUTE_TYPE);
>> >>>
>> >>>     Then I would do something like:
>> >>>
>> >>>     ctx.storeObjectClass(objectClass);
>> >>>
>> >>>     The objectClass can now be assigned as an attribute to an ADS
>> >> entry,
>> >>>     and if we were to look at all the ObjectClasses in ADS through
>> >>>     JXPlorer
>> >>>     or LDAP Studio,
>> >>>     we would see the User ObjectClass in the list.
>> >>>
>> >>>     Does that make sense?
>> >>>
>> >>>     Thanks,
>> >>>     - Ole
>> >>>
>> >>>
>> >>>
>> >>>
>> >>>
>> >>>
>> >>
>> >>
>> >>
>> >
>> > ------=_Part_19730_26330448.1175146376809
>> > Content-Type: text/html; charset=ISO-8859-1
>> > Content-Transfer-Encoding: 7bit
>> > Content-Disposition: inline
>> >
>> > Ole,<br><br>
>> > <div><span class="gmail_quote">On 3/28/07, <b
>> > class="gmail_sendername">Ole Ersoy</b> <<a onclick="return
>> > top.js.OpenExtLink(window,event,this)"
>> > href="mailto:ole.ersoy@gmail.com"
>> > target="_blank">ole.ersoy@gmail.com</a>
>> > > wrote:</span> </div>
>> > <blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN:
>> > 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">Ahhh - You are
>> > still out there - Lucky Dog!</blockquote>
>> > <div></div>
>> > <div>Yeah baby!</div>
>> > <div><br></div>
>> > <blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN:
>> > 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">Thanks for wading
>> > through all these "Books" while on vacation!</blockquote>
>> > <div></div>
>> > <div>NP.</div>
>> > <div><br></div>
>> > <div>SNIP ...</div>
>> > <div></div>
>> > <div><br></div>
>> > <blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN:
>> > 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">how do I create an
>> > ObjectClass on the fly before storing a (Java Class<br>instance)?</
>> > blockquote>
>> > <div></div>
>> > <div>Ahh that's way easy now. You're timing is
>> > great ... you would never have been</div>
>> > <div>able to do this with 1.0 without a restart which blows.</div>
>> > <div></div>
>> > <div>Anyways there's a special schema partition:
>> > ou=schema. Under that context are a bunch of schema names
>> > like ..</div>
>> > <div></div>
>> > <div>cn=nis</div>
>> > <div>cn=inetorgperson</div>
>> > <div>cn=blah blah blan</div>
>> > <div></div>
>> > <div>Under these are container ou's that each store various
>> > schema entities for that schema such as attributeTypes, syntaxes,
>> > objectClasses etc. I just realized that if you read that
>> > document on the schema subsystem redesign you can save me some
>> > typing brotha man :).
>> > </div>
>> > <div></div>
>> > <div>So basically you can create your own schema object for the
>> > namespace. Then under that schema object create teh
>> > containers. Then create the objects according to that
>> > redesign document.</div>
>> > <div></div>
>> > <div>You basically create entries with the createSubcontext command
>> > and that document tells you what those metadata entries describing
>> > schema objects looks like in terms of the attributes they need to
>> > contain. It's pretty simple stuff. If you create
>> > something that is not allowed or incorrect the server will let you
>> > know.
>> > </div>
>> > <div><br></div>
>> > <blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN:
>> > 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">On the wiki
>> > here:<br><a onclick="return top.js.OpenExtLink(window,event,this)"
>> > href="http://cwiki.apache.org/confluence/display/DIRxSRVx11/Schema
>> > +Subsystem+Redesign" target="_blank">
>> > http://cwiki.apache.org/confluence/display/DIRxSRVx11/Schema
>> > +Subsystem+Redesign</a></blockquote>
>> > <div></div>
>> > <div>Yeah this is the doco to read.</div>
>> > <div><br></div>
>> > <blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN:
>> > 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">It says:<br>The new
>> > design will enable dynamic yet persistent updates to
>> > schema<br>elements within the server.
>> > </blockquote>
>> > <div></div>
>> > <div>yep.</div>
>> > <div><br></div>
>> > <blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN:
>> > 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">So how do I do it
>> > using a JNDI Context?</blockquote>
>> > <div></div>
>> > <div>Easy just use JNDI to create objects. Take a look at the
>> > test classes we have in the repository for testing the new dynamic
>> > schema capabilities. It's got JNDI code for doing this
>> > that you can adapt to your needs. Here's a link to one:
>> > </div>
>> > <div></div>
>> > <div><a href="https://svn.apache.org/repos/asf/directory/apacheds/
>> > trunk/core-unit/src/test/java/org/apache/directory/server/core/
>> > schema/MetaObjectClassHandlerITest.java">https://svn.apache.org/
>> > repos/asf/directory/apacheds/trunk/core-unit/src/test/java/org/
>> > apache/directory/server/core/schema/MetaObjectClassHandlerITest.java
>> > </a></div>
>> > <div></div>
>> > <div>Take a look at thetestAddObjectClass() method.
>> > That should have the logic in there that you</div>
>> > <div>need to create a new objectClass in a schema in the
>> > server.<br></div>
>> > <div>SNIP ...</div>
>> > <div><br>HTH,</div>
>> > <div>Alex<br><br>Alex Karasulu wrote:<br>> Hi
>> > Ole,<br>><br>> On 3/28/07, *Ole Ersoy* <<a onclick="return
>> > top.js.OpenExtLink(window,event,this)"
>> > href="mailto:ole.ersoy@gmail.com" target="_blank">ole.ersoy@gmail.com
>> > </a><br>> <mailto:<a onclick="return top.js.OpenExtLink
>> > (window,event,this)" href="mailto:ole.ersoy@gmail.com"
>> > target="_blank"> ole.ersoy@gmail.com</a>>>
>> > wrote:<br>><br>> Hey
>> > Alex,<br>><br>> Yes - I think
>> > we're getting warmer!
>> > <br>><br>> Here's the
>> > thing.Suppose I want to store an object that
>> > has<br>> String members
>> > <br>><br>>
>> > shoeSize<br>>
>> > weight<br>>
>> > height<br>>
>> > name<br>><br>> etc.
>> > <br>><br>> I probably have name on
>> > some ObjectClass already defined in
>> > ApacheDS.<br>><br>> However I still
>> > want to duplicate name on a completely different
>> > <br>> ObjectClass.<br>><br>><br>
>> > > No problem.Really it does not matter; you can
>> > create a new xyzName<br>> attribute.Sometimes
>> > that's not so bad.Now I see that you want
>> > to<br>> autogenerate a schema from the Class <br>> metadata
>> > and creating the attributes for your objectClass with
>> > <br>> namespace qualification might<br>> be a good
>> > idea.<br>><br>><br>><br>> The
>> > ObjectClass I want has a 1:1 correspondence with the Java Class I
>> > <br>> want to
>> > store.<br>> That way a simple convention
>> > can be used to store the object, and no
>> > <br>> configuration
>> > file<br>> or index searching is needed
>> > to include a preexisting ObjectClass that
>> > <br>> has the name attribute on
>> > it.<br>><br>><br>> Yep I agree (now that I understand
your
>> > motives more) just create all
>> > <br>> the LDAP<br>> metadata you need on the fly to establish
>> > the mapping.<br>>
>> > <br>><br>><br>> I guess I could
>> > create an index with all the LDAP attributeTypes
>> > and<br>> look to see whether a certain
>> > attribute
>> > <br>> already exists, and use it, but I
>> > think it's simpler just to create a
>> > <br>> brand new
>> > ObjectClass.<br>><br>><br>> Nah don't
>> > bother.<br>><br>><br>><br>>
>> > Which leads me to another question.
>> > <br>><br>> Can ObjectClass names have
>> > periods or underscores in them
>> > <br>><br>> For Instance there's
>> > inetOrgPerson?<br>><br>> Could it
>> > be<br>> inet.org.person?
>> > <br>><br>><br>> I think so.
>> > <br>><br>><br>><br>> The reason
>> > I ask is because I want to create ObjectClasses on the fly
>> > <br>> that are
>> > namespaced.<br>><br>><br>> Gotchya.<br>><br>>
>> > SNIP ...<br>><br>> Hope fishing was a
>> > blast.I'm sure you're really glad to out of the
>> > <br>> Sun, blue clear water,<br>> and cool breeze environment
>> > andbe back in front of a monitor. <br>><br>> Hey
>> > I still have a few more days to go :).It's not over
>> > yet.<br>><br>> Regards,<br>> Alex
>> > <br>><br>> Alex Karasulu wrote:<br>> > Hi Ole,<br>>
>> > ><br>> > Looks like you got some good advice
>> > already.Let me just add one more <br>> >
>> > suggestion<br>> > while you're looking into creating a
>> > schema.Sometimes you'll find
>> > <br>> > that the<br>> > attributeTypes and
>> > objectClasses you're looking for are already<br>> >
>> > defined in published <br>> > schemas.<br>> ><br>>
>> > > For example for users you might want to take a look at
>> > something like
>> > <br>> > inetOrgPerson etc.<br>> ><br>> >
Second I
>> > suppose you're thinking of staying bleeding edge by using
>> > 1.5<br>> > rather than using<br>> >
>> > 1.0.I'd recommend this.And if so then
>> > merely adding the schema
>> > <br>> > description entry for<br>> > the objectClass
in
>> > the ou=schema partition in the appropriate place <br>> >
>> > should work.The schema<br>> > is dynamic in 1.5
>> > but I guess Emmanuel and Stephan already pointed
>> > <br>> > this out.<br>> ><br>> > I will try
to
>> > back read this thread.As you can imagine I have a lot
>> > <br>> > to catch up on since<br>> > I've been on
>> > vacation fishing all week :D.Yeah I don't miss LDAP
>> > <br>> he he.<br>> ><br>> > Regards,<br>>
>
>> > Alex<br>> ><br>> > On 3/28/07, *Ole Ersoy* < <a
>> > onclick="return top.js.OpenExtLink(window,event,this)"
>> > href="mailto:ole.ersoy@gmail.com" target="_blank">
>> > ole.ersoy@gmail.com</a><br>> <mailto:<a onclick="return
>> > top.js.OpenExtLink(window,event,this)"
>> > href="mailto:ole.ersoy@gmail.com"
>> > target="_blank">ole.ersoy@gmail.com</a>><br>> >
>> > <mailto:<a onclick="return top.js.OpenExtLink
>> > (window,event,this)" href="mailto:ole.ersoy@gmail.com"
>> > target="_blank">
>> > ole.ersoy@gmail.com </a><mailto:<a onclick="return
>> > top.js.OpenExtLink(window,event,this)"
>> > href="mailto:ole.ersoy@gmail.com"
>> > target="_blank">ole.ersoy@gmail.com</a>>>> wrote:<br>>
>> > ><br>> > Hey Guys,
>> > <br>> ><br>> > I'm in the
>> > middle of designing the DAS and<br>>
>> > > decided that I can probably make it
>> > way more efficient <br>> > if I
>> > create an ObjectClass per Java Class that I want to write to
>> > <br>> > ADS.<br>> ><br>>
>> > > So how do I programmatically create a
>> > ObjectClass and store it<br>> > in
>> > ApacheDS? <br>> ><br>> > Do we
>> > have a description somewhere or is this a standard JNDI thing?
>> > <br>> ><br>> > Here's a
>> > little further elaboration on what I want to do for those<br>>
>> > > interested. <br>> ><br>>
>> > > Keep in mind this is just an
>> > example.The Class User could be any
>> > <br>> > java<br>>
>> > > class used in a model.<br>>
>> > ><br>> > I have a Java Class
>> > >> User <br>> ><br>> >
>> > The Class User has String members [firstName, lastName, password]
>> > <br>> ><br>> > So I want to
>> > create a Structural ObjectClass in ApacheDS so that<br>>
>> > > I can add it as an attribute to the DN
>> > where a User instance will be <br>> >
>> > stored (The java object instance).
>> > <br>> ><br>> > If I were doing
>> > this in a relational database, I would create a<br>>
>> > table<br>> > definition instead of a
>> > ObjectClass.<br>> > <br>> > So
>> > I'm looking for something like this:
>> > <br>> ><br>> > ObjectClass
>> > objectClass = LDAPSchemaFactory.createObjectClass();<br>>
>> > > objectClass.setName
>> > ("User");<br>> >
>> > ObjectClassAttribute objectClassAttribute = <br>>
>> > >
>> > LDAPSchemaFactory.createObjectClassAttribute();<br>>
>> > > objectClassAttribute.setName
>> > ("firstName");<br>> >
>> > objectClassAttribute.setType (LDAP_STRING_ATTRIBUTE_TYPE);<br>>
>> > > <br>> > Then I would do
>> > something like:
>> > <br>> ><br>> >
>> > ctx.storeObjectClass(objectClass);<br>> ><br>>
>> > > The objectClass can now be assigned as
>> > an attribute to an ADS<br>> entry, <br>>
>> > > and if we were to look at all the
>> > ObjectClasses in ADS through
>> > <br>> > JXPlorer<br>>
>> > > or LDAP Studio,<br>>
>> > > we would see the User ObjectClass in
>> > the list.<br>> ><br>> > Does
>> > that make sense? <br>> ><br>> >
>> > Thanks,<br>> > - Ole
>> > <br>> ><br>> ><br>> ><br>> ><br>>
>> > ><br>> ><br>><br>><br>><br><br></div><br>
>> >
>> > ------=_Part_19730_26330448.1175146376809--
>> >
>>
>>
> 
> 

Mime
View raw message