directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kiran Ayyagari <ayyagariki...@gmail.com>
Subject Re: Partition configurations [was Re: [CONF] Apache Directory SandBox: Draft - ... ]
Date Sat, 15 Nov 2008 20:17:37 GMT
hi Felix,

    I have a question(am not a spring expert) if the partition bean gets loaded
    dynamically then where can we change its configuration e.x adding a new
    index to the partition.

    P.S :- I liked the way Stefan configured the partition for this HOW-TO,
           IMO using XBean will add more complexity and confusion for
           configuring the partition than implementing it :).

Kiran Ayyagari

Felix Knecht wrote:
> 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]
> 
> [1] http://static.springframework.org/spring/docs/2.5.x/api/org/springframework/beans/factory/ListableBeanFactory.html
> [2] http://forum.springframework.org/showthread.php?t=48066
> 
> 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.
> 
> WDOT?
> 
> Regards
> Felix
> 
> 
> confluence@apache.org schrieb:
>> Page Edited : DIRxSBOX
>> <http://cwiki.apache.org/confluence/display/DIRxSBOX> : Draft - How to
>> write a simple custom partition for ApacheDS
>> <http://cwiki.apache.org/confluence/display/DIRxSBOX/Draft+-+How+to+write+a+simple+custom+partition+for+ApacheDS>
> 
> <snip/>
>>         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="http://xbean.apache.org/schemas/spring/1.0" 
>> 			  xmlns:s="http://www.springframework.org/schema/beans"
>> 			  xmlns="http://apacheds.org/config/1.0">
>>
>>   ...
>>    <defaultDirectoryService ...>
>>      ...
>>      <partitions>
>>      ...
>>       <s:bean 
>>           id="helloPartition" 
>>           class="org.apache.directory.samples.partition.hello.HelloWorldPartition">
>>         <s:property name="suffix" value="ou=helloWorld" />
>>       </s:bean>
>>     </partitions>
>>    ...
>>   </defaultDirectoryService>
>> ...
>>
> 
> 

Mime
View raw message