Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 11 Next »

Overview

Use this recipe to build a skeleton web application named M2Rice which has Rice KEW and Rice KSB Services embedded in it.

Development Environment

Operating System

Windows XP


Application Server

localhost

Application Container

Tomcat 5.5.23

CATALINA_HOME

C:\Tomcat 5.5


IDE

Eclipse Ganymede 3.4.0

Workspace

C:\Development\KualiRice.workspace

Rice Source Directory

C:\Development\KualiRice.workspace\KualiRice0.9.3


Maven

2.0.9

M2_HOME

C:\apache-maven-2.0.9

M2_OPTS

-Xms256m -Xmx512m

M2_REPO

C:\JavaLib\mvnrepository

Build Sheet

  1. Create Maven Project
    Start Eclipse
    Go to File -> New -> Project -> Maven Project
    Check the Use default Workspace location box and click Next
    Select Internal as the catalog
    From the list of archetypes, select the maven-archetype-webapp Arctifact Id and click Next

    For Group Id, enter edu.ucdavis.iet
    For Artifact Id, enter M2Rice

    Click Finish

  2. Embed the Kuali Service Bus
    • Identify Rice dependencies
      Add the following to your pom.xml
      pom.xml
      <repository>
      	<id>kuali</id>
      	<name>Kuali Repository</name>
      	<url>https://test.kuali.org/maven/</url>
      </repository>
      
      <dependency>
      	<groupId>org.kuali.rice</groupId>
      	<artifactId>rice-ksb</artifactId>
      	<version>0.9.3</version>
      </dependency>
      

    • Configure KSB Dispatcher Servlet
      Add the following code to web.xml
      /WEB-INF/web.xml
      <servlet>
        <servlet-name>remoting</servlet-name>
        <servlet-class>edu.iu.uis.eden.messaging.servlet.KSBDispatcherServlet</servlet-class>
        <load-on-startup>1</load-on-startup>
      </servlet>
      
      <servlet-mapping>
        <servlet-name>remoting</servlet-name>
        <url-pattern>/remoting/*</url-pattern>
      </servlet-mapping>
      

    • Create configuration files
      In the project structure, right-click on src/main/webapp/WEB-INF, then New -> File
      Name the file M2Rice-config.xml
      Add the following skeleton code:
      src/main/webapp/WEB-INF/M2Rice-config.xml
      <config>
      
      </config>
      

      In the project structure, right-click on src/main/resources, then New -> File
      Name the file M2Rice-RiceSpringBeans.xml
      Add the following skeleton code:
      src/main/resources/M2Rice-RiceSpringBeans.xml
      <?xml version="1.0" encoding="UTF-8"?>
      <!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">
      <beans>
      
      </beans>
      

    • Configure Spring Beans
      Add the following code:
      src/main/resources/M2Rice-RiceSpringBeans.xml
      <bean id="rice" class="org.kuali.rice.config.RiceConfigurer">
        <property name="dataSource" ref="workflowDataSource" />
        <property name="transactionManager" ref="myJtaTransactionManager" />
        <property name="userTransaction" ref="myJtaUserTransaction" />
        <property name="properties">
          <props>
            <prop key="message.entity">M2Rice</prop>
            <prop key="message.persistence">true</prop>
            <prop key="message.delivery">asynchronous</prop>
            <prop key="Routing.ImmediateExceptionRouting">false</prop>
            <prop key="RouteQueue.timeIncrement">1000</prop>
            <prop key="RouteQueue.maxRetryAttempts">3</prop>
            <prop key="useQuartzDatabase">true</prop>
            <prop key="ksb.org.quartz.scheduler.instanceId">AUTO</prop>
            <prop key="ksb.org.quartz.scheduler.instanceName">KSBScheduler</prop>
            <prop key="ksb.org.quartz.jobStore.isClustered">true</prop>
            <prop key="ksb.org.quartz.jobStore.tablePrefix">KR_QRTZ_</prop>
          </props>
        </property>
        <property name="modules">
          <list>
            <bean class="edu.iu.uis.eden.messaging.config.KSBConfigurer">
              <property name="serviceServletUrl" value="http://localhost:8080/M2Rice/remoting" />
            </bean>
          </list>
        </property>
      </bean>
      

Reference

KSB Module Configuration: https://test.kuali.org/confluence/display/KULRICE/KSB+Module+Configuration
Advanced Configuration: https://test.kuali.org/confluence/display/KULRICE/Advanced+Installation+and+Configuration

  • No labels