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

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

报告相同问题?

悬赏问题

  • ¥15 数学建模招标中位数问题
  • ¥15 phython路径名过长报错 不知道什么问题
  • ¥15 深度学习中模型转换该怎么实现
  • ¥15 HLs设计手写数字识别程序编译通不过
  • ¥15 Stata外部命令安装问题求帮助!
  • ¥15 从键盘随机输入A-H中的一串字符串,用七段数码管方法进行绘制。提交代码及运行截图。
  • ¥15 TYPCE母转母,插入认方向
  • ¥15 如何用python向钉钉机器人发送可以放大的图片?
  • ¥15 matlab(相关搜索:紧聚焦)
  • ¥15 基于51单片机的厨房煤气泄露检测报警系统设计