cxf-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Yognhe <>
Subject Re: Does CXF support scope of Spring bean
Date Thu, 17 Dec 2009 15:55:47 GMT


I created the bean like this:

	<bean id="currentMessage"
		factory-method="getCurrentMessage" scope="request">
		<aop:scoped-proxy />

However, I got this exception:
Caused by: java.lang.IllegalStateException: No thread-bound request found:
Are you referring to request attributes outside of an actual web request, or
processing a request outside of the originally receiving thread? If you are
actually operating within a web request and still receive this message, your
code is probably running outside of DispatcherServlet/DispatcherPortlet: In
this case, use RequestContextListener or RequestContextFilter to expose the
current request.

Seems that it needs some configurations web.xml and I could not find it from
Spring doc. Could you please let know what the configuration I need or where
I can find it?


dkulp wrote:
> According to:
> it works if you make it a scoped-proxy.
> Dan
> On Tue December 15 2009 10:18:27 am Yognhe wrote:
>> Hi,
>> I tried to create a Spring bean in cxf.xml like this:
>> <bean id="cxfMessage" class="org.apache.cxf.phase.PhaseInterceptorChain"
>> factory-method="getCurrentMessage" scope="request"/>
>> And it does not work. I am wondering if CXF supports the scope of Spring
>> bean. If does, how should I configure CXF to create a Spring bean with a
>> scope.
>> Thanks,
>> Yonghe
> -- 
> Daniel Kulp

View this message in context:
Sent from the cxf-user mailing list archive at

View raw message