directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Felix Knecht <>
Subject Partition configurations [was Re: [CONF] Apache Directory SandBox: Draft - ... ]
Date Sat, 15 Nov 2008 19:50:24 GMT
Hi all

Following the ML I recently saw multiple questions about writing a custom partition so there
seems to be an interest in
this topic.

Now I'm just following Stefans (big thanks about this howto!) and hit on the needs to change
the server.xml when adding
a custom partition.

I'd like to raise a discussion about this.
Is it really needed to do this?!
Isn't a new partition just a module to plug into an existing server? Wouldn't it be nice just
to drop in the jar
containing the custom partition and restart the server?
No need to change any configurations?

Why not let spring detecting all the existing partition modules for us?

It could be nicely done as all partitions implements the same interface. So get all beans
implementing this interaface
and load them as partition. This way any partition module (=jar) contains its own definition.
Adding the jar to the ds
servers lib directory and restarting the server we be enough to get a new partition.

See also springs ListableBeanFactory [1] or [2]


Switching to such a module plug in way for partitions would it also make easy to create a
maven archetype for creating a
custom partition.


Felix schrieb:
> Page Edited : DIRxSBOX
> <> : Draft - How to
> write a simple custom partition for ApacheDS
> <>

>         Adding it to a server.xml file
> In order to use the partition in a standard installation of ApacheDS, we
> simply add it to the /server.xml/ configuration. We have not used
> annotations (xbean) to ease XML editing, so we have to provide a
> "native" Spring bean.
> *server.xml*
> <spring:beans xmlns:spring="" 
> 			  xmlns:s=""
> 			  xmlns="">
>   ...
>    <defaultDirectoryService ...>
>      ...
>      <partitions>
>      ...
>       <s:bean 
>           id="helloPartition" 
>           class="">
>         <s:property name="suffix" value="ou=helloWorld" />
>       </s:bean>
>     </partitions>
>    ...
>   </defaultDirectoryService>
> ...

View raw message