Versions Compared

Key

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

...

    • Configure Spring Beans
      In the project structure, right-click on src/main/resources, then New -> File
      Name the file M2Rice-RiceSpringBeans.xml
      Code Block
      titlesrc/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>
      
      <bean id="config" class="org.kuali.rice.config.spring.ConfigFactoryBean">
      	<property name="configLocations">
      		<list>
      			<value>classpath:WEB-INF/M2Rice-config.xml</value>
      		</list>
      	</property>
      </bean>
      
      <bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
      	<property name="properties" ref="configProperties" />
      </bean>
      
      <bean id="configProperties" class="org.springframework.beans.factory.config.MethodInvokingFactoryBean">
      	<property name="targetObject" ref="config" />
      	<property name="targetMethod" value="getProperties" />
      </bean>
      
      <bean id="rice" class="org.kuali.rice.config.RiceConfigurer">
        <property name="dataSource" ref="riceDataSource" />
        <property name="transactionManager" ref="jotm" />
        <property name="userTransaction" ref="jotm" />
        <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>
      
      <bean id="ksbConfigurer" class="edu.iu.uis.eden.config.spring.KSBSpringConfigurer">
      	<property name="clientProtocol" value="embedded" />
      	<property name="messageEntity" value="M2Rice" />
      	<property name="dataSource" ref="riceDataSource" />
      	<property name="transactionManager">
      		<ref bean="jotm" />
      	</property>
      	<property name="userTransaction">
      		<ref bean="jotm" />
      	</property>
      </bean>
      
      <bean id="riceDataSource" class="org.kuali.rice.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.maxSize}" />
      	<property name="minSize" value="${datasource.pool.minSize}" />
      	<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>
      
      <bean id="jotm" class="org.springframework.transaction.jta.JotmFactoryBean" />
      
      </beans>
      

...