Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. A transactional data source where the local client application's Rice tables are located. This is required by JOTM.
    Code Block
    borderStylesolid
    titleclasspath:edu/ucdavis/myapp/config/application-data.xml
    <bean id="dataSource" class="org.kuali.rice.core.database.XAPoolDataSource">
        <property name="transactionManager" ref="jotm" />
        <property name="driverClassName" value="${datasource.driver.name}" />
        <property name="url" value="${datasource.url}" />
        <property name="maxSize" value="${datasource.pool.size}" />
        <property name="minSize" value="${datasource.initialSize}" />
        <property name="maxWait" value="${datasource.pool.maxWait}" />
        <property name="validationQuery" value="${datasource.pool.validationQuery}" />
        <property name="username" value="${datasource.username}" />
        <property name="password" value="${datasource.password}" />
    </bean>
    
  2. A non-transactional data source pointing to those same Rice tables. This is required by Quartz.
    Code Block
    borderStylesolid
    titleclasspath:edu/ucdavis/myapp/config/application-data.xml
    <bean id="nonTransactionalDataSource" class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close">
        <property name="driverClassName" value="${datasource.driver.name}" />
        <property name="url" value="${datasource.url}" />
        <property name="maxActive" value="${datasource.pool.maxActive}" />
        <property name="minIdle" value="${datasource.minIdle}" />
        <property name="initialSize" value="${datasource.initialSize}" />
        <property name="validationQuery" value="${datasource.pool.validationQuery}" />
        <property name="username" value="${datasource.username}" />
        <property name="password" value="${datasource.password}" />
        <property name="accessToUnderlyingConnectionAllowed" value="${datasource.accessToUnderlyingConnectionAllowed}" />
    </bean>
    
  3. A transactional data source pointing to the database of the Rice Standalone Server.
    Code Block
    borderStylesolid
    titleclasspath:edu/ucdavis/myapp/config/application-data.xml
    <bean id="standaloneDataSource" class="org.kuali.rice.core.database.XAPoolDataSource">
        <property name="transactionManager" ref="jotm" />
        <property name="driverClassName" value="${standalone.datasource.driver.name}" />
        <property name="url" value="${standalone.datasource.url}" />
        <property name="maxSize" value="${standalone.datasource.pool.size}" />
        <property name="minSize" value="${standalone.datasource.initialSize}" />
        <property name="maxWait" value="${standalone.datasource.pool.maxWait}" />
        <property name="validationQuery" value="${standalone.datasource.pool.validationQuery}" />
        <property name="username" value="${standalone.datasource.username}" />
        <property name="password" value="${standalone.datasource.password}" />
    
    </bean>
    

KIM Service Configuration

UCD has implemented a custom KIM Identity Service which fetches Entity and Principal information from UCD LDAP.

Data Source Configuration

KIM Identity Service requires a data source for the UCD LDAP server defined by a bean named ldapContextSource

...

Code Block
borderStylesolid
titleclasspath:edu/ucdavis/myapp/config/application-data.xml
<bean id="whitePagesDataSource" destroy-method="close" class="org.apache.commons.dbcp.BasicDataSource">
    <property name="driverClassName" value="${datasource.driver.name}"/>
    <property name="url" value="${datasource.url}"/>
    <property name="username" value="${datasource.username}"/>
    <property name="password" value="${datasource.password}"/>
</bean>

...

Spring Bean Configuration

UCD has implemented a custom KIM Identity Service. Declare the service using either of the following methods:

...

UCD has implemented a custom Encryption Service . Declare the service using either of the following methods:

...

that overrides the default demonstration encryption service.

Property Configuration

The encryption service requires an encryption.key property be set.

Code Block
borderStylesolid
title/usr/local/rice-config.xml

    <property name="encryption.key" value="[some generated encryption key]"/>

Spring Bean Configuration

Declare the service using either of the following methods:

  1. Inject it into the rice bean using the additionalSpringFiles property
    Code Block
    borderStylesolid
    titleclasspath:edu/ucdavis/myapp/config/rice-common.xml
    <bean id="rice" class="org.kuali.rice.core.config.RiceConfigurer">
        <property name="additionalSpringFiles">
            <list>
                <value>classpath:edu/ucdavis/kuali/rice/kew/config/ucd-kew-service.xml</value>
            </list>
        </property>
    </bean>
    
  2. If you're using Spring's ContextLoaderListener, declare it in web.xml
    Code Block
    borderStylesolid
    titlesrc/main/webapp/WEB-INF/web.xml
    <listener>
        <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
    </listener>
    
    <context-param>
        <param-name>contextConfigLocation</param-name>
        <param-value>
            classpath:edu/ucdavis/kuali/rice/kew/config/ucd-kew-service.xml
        </param-value>
    </context-param>
    

...

Finally, we declare the rice bean and inject all of the data source beans into it along with any /wiki/spaces/UCDK/pages/119111884required additional Spring files.

Code Block
borderStylesolid
titleclasspath:edu/ucdavis/myapp/config/rice-common.xml
<bean id="rice" class="org.kuali.rice.core.config.RiceConfigurer">
    <property name="dataSource" ref="dataSource" />
    <property name="nonTransactionalDataSource" ref="nonTransactionalDataSource"/>
    <property name="serverDataSource" ref="standaloneDataSource"/>
    <property name="transactionManager" ref="jotm" />
    <property name="userTransaction" ref="jotm" />
    <property name="serviceNamespace" value="${service.namespace}" />
    <property name="environment" value="${environment}" />
    <property name="rootConfig" ref="config" />
    <property name="ksbConfigurer">
        <bean class="org.kuali.rice.ksb.messaging.config.KSBConfigurer">
            <property name="serviceServletUrl" value="${serviceServletUrl}" />
        </bean>
    </property>
    <property name="kewConfigurer">
        <bean class="org.kuali.rice.kew.config.KEWConfigurer">
            <property name="clientProtocol" value="local" />
        </bean>
    </property>
    <property name="knsConfigurer">
        <bean class="org.kuali.rice.kns.config.KNSConfigurer"/>
    </property>
    <property name="kimConfigurer">
        <bean class="org.kuali.rice.kim.config.KIMConfigurer"/>
    </property>
    <property name="kcbConfigurer">
        <bean class="org.kuali.rice.kcb.config.KCBConfigurer"/>
    </property>
    <property name="additionalSpringFiles">
        <value>${rice.additionalSpringFiles}</value>
    </property>
</bean>