<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Upcom.eu Blog &#187; LDAP</title>
	<atom:link href="http://blog.upcom.eu/category/ldap/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.upcom.eu</link>
	<description>Comments, remarks, information, solutions from the Upcom team</description>
	<lastBuildDate>Tue, 13 Sep 2011 17:56:33 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Multiple LDAP servers</title>
		<link>http://blog.upcom.eu/2009/01/12/multiple-ldap-servers/</link>
		<comments>http://blog.upcom.eu/2009/01/12/multiple-ldap-servers/#comments</comments>
		<pubDate>Mon, 12 Jan 2009 18:54:03 +0000</pubDate>
		<dc:creator>kflokos</dc:creator>
				<category><![CDATA[LDAP]]></category>
		<category><![CDATA[eDirectory]]></category>
		<category><![CDATA[multiple servers]]></category>
		<category><![CDATA[Novell]]></category>

		<guid isPermaLink="false">http://blog.upcom.eu/?p=14</guid>
		<description><![CDATA[I&#8217;ve been struggling to make spring ldap work with multiple LDAP servers (for fail over and load balancing reasons). Reading was working properly &#8211; even though it seems like the second server was never used! Even though strange, I thought &#8230; <a href="http://blog.upcom.eu/2009/01/12/multiple-ldap-servers/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been struggling to make spring ldap work with multiple LDAP servers (for fail over and load balancing reasons). Reading was working properly &#8211; even though it seems like the second server was never used! Even though strange, I thought it was only used when the first one was down &#8211; no load balancing.</p>
<p>The biggest problem was writing. Novell eDirectory complained with the error <em>error</em> result (50); <em>NDS error</em>: <em>no access</em> (-<em>672</em>); Insufficient <em>access. </em>Specifying just one server always worked, with the same admin user connected!</p>
<p>The problem drove me crazy, until I found out that the &#8220;urls&#8221; parameter of the org.springframework.ldap.core.support.LdapContextSource takes as parameters a String array and not a single String where the LDAP connection parameters are separated with space (another post on the Internet suggested that). The correct configuration is then something like the following:</p>
<p style="text-align: left;"><code><br />
&lt;bean id="contextSourceTarget" class="org.springframework.ldap.core.support.LdapContextSource"&gt;<br />
&lt;property name="urls" value="${ldap.url1}<strong>,</strong>${ldap.url2}" /&gt;<br />
&lt;property name="base" value="${ldap.base}" /&gt;<br />
&lt;property name="userDn" value="${ldap.userDn}" /&gt;<br />
&lt;property name="password" value="${ldap.password}" /&gt;<br />
&lt;property name="pooled" value="false"/&gt;<br />
&lt;property name="baseEnvironmentProperties"&gt;<br />
&lt;map&gt;<br />
&lt;entry key="com.sun.jndi.ldap.connect.timeout" value="${ldap.timeout}" /&gt;<br />
&lt;entry key="com.sun.jndi.ldap.read.timeout" value="${ldap.timeout}" /&gt;<br />
&lt;/map&gt;<br />
&lt;/property&gt;<br />
&lt;/bean&gt;<br />
</code></p>
<p>If, instead of comma(,) in the <strong>urls</strong> property you separate the entries with a space, updates (at least) do not work!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.upcom.eu/2009/01/12/multiple-ldap-servers/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

