Spring: 2.5.6.SEC01
DWR: 2.0.5
I would like to use a bean session with DWR. It works great when I configure a bean as a singleton. I read this mentor: ( http://directwebremoting.org/dwr/server/integration/spring.html ) and changed my applicationContext.xml, but it is still somewhere wrong.
My application context.xml:
http://pastebin.com/m8d57f18
This is good, but when I use the AJAX function, I get this exception:
11: 31: 09,593 INFO [DefaultRemoter] Exec: DBTestAjaxFunc.testJNDI () 11: 31: 09,609 WARN [DefaultRemoter] Method execution error: org.springframework.beans.factory.BeanCreationException: Error creating bean named 'scopedTarget.dbtestajax : The "session" area is inactive for the current thread; consider scope for this bean if you intend to reference it with a single point; nested exception java.lang.IllegalStateException: No request to bind to a thread: are you referring to the request attributes outside the actual web request or is the processing of the request outside the stream originally receiving? if you are actually working on a network to request and still receive a message, your code probably works outside of DispatcherServlet / DispatcherPortlet: In this case, use RequestContextListener or RequestContextFilter,to set the current request.
, - aop , .
Libs :
- aspectjrt.jar
- aspectjweaver.jar
- CGLIB-nodep-2.2.jar
- dwr.jar
- spring.jar
- spring -aop.jar
- spring -dwr-2.0.xsd
- spring -web.jar
- spring -webmvc.jar
? (!)
user259131