ruby07 2010-03-30 11:04
浏览 233
已采纳

dwr3遇上spring的事务管理出现Error

[color=red]dwr.xml:[/color]

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE dwr PUBLIC "-//GetAhead Limited//DTD Direct Web Remoting 3.0//EN" "http://getahead.org/dwr/dwr30.dtd">









[color=red]applicationContext.xml[/color]

<?xml version="1.0" encoding="UTF-8"?>
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:aop="http://www.springframework.org/schema/aop"
xmlns:tx="http://www.springframework.org/schema/tx"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.0.xsd
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-2.0.xsd">


[color=red]



tx:attributes




/tx:attributes
/tx:advice
aop:config


/aop:config[/color]




其中com.service.impl.NjhglServiceImpl是一个类,继承com.service.NjhglService这个接口.
当我在applicationContext.xml上不加入红色的内容时,是可以在页面上使用njhglService.js,但上加红色内容时,页面上只弹出一个Error的对话框,后台也不报错。
我项目用的是dwr3+spring2.0,不明白dwr遇上spring的事务管理为什么会出错。

  • 写回答

1条回答

  • wanghaolovezlq 2010-03-30 11:43
    关注

    通过spring改变代理类型,改为基于类的cglib代理:
    < aop:config proxy-target-class="true">

    或者换成dwr2.0.5

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥50 永磁型步进电机PID算法
  • ¥15 sqlite 附加(attach database)加密数据库时,返回26是什么原因呢?
  • ¥88 找成都本地经验丰富懂小程序开发的技术大咖
  • ¥15 如何处理复杂数据表格的除法运算
  • ¥15 如何用stc8h1k08的片子做485数据透传的功能?(关键词-串口)
  • ¥15 有兄弟姐妹会用word插图功能制作类似citespace的图片吗?
  • ¥200 uniapp长期运行卡死问题解决
  • ¥15 latex怎么处理论文引理引用参考文献
  • ¥15 请教:如何用postman调用本地虚拟机区块链接上的合约?
  • ¥15 为什么使用javacv转封装rtsp为rtmp时出现如下问题:[h264 @ 000000004faf7500]no frame?