Attribute-Resolver --- Database

Cantor, Scott cantor.2 at osu.edu
Tue Jan 3 19:57:20 EST 2017


On 1/3/17, 7:51 PM, "users on behalf of Y Levine" <users-bounces at shibboleth.net on behalf of ylevine20 at gmail.com> wrote:

> Would anyone have examples of attribute-resolver leveraging database -- and sample db pool settings?

I use what's probably an ancient DBCP library. Pooling is hard and it works and I didn't want to break it, so I doubt my settings matter, particularly since my database is local, but they're here:

    <bean id="osu.LocalCache" class="org.apache.commons.dbcp.BasicDataSource"
        p:driverClassName="org.mariadb.jdbc.Driver"
        p:url="jdbc:mysql://localhost:3306/shibboleth"
        p:username="root"
        p:password="%{idp.mariadb.password}"
        p:maxActive="10"
        p:maxIdle="5"
        p:maxWait="3000"
        p:testOnBorrow="true"
        p:validationQuery="select 1"
        p:validationQueryTimeout="5" />

Put that in global.xml, use BeanManagedConnection, done. Or load it in a file as an additional resolver resource in services.xml

-- Scott




More information about the users mailing list