Versions Compared

Key

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

Prerequisites

  1. Procure user accounts to Rice databasesA database account with access to the Rice database
  2. An LDAP Service Account to be used by your application
  3. Procure the UC Davis-specific rice-api and rice-impl JARs and all transitive dependencies using either of the following methods:
    • Download ucd-rice-standalone-server-impl WAR from Artifactory . This WAR contains all dependencies.
    • Maven users: Add ucd-rice-impl as a dependency in your project.
      Code Block
      borderStylesolid
      titlepom.xml
      <repositories>
          <repository>
              <id>ietmavenrepositori</id>
              <name>IET Maven Repository</name>
      	<url>https://psl-95.ucdavis.edu/repo</url>
          </repository>  
      </repositories>
      
      <properties>
          <ucd-rice-impl.version>[some UCD Rice Implementation version]</ucd-rice-impl.version>
      </properties>
      
      <dependencies>
          <dependency>
              <groupId>edu.ucdavis.kuali.rice</groupId>
              <artifactId>ucd-rice-impl</artifactId>
              <version>${ucd-rice-impl.version}</version>               
          </dependency>	
      </dependencies>
      

...

Info
titleDefault Rice Configuration
  • By default Rice looks for rice-config.xml in /usr/local/rice at launch time. This allows us substitute different values for different properties in different environments (e.g. TEST vs. PROD).
  • See a full-blown set of sample properties .

Core Data Source Configuration

Kuali Rice uses Java Open Transaction Manager, so we declare the appropriate beans.

...

  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>
    

UC Davis KIM Data Source Configuration

UCD KIM Identity Service requires three data sources:

  1. A data source for the ou=People schema in LDAP defined by a bean named ldapPersonContextSource
    Code Block
    borderStylesolid
    titleclasspath:edu/ucdavis/myapp/config/application-data.xml
    
    <bean id="ldapPersonContextSource" class="org.springframework.ldap.core.support.LdapContextSource">
        <property name="url" value="${ldap.url}" />
        <property name="base" value="${ldap.base}" />
        <property name="pooled" value="${ldap.pooled}" />
        <property name="userDn" value="${ldap.user}" />
        <property name="password" value="${ldap.password}" />
    </bean>
    
  2. A data source for the ou=Listings schema in LDAP defined by a bean named ldapListingsContextSource
    Code Block
    borderStylesolid
    titleclasspath:edu/ucdavis/myapp/config/application-data.xml
    
    <bean id="ldapListingsContextSource" class="org.springframework.ldap.core.support.LdapContextSource">
        <property name="url" value="${ldap.url}" />
        <property name="base" value="${ldap.listings.base}" />
        <property name="pooled" value="${ldap.pooled}" />
        <property name="userDn" value="${ldap.user}" />
        <property name="password" value="${ldap.password}" />
    </bean>
    
  3. A data source for the PEOPLE_DISPLAY_NAME view in the ORG schema in Mothra defined by a bean named whitePagesDataSource
    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>
    

Rice Bean Configuration

...