...
Implementing the class
Using the partition
Embedded mode
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 Provide a "native" Spring bean like this.
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
<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>
...
|
Note that the class HelloWorldPartition has to be in the class path of the server. Withgout, starting the server leads to a ClassNotFoundException. You can copy the jar file which results from the build to the lib directory and adjust the command line parameters in the apacheds.sh script.