Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 5.3

...

  1. A database account with access to the Rice database
  2. Procure the UC Davis-specific JARs for the modules you will be embedding along with any of their associated dependencies using either of the following methods:
    • Download ucd-rice-standalone-server-impl WAR from Artifactory , selecting the most recent version. This WAR contains all dependencies.
    • Download JARs for the specific module from this location in the Artifactory , selecting the most recent version.
  3. A certificate for the machines hosting the client application that will be connecting to the Rice Standalone Server.
    • Development Environments
      • For the development environments, you may generate a self signed certificate for the client machine and add to the attached rice-test.keystore using the following command:
        Code Block
        
        keytool -keystore rice-test.keystore -storepass nowUCme_nowUdont -v -alias <your alias> -genkeypair -validity 9999 -dname "CN=<your fully qualified machine name>, OU=<your organization>, O=UC Davis, L=Davis, ST=California, C=US"
        
      • Install the updated rice-test.keystore in your environment where it will be referenced in the rice configuration files.
      • A copy of the updated rice-test.keystore must also be installed on the Rice Standalone Server, and all Rice clients it the environment (KFS, KC).
      • An additional cert is required for client applications connecting to the rice-sandboxes environment. The rice-sandboxes.ucdavis.edu machine does not currently have an InCommon cert, therefore a certificate from rice-sandboxes.ucdavis.edu (rice-sandboxes_ucdavis_edu.pem) must be imported into the java cacerts bundle on the client machine. The following command shows how to import the cert (attached) for the rice-sandboxes.ucdavis.edu development machine:
        Code Block
        
        keytool -importcert -file rice-sandboxes_ucdavis_edu.pem -keystore cacerts -storepass changeit -alias rice-sandboxes.ucdavis.edu
        
      • Certificates for the various development environments (rice-sandboxes, rice-testint1, rice-qa-a, rice-qa-b) are attached to this document.
    • Production Environment
      • For the production environment, an InCommon Certificate is required for the client application which will be connecting to the production Rice Standalone Server.
      • The InCommon certificate is then installed in client application keystore along with the private key and the certificate is then forwarded to the rice team, long with the alias used, for addition to the rice central server keystore as well as the keystores of the other client applications in the environment.
      • The client application must also request the rice team forward the certificates from all of the applications in the production environment, including the rice central server. These certificates must also be installed in the client application keystore, with the proper alias.
      • For more information on how to request an InCommon certificate for your application, visit the following link and click on the SSL Certificate category: MyUCDavis > UCD Resources > Software

...

Rice Libraries

In Rice 1.0.x, there were only two main jars, rice-api and rice-impl. With the modularity work there are more api jars corresponding to service apis and framework components. Additionally, the implementation module has been split (though there is still a shared implementation module as not all components of the Rice implementation have been fully modularized as of the Rice 2.x.x release). This work was done according to the design outlined at the following page: Modularity Design

...

We use a simple XML configuration to declare properties as key-value pairs. For example:

Code Block
borderStylesolid
title/usr/local/rice/rice-config.xml
borderStylesolid
<config>
    <param name="datasource.ojb.platform">Oracle9i</param>
    <param name="datasource.platform">org.kuali.rice.core.framework.persistence.platform.OraclePlatform</param>
    <param name="datasource.url">jdbc:oracle:thin:@ldap://oraldap1.ucdavis.edu:389/rice_test,cn=OracleContext,dc=ucdavis,dc=edu</param>
    <param name="datasource.driver.name">oracle.jdbc.driver.OracleDriver</param>
    <param name="datasource.pool.validationQuery">select 1 from duak</param>
    <param name="datasource.pool.maxWait">30000</param>
    <param name="datasource.pool.size">30</param>
    <param name="datasource.pool.maxActive">50</param>
    <param name="datasource.minIdle">7</param>
    <param name="datasource.initialSize">7</param>
    <param name="datasource.accessToUnderlyingConnectionAllowed">true</param>
    <param name="datasource.username">my_db_user</param>
    <param name="datasource.password">my_db_password</param>
<config>

...

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

Code Block
borderStylesolid
titleclasspath:edu/ucdavis/myapp/config/application-data.xml
borderStylesolid
<bean id="jotm" class="org.springframework.transaction.jta.JotmFactoryBean">
    <property name="defaultTimeout" value="${transaction.timeout}"/>
</bean>
	

...

  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
    borderStylesolid
    <bean id="dataSource" class="org.kuali.rice.core.framework.persistence.jdbc.datasource.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. solid
    Code Block
    borderStyle
    titleclasspath:edu/ucdavis/myapp/config/application-data.xml
    borderStylesolid
    <bean id="nonTransactionalDataSource" class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close">
        <property name="url" value="${datasource.url}"/>
        <property name="username" value="${datasource.username}"/>
        <property name="password" value="${datasource.password}"/>
        <property name="driverClassName" value="${datasource.driver.name}" />
        <property name="initialSize" value="${datasource.initialSize}" />
        <property name="minIdle" value="${datasource.minIdle}" />
        <property name="maxActive" value="${datasource.maxActive}" />
        <property name="maxWait" value="${datasource.maxWait}" />
        <property name="validationQuery" value="${datasource.validationQuery}" />
        <property name="testOnBorrow" value="${datasource.testOnBorrow}" />
        <property name="testOnReturn" value="${datasource.testOnReturn}" />
        <property name="testWhileIdle" value="${datasource.testWhileIdle}" />
        <property name="accessToUnderlyingConnectionAllowed" value="${datasource.accessToUnderlyingConnectionAllowed}" />
    </bean>
    
    Tip

    To take advantage of pooling capabilities, testOnBorrow should be set to true.

  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
    borderStylesolid
    <bean id="standaloneDataSource" class="org.kuali.rice.core.framework.persistence.jdbc.datasource.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>
    

...

Declare the UCD-implemented Rice services:

solid
Code Block
borderStyle
title/usr/local/rice/rice-config.xml
borderStylesolid
    <param name="rice.kr.additionalSpringFiles">classpath:edu/ucdavis/kuali/rice/krad/config/ucd-krad-service.xml</param>
    <param name="rice.kew.additionalSpringFiles">classpath:edu/ucdavis/kuali/rice/kew/config/ucd-kew-service.xml</param>
  1. If you're using Spring's ContextLoaderListener, declare them in web.xml solid
    Code Block
    borderStyle
    titlesrc/main/webapp/WEB-INF/web.xml
    borderStylesolid
    <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/kim/config/ucd-krad-service.xml
            classpath:edu/ucdavis/kuali/rice/kew/config/ucd-kew-service.xml
            ...
        </param-value>
    </context-param>
    

...

Finally, we declare the coreConfigurer bean and inject all of the core data source beans.

solid
Code Block
borderStyle
titleclasspath:edu/ucdavis/myapp/config/rice-common.xml
borderStylesolid

   <bean id="coreConfigurer" class="org.kuali.rice.core.impl.config.module.CoreConfigurer">
    <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" />
  </bean>
  <bean id="ksbConfigurer" class="org.kuali.rice.ksb.messaging.config.KSBConfigurer" />
  <bean id="kradConfigurer" class="org.kuali.rice.krad.config.KRADConfigurer" />
  <bean id="coreServiceConfigurer" class="org.kuali.rice.coreservice.impl.config.CoreServiceConfigurer" />
  <bean id="kimConfigurer" class="org.kuali.rice.kim.config.KIMConfigurer" />
  <bean id="kewConfigurer" class="org.kuali.rice.kew.config.KEWConfigurer" />
  <bean id="kenConfigurer" class="org.kuali.rice.ken.impl.config.KENConfigurer" />
  <bean id="edlConfigurer" class="org.kuali.rice.edl.impl.config.EDLConfigurer" />
  <bean id="krmsConfigurer" class="org.kuali.rice.krms.config.KRMSConfigurer" />
  <bean id="locationConfigurer" class="org.kuali.rice.location.impl.config.LocationConfigurer" />
 

...