Newer
Older
AMM / AMM_web / src / main / resources / applicationContextBase.xml
@KM KM on 20 Dec 2 KB First Commit
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:aop="http://www.springframework.org/schema/aop"
    xmlns:context="http://www.springframework.org/schema/context"
    xmlns:task="http://www.springframework.org/schema/task"
    xmlns:util="http://www.springframework.org/schema/util"
  xsi:schemaLocation="
  http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
  http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-3.0.xsd
  http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.0.xsd
  http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-3.0.xsd
    http://www.springframework.org/schema/task http://www.springframework.org/schema/task/spring-task-3.0.xsd
  ">

  <!-- Transaction Manager -->
  <bean id="transactionManager"
        class="org.springframework.orm.hibernate3.HibernateTransactionManager">
    <property name="sessionFactory"><ref bean="sessionFactory_Amm" /></property>
  </bean>
  <bean id="transactionAttributeSource"
      class="org.springframework.transaction.interceptor.NameMatchTransactionAttributeSource">
    <property name="properties">
      <props>
           <prop key="*Dao.add">PROPAGATION_REQUIRED,-java.lang.Exception</prop>
           <prop key="*Dao.update">PROPAGATION_REQUIRED,-java.lang.Exception</prop>
           <prop key="*Dao.remove">PROPAGATION_REQUIRED,-java.lang.Exception</prop>
      </props>
    </property>
  </bean>
  <bean id="transactionInterceptor" class="org.springframework.transaction.interceptor.TransactionInterceptor">
    <property name="transactionManager" ref="transactionManager" />
    <property name="transactionAttributeSource" ref="transactionAttributeSource" />
  </bean>

  <!-- アノテーションを付与したBeanを読み込む設定 -->
  <context:component-scan base-package="jp.co.y_net.amm.service" />
  <context:component-scan base-package="jp.co.y_net.amm.dao" />

  <!-- 日時処理 
  <bean class="org.springframework.scheduling.quartz.SchedulerFactoryBean">
    <property name="triggers">
      <list>
        <ref bean="seatTrigger" />
      </list>
    </property>
  </bean>
  <bean id="dailyTrigger" class="org.springframework.scheduling.quartz.CronTriggerBean">
    <property name="jobDetail" ref="dailyJob" />
    <property name="cronExpression" value="0 0 1 * * ?" /><書式:秒 分 時 日 月 曜 年 /> 
  </bean>
  <bean id="dailyJob" class="org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean">
    <property name="targetObject" ref="dailyJobManager" />
    <property name="targetMethod" value="tick"  />
  </bean>
  -->
  <!-- 日時処理 - ここまで -->

</beans>