directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Jencks <david_jen...@yahoo.com>
Subject Re: [jira] Created: (DIRSERVER-950) Server Left in Unstable State
Date Thu, 31 May 2007 18:06:36 GMT
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> &lt;<a onclick="return  
> top.js.OpenExtLink(window,event,this)"  
> href="mailto:ole.ersoy@gmail.com"  
> target="_blank">ole.ersoy@gmail.com</a>
> &gt; 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>&nbsp;</div>
> <div>Yeah baby!</div>
> <div><br>&nbsp;</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 &quot;Books&quot; while on vacation!</blockquote>
> <div>&nbsp;</div>
> <div>NP.</div>
> <div><br>&nbsp;</div>
> <div>SNIP ...</div>
> <div>&nbsp;</div>
> <div><br>&nbsp;</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>&nbsp;</div>
> <div>Ahh that&#39;s way easy now.&nbsp; You&#39;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>&nbsp;</div>
> <div>Anyways there&#39;s a special schema partition:  
> ou=schema.&nbsp; Under that context are a bunch of schema names  
> like ..</div>
> <div>&nbsp;</div>
> <div>cn=nis</div>
> <div>cn=inetorgperson</div>
> <div>cn=blah blah blan</div>
> <div>&nbsp;</div>
> <div>Under these are container ou&#39;s that each store various  
> schema entities for that schema such as attributeTypes, syntaxes,  
> objectClasses etc.&nbsp; I just realized that if you read that  
> document on the schema subsystem redesign you can save me some  
> typing brotha man :).
> </div>
> <div>&nbsp;</div>
> <div>So basically you can create your own schema object for the  
> namespace.&nbsp; Then under that schema object create teh  
> containers.&nbsp; Then create the objects according to that  
> redesign document.</div>
> <div>&nbsp;</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.&nbsp; It&#39;s pretty simple stuff.&nbsp; If you create  
> something that is not allowed or incorrect the server will let you  
> know.
> </div>
> <div><br>&nbsp;</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>&nbsp;</div>
> <div>Yeah this is the doco to read.</div>
> <div><br>&nbsp;</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>&nbsp;</div>
> <div>yep.</div>
> <div><br>&nbsp;</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>&nbsp;</div>
> <div>Easy just use JNDI to create objects.&nbsp; Take a look at the  
> test classes we have in the repository for testing the new dynamic  
> schema capabilities.&nbsp; It&#39;s got JNDI code for doing this  
> that you can adapt to your needs.&nbsp; Here&#39;s a link to one:
> </div>
> <div>&nbsp;</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>&nbsp;</div>
> <div>Take a look at the&nbsp;testAddObjectClass() method.&nbsp;  
> That should have the logic in there that you</div>
> <div>need to create a new objectClass in a schema in the  
> server.&nbsp;<br>&nbsp;</div>
> <div>SNIP ...</div>
> <div><br>HTH,</div>
> <div>Alex<br><br>Alex Karasulu wrote:<br>&gt; Hi  
> Ole,<br>&gt;<br>&gt; On 3/28/07, *Ole Ersoy* &lt;<a onclick="return
 
> top.js.OpenExtLink(window,event,this)"  
> href="mailto:ole.ersoy@gmail.com" target="_blank">ole.ersoy@gmail.com
> </a><br>&gt; &lt;mailto:<a onclick="return top.js.OpenExtLink

> (window,event,this)" href="mailto:ole.ersoy@gmail.com"  
> target="_blank"> ole.ersoy@gmail.com</a>&gt;&gt;  
> wrote:<br>&gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; Hey
 
> Alex,<br>&gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; Yes
- I think  
> we&#39;re getting warmer!
> <br>&gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; Here&#39;s
the  
> thing.&nbsp;&nbsp;Suppose I want to store an object that  
> has<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; String members  
> <br>&gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;  
> shoeSize<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;  
> weight<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;  
> height<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;  
> name<br>&gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; etc.
> <br>&gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; I probably
have name on  
> some ObjectClass already defined in  
> ApacheDS.<br>&gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;
However I still  
> want to duplicate name on a completely different  
> <br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; ObjectClass.<br>&gt;<br>&gt;<br>
> &gt; No problem.&nbsp;&nbsp;Really it does not matter; you can  
> create a new xyzName<br>&gt; attribute.&nbsp;&nbsp;Sometimes  
> that&#39;s not so bad.&nbsp;&nbsp;Now I see that you want  
> to<br>&gt; autogenerate a schema from the Class <br>&gt; metadata
 
> and creating the attributes for your objectClass with
> <br>&gt; namespace qualification might<br>&gt; be a good  
> idea.<br>&gt;<br>&gt;<br>&gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;
The  
> ObjectClass I want has a 1:1 correspondence with the Java Class I  
> <br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; want to  
> store.<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; That way a simple convention
 
> can be used to store the object, and no
> <br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; configuration  
> file<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; or index searching is
needed  
> to include a preexisting ObjectClass that  
> <br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; has the name attribute on
 
> it.<br>&gt;<br>&gt;<br>&gt; Yep I agree (now that I understand
your  
> motives more) just create all
> <br>&gt; the LDAP<br>&gt; metadata you need on the fly to establish
 
> the mapping.<br>&gt;  
> <br>&gt;<br>&gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;
I guess I could  
> create an index with all the LDAP attributeTypes  
> and<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; look to see whether a certain
 
> attribute
> <br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; already exists, and use it,
but I  
> think it&#39;s simpler just to create a  
> <br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; brand new  
> ObjectClass.<br>&gt;<br>&gt;<br>&gt; Nah don&#39;t
 
> bother.<br>&gt;<br>&gt;<br>&gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;
 
> Which leads me to another question.
> <br>&gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; Can ObjectClass
names have  
> periods or underscores in them  
> <br>&gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; For Instance
there&#39;s  
> inetOrgPerson?<br>&gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;
Could it  
> be<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; inet.org.person? 
> <br>&gt;<br>&gt;<br>&gt; I think so.
> <br>&gt;<br>&gt;<br>&gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;
The reason  
> I ask is because I want to create ObjectClasses on the fly  
> <br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; that are  
> namespaced.<br>&gt;<br>&gt;<br>&gt; Gotchya.<br>&gt;<br>&gt;
 
> SNIP ...<br>&gt;<br>&gt; Hope fishing was a  
> blast.&nbsp;&nbsp;I&#39;m sure you&#39;re really glad to out of the
> <br>&gt; Sun, blue clear water,<br>&gt; and cool breeze environment
 
> and&nbsp;&nbsp;be back in front of a monitor. <br>&gt;<br>&gt;
Hey  
> I still have a few more days to go :).&nbsp;&nbsp;It&#39;s not over  
> yet.<br>&gt;<br>&gt; Regards,<br>&gt; Alex
> <br>&gt;<br>&gt; Alex Karasulu wrote:<br>&gt; &gt;
Hi Ole,<br>&gt;  
> &gt;<br>&gt; &gt; Looks like you got some good advice  
> already.&nbsp;&nbsp;Let me just add one more <br>&gt; &gt;  
> suggestion<br>&gt; &gt; while you&#39;re looking into creating a  
> schema.&nbsp;&nbsp;Sometimes you&#39;ll find
> <br>&gt; &gt; that the<br>&gt; &gt; attributeTypes and  
> objectClasses you&#39;re looking for are already<br>&gt; &gt;  
> defined in published <br>&gt; &gt; schemas.<br>&gt; &gt;<br>&gt;
 
> &gt; For example for users you might want to take a look at  
> something like
> <br>&gt; &gt; inetOrgPerson etc.<br>&gt; &gt;<br>&gt;
&gt; Second I  
> suppose you&#39;re thinking of staying bleeding edge by using  
> 1.5<br>&gt; &gt; rather than using<br>&gt; &gt;  
> 1.0.&nbsp;&nbsp;I&#39;d recommend this.&nbsp;&nbsp;And if so then
 
> merely adding the schema
> <br>&gt; &gt; description entry for<br>&gt; &gt; the objectClass
in  
> the ou=schema partition in the appropriate place <br>&gt; &gt;  
> should work.&nbsp;&nbsp;The schema<br>&gt; &gt; is dynamic in 1.5
 
> but I guess Emmanuel and Stephan already pointed
> <br>&gt; &gt; this out.<br>&gt; &gt;<br>&gt; &gt;
I will try to  
> back read this thread.&nbsp;&nbsp;As you can imagine I have a lot  
> <br>&gt; &gt; to catch up on since<br>&gt; &gt; I&#39;ve
been on  
> vacation fishing all week :D.&nbsp;&nbsp;Yeah I don&#39;t miss LDAP
> <br>&gt; he he.<br>&gt; &gt;<br>&gt; &gt; Regards,<br>&gt;
&gt;  
> Alex<br>&gt; &gt;<br>&gt; &gt; On 3/28/07, *Ole Ersoy* &lt;
<a  
> onclick="return top.js.OpenExtLink(window,event,this)"  
> href="mailto:ole.ersoy@gmail.com" target="_blank">
> ole.ersoy@gmail.com</a><br>&gt; &lt;mailto:<a onclick="return
 
> top.js.OpenExtLink(window,event,this)"  
> href="mailto:ole.ersoy@gmail.com"  
> target="_blank">ole.ersoy@gmail.com</a>&gt;<br>&gt; &gt; 

> &lt;mailto:<a onclick="return top.js.OpenExtLink 
> (window,event,this)" href="mailto:ole.ersoy@gmail.com"  
> target="_blank">
> ole.ersoy@gmail.com </a>&lt;mailto:<a onclick="return  
> top.js.OpenExtLink(window,event,this)"  
> href="mailto:ole.ersoy@gmail.com"  
> target="_blank">ole.ersoy@gmail.com</a>&gt;&gt;&gt; wrote:<br>&gt;
 
> &gt;<br>&gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp; Hey Guys,
> <br>&gt; &gt;<br>&gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp;
I&#39;m in the  
> middle of designing the DAS and<br>&gt;  
> &gt;&nbsp;&nbsp;&nbsp;&nbsp; decided that I can probably make it
 
> way more efficient <br>&gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp;
if I  
> create an ObjectClass per Java Class that I want to write to
> <br>&gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp; ADS.<br>&gt;
&gt;<br>&gt;  
> &gt;&nbsp;&nbsp;&nbsp;&nbsp; So how do I programmatically create
a  
> ObjectClass and store it<br>&gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp;
in  
> ApacheDS? <br>&gt; &gt;<br>&gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp;
Do we  
> have a description somewhere or is this a standard JNDI thing?
> <br>&gt; &gt;<br>&gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp;
Here&#39;s a  
> little further elaboration on what I want to do for those<br>&gt;  
> &gt;&nbsp;&nbsp;&nbsp;&nbsp; interested. <br>&gt; &gt;<br>&gt;
 
> &gt;&nbsp;&nbsp;&nbsp;&nbsp; Keep in mind this is just an  
> example.&nbsp;&nbsp;The Class User could be any
> <br>&gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp; java<br>&gt;
 
> &gt;&nbsp;&nbsp;&nbsp;&nbsp; class used in a model.<br>&gt;
 
> &gt;<br>&gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp; I have a
Java Class  
> &gt;&gt; User <br>&gt; &gt;<br>&gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp;
 
> The Class User has String members [firstName, lastName, password]
> <br>&gt; &gt;<br>&gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp;
So I want to  
> create a Structural ObjectClass in ApacheDS so that<br>&gt;  
> &gt;&nbsp;&nbsp;&nbsp;&nbsp; I can add it as an attribute to the
DN  
> where a User instance will be <br>&gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp;
 
> stored (The java object instance).
> <br>&gt; &gt;<br>&gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp;
If I were doing  
> this in a relational database, I would create a<br>&gt;  
> table<br>&gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp; definition instead
of a  
> ObjectClass.<br>&gt; &gt; <br>&gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp;
So  
> I&#39;m looking for something like this:
> <br>&gt; &gt;<br>&gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp;
ObjectClass  
> objectClass = LDAPSchemaFactory.createObjectClass();<br>&gt;  
> &gt;&nbsp;&nbsp;&nbsp;&nbsp; objectClass.setName  
> (&quot;User&quot;);<br>&gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp;
 
> ObjectClassAttribute objectClassAttribute = <br>&gt;  
> &gt;&nbsp;&nbsp;&nbsp;&nbsp;
> LDAPSchemaFactory.createObjectClassAttribute();<br>&gt;  
> &gt;&nbsp;&nbsp;&nbsp;&nbsp; objectClassAttribute.setName 
> (&quot;firstName&quot;);<br>&gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp;
 
> objectClassAttribute.setType (LDAP_STRING_ATTRIBUTE_TYPE);<br>&gt;  
> &gt; <br>&gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp; Then I would
do  
> something like:
> <br>&gt; &gt;<br>&gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp;
 
> ctx.storeObjectClass(objectClass);<br>&gt; &gt;<br>&gt;  
> &gt;&nbsp;&nbsp;&nbsp;&nbsp; The objectClass can now be assigned
as  
> an attribute to an ADS<br>&gt; entry, <br>&gt;  
> &gt;&nbsp;&nbsp;&nbsp;&nbsp; and if we were to look at all the  
> ObjectClasses in ADS through
> <br>&gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp; JXPlorer<br>&gt;
 
> &gt;&nbsp;&nbsp;&nbsp;&nbsp; or LDAP Studio,<br>&gt;  
> &gt;&nbsp;&nbsp;&nbsp;&nbsp; we would see the User ObjectClass in
 
> the list.<br>&gt; &gt;<br>&gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp;
Does  
> that make sense? <br>&gt; &gt;<br>&gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp;
 
> Thanks,<br>&gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp; - Ole
> <br>&gt; &gt;<br>&gt; &gt;<br>&gt; &gt;<br>&gt;
&gt;<br>&gt;  
> &gt;<br>&gt; &gt;<br>&gt;<br>&gt;<br>&gt;<br><br>&nbsp;</div><br>
>
> ------=_Part_19730_26330448.1175146376809--
>


Mime
View raw message