You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@directory.apache.org by "Noel J. Bergman" <no...@devtech.com> on 2005/04/26 16:30:17 UTC

GUI technologies

> >      Re Swing/SWT - I'm not very thrilled with
> >         Swing, and if I had my time again I'd
> >         probably write it in SWT, but I don't
> >         know too much about it :-).

> Would this possibly be a good oppourtunity? :-)

The drawbacks of SWT to normal users are pretty significant.  They need to
download a specific package built for their platform, there needs to be an
SWT port for that platform, etc.  See
http://www.google.com/search?hl=en&q=swt+wora for a lots of commentary on
both sides of the SWT vs WORA debate.

Also, have you seen http://community.java.net/javadesktop/?  All sorts of
good things there, both documentation and code, e.g.,

   https://looks.dev.java.net/
   https://jgoodies.dev.java.net/

Just food for discussion.

	--- Noel

	--- Noel


Re: I think I've misunderstood Partitions...

Posted by Chris Betts <ch...@pegacat.com>.
Well that was a lot easier than I thought it would be :-).

I created a generic 'jndi provider' partition, and set up one to use 
Sun's jndi provider, and another to use the DSML jndi provider from 
JXplorer, and to my vast surprise they work, and I can run multiples of 
them at the same time to different directories using different 
protocols!

There's some niggles I have about name handling, but in the meantime 
it's all going very well indeed... very happy :-).

    - Chris

  
   


Re: I think I've misunderstood Partitions...

Posted by Alex Karasulu <ao...@bellsouth.net>.
Endi Sukma Dewata wrote:

>Hi Alex,
>
>I'm sorry this is taking so long. I was going to write the xdocs, but I
>wanted to clean up the Partition API first before making it official. But
>then I got bogged down by other projects so it's never finished. I'll try to
>do it as soon as possible.
>
>Or do you want me to just copy & paste the existing Wiki docs? I can
>re-submit the updated one later.
>  
>
Sorry Endi you sound really busy.  If you can create a patch for the 
partitions.xml xdoc file making sure its up to date with your wiki and 
the code that would be great.  If not no biggy I understand.  I can get 
to it as well.

Thanks again,
Alex



RE: I think I've misunderstood Partitions...

Posted by Endi Sukma Dewata <en...@vergenet.com>.
Hi Alex,

I'm sorry this is taking so long. I was going to write the xdocs, but I
wanted to clean up the Partition API first before making it official. But
then I got bogged down by other projects so it's never finished. I'll try to
do it as soon as possible.

Or do you want me to just copy & paste the existing Wiki docs? I can
re-submit the updated one later.

Endi


-----Original Message-----
From: Alex Karasulu [mailto:aok123@bellsouth.net] 
Sent: Wednesday, April 27, 2005 3:39 PM
To: Apache Directory Developers List; Endi Dewata
Subject: Re: I think I've misunderstood Partitions...

Hiya Endi,

Sorry to bother you with this petty request but if you can cut and past 
sum of your wiki contribs into the partition xdocs I'll integrate this 
stuff into the 0.9 release asap. I think these guys missed some of the 
features that you incorporated with your docs just in the wiki. If you 
submit a patch I promise I will apply it right away.


BTW the sitedocs are bundled with the distro.


Thanks Endi,
Alex

Chris Betts wrote:

> Got it; thanks David and Daniel!
>
> I was looking at the Partitions summary on the web page: 
> http://directory.apache.org/subprojects/apacheds/users/partitions.html 
> - the wiki entry is more comprehensive.
>
> I'm well on my way now!
>
> cheers,
>
> Chris
>
> On 27/04/2005, at 1:05 PM, Danilo Luiz Rheinheimer wrote:
>
>> Chris Betts wrote:
>>
>>> Cool!
>>>
>>> One little question though... how does the Nexus actually create the 
>>> ContextPartition objects? In Danilo's example earlier, he has a 
>>> configurable name for his class, so that presumably he can have 
>>> different ContextPartition objects with different names using the 
>>> same Class - seems fair enough, and I want something similar.
>>>
>>> But who creates these objects? Presumably they must be created so 
>>> the root nexus can interrogate them about their suffixes? How do I 
>>> create my ContextPartitions and feed them to ApacheDS?
>>>
>>
>> I think this can help you :
>>
>> http://wiki.apache.org/directory/ApacheDirectoryServer
>>
>> Danilo.
>>
>
>



Re: I think I've misunderstood Partitions...

Posted by Alex Karasulu <ao...@bellsouth.net>.
Hiya Endi,

Sorry to bother you with this petty request but if you can cut and past 
sum of your wiki contribs into the partition xdocs I'll integrate this 
stuff into the 0.9 release asap. I think these guys missed some of the 
features that you incorporated with your docs just in the wiki. If you 
submit a patch I promise I will apply it right away.


BTW the sitedocs are bundled with the distro.


Thanks Endi,
Alex

Chris Betts wrote:

> Got it; thanks David and Daniel!
>
> I was looking at the Partitions summary on the web page: 
> http://directory.apache.org/subprojects/apacheds/users/partitions.html 
> - the wiki entry is more comprehensive.
>
> I'm well on my way now!
>
> cheers,
>
> Chris
>
> On 27/04/2005, at 1:05 PM, Danilo Luiz Rheinheimer wrote:
>
>> Chris Betts wrote:
>>
>>> Cool!
>>>
>>> One little question though... how does the Nexus actually create the 
>>> ContextPartition objects? In Danilo's example earlier, he has a 
>>> configurable name for his class, so that presumably he can have 
>>> different ContextPartition objects with different names using the 
>>> same Class - seems fair enough, and I want something similar.
>>>
>>> But who creates these objects? Presumably they must be created so 
>>> the root nexus can interrogate them about their suffixes? How do I 
>>> create my ContextPartitions and feed them to ApacheDS?
>>>
>>
>> I think this can help you :
>>
>> http://wiki.apache.org/directory/ApacheDirectoryServer
>>
>> Danilo.
>>
>
>


Re: I think I've misunderstood Partitions...

Posted by Chris Betts <ch...@pegacat.com>.
Got it; thanks David and Daniel!

I was looking at the Partitions summary on the web page: 
http://directory.apache.org/subprojects/apacheds/users/partitions.html 
- the wiki entry is more comprehensive.

I'm well on my way now!

   cheers,

     Chris

On 27/04/2005, at 1:05 PM, Danilo Luiz Rheinheimer wrote:

> Chris Betts wrote:
>
>> Cool!
>>
>> One little question though... how does the Nexus actually create the 
>> ContextPartition objects?  In Danilo's example earlier, he has a 
>> configurable name for his class, so that presumably he can have 
>> different ContextPartition objects with different names using the 
>> same Class - seems fair enough, and I want something similar.
>>
>> But who creates these objects?  Presumably they must be created so 
>> the root nexus can interrogate them about their suffixes?  How do I 
>> create my ContextPartitions and feed them to ApacheDS?
>>
>
> I think this can help you :
>
> http://wiki.apache.org/directory/ApacheDirectoryServer
>
> Danilo.
>


Re: I think I've misunderstood Partitions...

Posted by Danilo Luiz Rheinheimer <da...@floripa.com.br>.
Chris Betts wrote:

> Cool!
>
> One little question though... how does the Nexus actually create the 
> ContextPartition objects?  In Danilo's example earlier, he has a 
> configurable name for his class, so that presumably he can have 
> different ContextPartition objects with different names using the same 
> Class - seems fair enough, and I want something similar.
>
> But who creates these objects?  Presumably they must be created so the 
> root nexus can interrogate them about their suffixes?  How do I create 
> my ContextPartitions and feed them to ApacheDS?
>

I think this can help you :

http://wiki.apache.org/directory/ApacheDirectoryServer

Danilo.


Re: I think I've misunderstood Partitions...

Posted by David Boreham <da...@bozemanpass.com>.
Chris Betts wrote:

> But who creates these objects?  Presumably they must be created so the 
> root nexus can interrogate them about their suffixes?  How do I create 
> my ContextPartitions and feed them to ApacheDS?

It uses:

server.db.partition.class.<YourPartitionName>=<YourClassName>



Re: I think I've misunderstood Partitions...

Posted by Chris Betts <ch...@pegacat.com>.
Cool!

One little question though... how does the Nexus actually create the 
ContextPartition objects?  In Danilo's example earlier, he has a 
configurable name for his class, so that presumably he can have 
different ContextPartition objects with different names using the same 
Class - seems fair enough, and I want something similar.

But who creates these objects?  Presumably they must be created so the 
root nexus can interrogate them about their suffixes?  How do I create 
my ContextPartitions and feed them to ApacheDS?

Or am I missing something?

    thanks again for helping!

   - Chris

On 27/04/2005, at 11:47 AM, David Boreham wrote:

> Chris Betts wrote:
>
>> Aha!
>>
>> So I extend ContextPartition and implement 'getSuffix()' to return, 
>> say, 'chris', and then set 'server.db.partitions=chris' and 
>> 'server.db.partitions.suffix.chris=o=chris', and I'm away?
>
> Yes. You may find some additional wrinkles, such as getting your 
> manufactured entries through
> Apache DS schema checking. You may need to add your own schema.
>
>


Re: I think I've misunderstood Partitions...

Posted by David Boreham <da...@bozemanpass.com>.
Chris Betts wrote:

> Aha!
>
> So I extend ContextPartition and implement 'getSuffix()' to return, 
> say, 'chris', and then set 'server.db.partitions=chris' and 
> 'server.db.partitions.suffix.chris=o=chris', and I'm away?

Yes. You may find some additional wrinkles, such as getting your 
manufactured entries through
Apache DS schema checking. You may need to add your own schema.



Re: I think I've misunderstood Partitions...

Posted by Alex Karasulu <ao...@bellsouth.net>.
Chris Betts wrote:

> Aha!
>
> So I extend ContextPartition and implement 'getSuffix()' to return, 
> say, 'chris', and then set 'server.db.partitions=chris' and 
> 'server.db.partitions.suffix.chris=o=chris', and I'm away?
>
BTW getSuffix should return o=chris. The 'chris' identifier is arbitrary 
just to associate multiple properties together here 
'server.db.partitions=chris'.

Alex


Re: I think I've misunderstood Partitions...

Posted by Danilo Luiz Rheinheimer <da...@floripa.com.br>.
Chris Betts wrote:

> Aha!
>
> So I extend ContextPartition and implement 'getSuffix()' to return, 
> say, 'chris', and then set 'server.db.partitions=chris' and 
> 'server.db.partitions.suffix.chris=o=chris', and I'm away?
>
Chris, I am not a Apache Directory guru. I am starting to learn about it 
like you.
So this is my first try :

package org.sigea.demo.ldap;

import java.util.Map;

import javax.naming.Name;
import javax.naming.NamingEnumeration;
import javax.naming.NamingException;
import javax.naming.directory.Attribute;
import javax.naming.directory.Attributes;
import javax.naming.directory.ModificationItem;
import javax.naming.directory.SearchControls;

import org.apache.ldap.common.filter.ExprNode;
import org.apache.ldap.common.message.LockableAttributesImpl;
import org.apache.ldap.common.util.SingletonEnumeration;
import org.apache.ldap.server.ContextPartition;
import org.apache.ldap.server.db.IndexRecord;
import org.apache.ldap.server.db.SearchResultEnumeration;

/**
 * @author danilo
 *
 */
public class MyPartition implements ContextPartition {
   
    private boolean isOpen;
    private Name suffix;
   
    public MyPartition(Name upSuffix, Name normalizedSuffix, String 
properties) throws Exception {
        suffix = (Name) normalizedSuffix.clone();
        isOpen = true;
    }

    public boolean isClosed() {
        return !isOpen;
    }

    public void close() throws NamingException {
        isOpen = false;
    }

    public NamingEnumeration search(Name ldapName, Map serverProperties, 
ExprNode presenceNodes, SearchControls searchControls) throws 
NamingException {
        System.out.println("search executed 
["+ldapName+","+serverProperties+""+presenceNodes+","+searchControls+"]");
        IndexRecord record = new IndexRecord();
        Attributes entry = new LockableAttributesImpl();    // this is 
not working right
        entry.put("objectClass","top");
        entry.put("objectClass","domain");
        entry.put("objectClass","extensibleObject");
        entry.put("dc","sigea");
        record.setAttributes(entry);
        SingletonEnumeration ne = new SingletonEnumeration(record);
        SearchResultEnumeration n = new SearchResultEnumeration(new 
String[] {}, ne, null);
        return n;
    }

    public Name getSuffix(boolean arg0) {
        return (Name) suffix.clone();
    }

  .. // all other methods still without implementation
}

  So if you set 'server.db.partitions.suffix.chris=o=chris' the value 
'o=chris' will be the normalizedSuffix parameter of

public MyPartition(Name upSuffix, Name normalizedSuffix, String 
properties) throws Exception

  You will save it to be returned on getSuffix().
  Well this is the way I understand it.
  I am doing a small test project to try this ideas. It is starting to 
work. I can browse some stuff using LdapBrowse.

  Danilo.




Re: I think I've misunderstood Partitions...

Posted by Chris Betts <ch...@pegacat.com>.
Aha!

So I extend ContextPartition and implement 'getSuffix()' to return, 
say, 'chris', and then set 'server.db.partitions=chris' and 
'server.db.partitions.suffix.chris=o=chris', and I'm away?

Cool - I hadn't twigged how the Nexus knew about my code; I'd been 
expecting to hand it a java class name and a partition name, but this 
is even easier.

    thank you!

     Chris

On 27/04/2005, at 11:07 AM, David Boreham wrote:

> Chris Betts wrote:
>
>>    it looks like I've made a blunder; I had thought partitions were 
>> 'pluggable' back end data stores.  However it seems that in fact 
>> they're just named areas of the default database implementation.
>
> Actually you're on the right track. You need to implement a class 
> derived from ContextPartition.
> Then add the appropriate properties to make the nexus map your suffix 
> to your partition.
> This avoids any dependency on the regular database backend.
>
>
>


Re: I think I've misunderstood Partitions...

Posted by David Boreham <da...@bozemanpass.com>.
Chris Betts wrote:

>    it looks like I've made a blunder; I had thought partitions were 
> 'pluggable' back end data stores.  However it seems that in fact 
> they're just named areas of the default database implementation.

Actually you're on the right track. You need to implement a class 
derived from ContextPartition.
Then add the appropriate properties to make the nexus map your suffix to 
your partition.
This avoids any dependency on the regular database backend.


 

Re: Server SSL config

Posted by Alex Karasulu <ao...@bellsouth.net>.
David there is a permanent partition that is always present attached off 
of the ou=system context.  This partition is called the system partition 
and it will store several things although it is pretty much empty at 
this point.

Alex

David Boreham wrote:

> Enrique Rodriguez wrote:
>
>> David Boreham wrote:
>>
>>> Is the current code in SVN supposed to allow LDAP over SSL to be
>>> used without source code modifications (e.g. with a 'real' 
>>> certificate) ?
>>
>>
>>
>> AFAIK, no work has been done for specific LDAP integration.
>>
>> The patches will be good, preferably via JIRA.
>
>
> Ok, we'll get on that.
>
>> We had talked about putting config in the DIT, so at some point 
>> someone will probably code that in.
>
>
> Hmm...config in DIT is great, but be sure to handle the case
> that there is no regular database backend (also circular
> dependencies where the backend needs config that it holds itself).
> It might be necessary to imlpement some cheezy flat file back end
> for the config entries.
>
>
>


Re: Server SSL config

Posted by David Boreham <da...@bozemanpass.com>.
Enrique Rodriguez wrote:

> David Boreham wrote:
>
>> Is the current code in SVN supposed to allow LDAP over SSL to be
>> used without source code modifications (e.g. with a 'real' 
>> certificate) ?
>
>
> AFAIK, no work has been done for specific LDAP integration.
>
> The patches will be good, preferably via JIRA.

Ok, we'll get on that.

> We had talked about putting config in the DIT, so at some point 
> someone will probably code that in.

Hmm...config in DIT is great, but be sure to handle the case
that there is no regular database backend (also circular
dependencies where the backend needs config that it holds itself).
It might be necessary to imlpement some cheezy flat file back end
for the config entries.



Re: Server SSL config

Posted by Enrique Rodriguez <er...@apache.org>.
David Boreham wrote:
> Is the current code in SVN supposed to allow LDAP over SSL to be
> used without source code modifications (e.g. with a 'real' certificate) ?

AFAIK, no work has been done for specific LDAP integration.

The patches will be good, preferably via JIRA.

We had talked about putting config in the DIT, so at some point someone 
will probably code that in.

-enrique

> 
> I ask because one of our engineers has implemented some
> code that allows property file configuration for things
> like the ssl port and whether ssl is enabled or not, and the
> keystore name and password. He found that server SSL
> really wasn't practially usable without these changes.
> 
> I was wondering if this duplicates anyone else's effort,
> or if we've missed something about configuring SSL.
> 
> If not , then I will ask him to submit the patches for review.
> 
> Thanks.
> 

Server SSL config

Posted by David Boreham <da...@bozemanpass.com>.
Is the current code in SVN supposed to allow LDAP over SSL to be
used without source code modifications (e.g. with a 'real' certificate) ?

I ask because one of our engineers has implemented some
code that allows property file configuration for things
like the ssl port and whether ssl is enabled or not, and the
keystore name and password. He found that server SSL
really wasn't practially usable without these changes.

I was wondering if this duplicates anyone else's effort,
or if we've missed something about configuring SSL.

If not , then I will ask him to submit the patches for review.

Thanks.



Re: I think I've misunderstood Partitions...

Posted by Alex Karasulu <ao...@bellsouth.net>.
Chris Betts wrote:

> Hi Folks,
>
>    it looks like I've made a blunder; I had thought partitions were 
> 'pluggable' back end data stores.  

No you are right!

> However it seems that in fact they're just named areas of the default 
> database implementation.

Well when you have an entry store it needs to be attached to the 
namespace at some point right?  Hence ContextPartition.

>    This is a bit of a pain, as what I want to do is hive off part of 
> the namespace and handle it myself using my own code.  I *could* just 
> write a jndi provider and use the SEDA front end, but then I'd have to 
> do the namespace partitioning myself, and I'd prefer the Root Nexus to 
> do that.  

Yeah totally the root nexus will do that for you.  Don't mess with 
writing a new JNDI provider and using SEDA in general.  FYI MINA is the 
new network protocol API we're using.  It's much better.

> So what's the best way forward?  Should I use the Interceptor framework?

See if you can implement a ContextPartition.

>    ... I'm still getting my head around all this :-)

Np :)

Alex

I think I've misunderstood Partitions...

Posted by Chris Betts <ch...@pegacat.com>.
Hi Folks,

    it looks like I've made a blunder; I had thought partitions were 
'pluggable' back end data stores.  However it seems that in fact 
they're just named areas of the default database implementation.

    This is a bit of a pain, as what I want to do is hive off part of 
the namespace and handle it myself using my own code.  I *could* just 
write a jndi provider and use the SEDA front end, but then I'd have to 
do the namespace partitioning myself, and I'd prefer the Root Nexus to 
do that.  So what's the best way forward?  Should I use the Interceptor 
framework?

    ... I'm still getting my head around all this :-)

    - Chris


Re: GUI technologies

Posted by Alex Karasulu <ao...@bellsouth.net>.
Noel J. Bergman wrote:

>>>     Re Swing/SWT - I'm not very thrilled with
>>>        Swing, and if I had my time again I'd
>>>        probably write it in SWT, but I don't
>>>        know too much about it :-).
>>>      
>>>
>
>  
>
>>Would this possibly be a good oppourtunity? :-)
>>    
>>
>
>The drawbacks of SWT to normal users are pretty significant.  They need to
>download a specific package built for their platform, there needs to be an
>SWT port for that platform, etc.  See
>http://www.google.com/search?hl=en&q=swt+wora for a lots of commentary on
>both sides of the SWT vs WORA debate.
>  
>
-1 for SWT in general. The performance benefit is really not there and 
the complexity it brings to the lifecycle is huge by introducing native 
code.

Let's stick to swing. I'd go native if we only had too like with a 
plugin to eclipse or with native code to do multicasting - something 
like that.

- Alex