louis_liuli 2013-07-13 09:17 采纳率: 0%
浏览 2027

SSH声明式事物管理不起作用为什么

在线求教
各位前辈帮我看一下我的声明式事物管理那里出错了,为什么不起作用




com/transaction/pojo/Role.hbm.xml

    </list> 
    </property>

    <property name="hibernateProperties">
        <props>
            <prop key="hibernate.dialect">
                org.hibernate.dialect.MySQLDialect 
            </prop>
            <prop key="hibernate.show_sql">true</prop>
            <prop key="hibernate.current_session_context_class">thread</prop> 
        </props>
    </property>
   </bean>
   <bean id="txManager" class="org.springframework.orm.hibernate3.HibernateTransactionManager">
    <property name="sessionFactory" ref="sessionFactory" />
   </bean>

  <aop:config>
    <aop:pointcut id="bussinessService"
        expression="execution(public * com.transaction.service..*.*(..))" />
    <aop:advisor pointcut-ref="bussinessService"
        advice-ref="txAdvice" />
</aop:config>

<tx:advice id="txAdvice" transaction-manager="txManager">
    <tx:attributes>
        <tx:method name="getUser" read-only="true" />
        <tx:method name="save*" propagation="REQUIRED"/>
    </tx:attributes>
</tx:advice>

Service所在包路径package com.transaction.service.impl.TestServiceImpl

  • 写回答

1条回答

  • 软件求生 2017-11-08 01:28
    关注

    com.transaction.service..*.*(..)
    service后面多一个点。

    评论

报告相同问题?

悬赏问题

  • ¥15 stata安慰剂检验作图但是真实值不出现在图上
  • ¥15 c程序不知道为什么得不到结果
  • ¥40 复杂的限制性的商函数处理
  • ¥15 程序不包含适用于入口点的静态Main方法
  • ¥15 素材场景中光线烘焙后灯光失效
  • ¥15 请教一下各位,为什么我这个没有实现模拟点击
  • ¥15 执行 virtuoso 命令后,界面没有,cadence 启动不起来
  • ¥50 comfyui下连接animatediff节点生成视频质量非常差的原因
  • ¥20 有关区间dp的问题求解
  • ¥15 多电路系统共用电源的串扰问题