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条回答 默认 最新

  • 关注

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

    评论

报告相同问题?

悬赏问题

  • ¥15 使用phpstudy在云服务器上搭建个人网站
  • ¥15 应该如何判断含间隙的曲柄摇杆机构,轴与轴承是否发生了碰撞?
  • ¥15 vue3+express部署到nginx
  • ¥20 搭建pt1000三线制高精度测温电路
  • ¥15 使用Jdk8自带的算法,和Jdk11自带的加密结果会一样吗,不一样的话有什么解决方案,Jdk不能升级的情况
  • ¥15 画两个图 python或R
  • ¥15 在线请求openmv与pixhawk 实现实时目标跟踪的具体通讯方法
  • ¥15 八路抢答器设计出现故障
  • ¥15 opencv 无法读取视频
  • ¥15 按键修改电子时钟,C51单片机