解决方案 »

  1.   


    Debug断点调试的时候 excute 方法 里面的属性 都看不了值 就像bug一样,直接跳过断点
      

  2.   

    其他的也没提交事务啊
    难道只有insert需要提交事物吗
      

  3.   

    这样添加事务配置  对不对  <!-- 配置spirng声明事务管理 -->
      <bean id="hibernateTransactionManager"class="org.springframework.orm.hibernate3.HibernateTransactionManager"><property name="sessionFactory" ref="sessionFactory" /></bean><!--事务通知-->    <tx:advice id="logAdvice" transaction-manager="hibernateTransactionManager"><!--定义规则*统配 --><tx:attributes>    <tx:method name="update*" propagation="REQUIRED"/><tx:method name="delete*" propagation="REQUIRED"/><tx:method name="save*" propagation="REQUIRED"/><tx:method name="get*"  propagation="NOT_SUPPORTED"/><tx:method name="find*"  propagation="NOT_SUPPORTED"/></tx:attributes></tx:advice> 
      

  4.   

    请问怎么写事务。
    没有错误信息,就是不能实现 保存到数据库的功能  不能触发insert 
      

  5.   

    SSH整合的时候 如何配置事务管理呢
      

  6.   

    你user实体类里面的userId怎么生成的  你把断点打到service里看下
      

  7.   

    <!--  
      <aop:config>    <!--定义一个切入点--><aop:pointcut id="tranPointCut" expression="execution(com.integration.service.UserService"/><!--定义方面:  通知织入到切面--><aop:advisor advice-ref="logAdvice" pointcut-ref="tranPointCut"/></aop:config> <!--事务通知-->    <tx:advice id="logAdvice" transaction-manager="hibernateTransactionManager"><!--定义规则*统配 --><tx:attributes>    <tx:method name="update*" propagation="REQUIRED"/><tx:method name="delete*" propagation="REQUIRED"/><tx:method name="save*" propagation="REQUIRED"/><tx:method name="get*"  propagation="NOT_SUPPORTED"/><tx:method name="find*"  propagation="NOT_SUPPORTED"/></tx:attributes></tx:advice> 
    -->
    这段代码 可以起到自动开启事务 回滚事务吗?
    expression="execution(com.integration.service.UserService"/>
    这句 里面的包 我看API文档是
     expression="execution(* com.xyz.myapp.service.*.*(..)) &amp;&amp; this(service)"/>
    不知怎么个意思 
    为什么updata都可以正常修改 没有添加事务 insert需要呢
      

  8.   


    可恶的粗心啊 
    又一次写错单词 
    难怪4级过不了啊
    execute  写出excuteeclipse还不报错。。
    结贴了 感谢各位回帖帮忙 
    3Q