One brave soul as ordered ;-)
I wish I'd seen this thread sooner, since I've been using Person
Directory 1.5(RC5) in combination with CAS 3.3.3 for almost 2 months now.
This JDBC DAO does the trick for me, I'm not sure how different it is
compared to the old one.
> <bean id="attributeRepository"
> class="org.jasig.services.persondir.support.jdbc.SingleRowJdbcPersonAttributeDao">
> <constructor-arg index="0" ref="dataSource" />
> <constructor-arg index="1" value="SELECT * FROM my_table WHERE
> {0}" />
> <property name="queryAttributeMapping">
> <map>
> <entry key="username" value="my_table_column" />
> </map>
> </property>
> <property name="resultAttributeMapping">
> <map>
> <entry key="jdbcAttribute" value="applicationAttribute" />
> </map>
> </property>
> </bean>
Just to be clear: the-value attribute of each entry in the
queryAttributeMap should be "something" in your table and/or query. Not
the other way round.
The information on the wiki
(http://www.ja-sig.org/wiki/display/PDM15/Person+Directory+1.5+Manual)
helped a lot when I tried to figure out how to get the new version
working. (Some of the things I was trying to do weren't possible in the
older version, so I had to figure out the new one)
Regards,
Hans
Marvin Addison schreef:
>> I am not sure if it is the "right" configuration, but it seems to work...
>>
>> <bean id="attributeRepository"
>>
>> class="org.jasig.services.persondir.support.ldap.LdapPersonAttributeDao">
>> <property name="baseDN" value="ou=people,dc=X,dc=Y" />
>> <property name="contextSource" ref="contextSource"/>
>> <property name="queryTemplate" value="{0}"/>
>>
>> <property name="queryAttributeMapping">
>> <map>
>> <entry key="username" value="uid"/>
>> </map>
>> </property>
>>
>> <property name="resultAttributeMapping">
>> <map>
>> <entry key="ldapAttribute"
>> value="applicationAttribute"/>
>> </map>
>> </property>
>> </bean>
>>
>> Hope it helps
>>
>
> Actually, that helped signficantly. Stepping through a unit test was
> leading me to realize that "username" is the default key in the query
> part. In any case I got it working and I'll update the Attributes
> page with this info. Hopefully a brave soul can figure out how the
> JDBC DAO has changed and provide an example of it as well.
>
> M
>
>
--
You are currently subscribed to [email protected] as:
[email protected]
To unsubscribe, change settings or access archives, see
http://www.ja-sig.org/wiki/display/JSG/cas-user