解决方案 »

  1.   

    spring数据库事务管理有严重bug,不能用
      

  2.   


    <bean id="transactionManager"
    class="org.springframework.orm.hibernate3.HibernateTransactionManager">
    <property name="sessionFactory" ref="sessionFactory" />
    </bean> <bean id="baseTransactionProxy"
    class="org.springframework.transaction.interceptor.TransactionProxyFactoryBean"
    abstract="true">
    <property name="transactionManager" ref="transactionManager" />
    <property name="transactionAttributes">
    <props>
    <prop key="*">
    PROPAGATION_REQUIRED,ISOLATION_DEFAULT,timeout_3000,-Exception
    </prop>
    <prop key="insert*">PROPAGATION_REQUIRED,-Exception</prop>
    <prop key="update*">PROPAGATION_REQUIRED,-Exception</prop>
    <prop key="get*">PROPAGATION_REQUIRED,readOnly,-Exception</prop>
    <prop key="query*">PROPAGATION_REQUIRED,readOnly,-Exception</prop>
    <prop key="list*">PROPAGATION_REQUIRED,readOnly,-Exception</prop>
    </props>
    </property>
    </bean>