Should this in the appicationContext.xml:
<bean id="fooResource" scope="request" class="FooResource" />
be this:
<bean id="fooResource" scope="request" class="FooResource" scope="prototype"/>
On 9/13/07, Makunas, Michael <[EMAIL PROTECTED]> wrote:
> Hi-
>
> In a quest to improve the "springyness" of the current spring/restlet
> integration I'm using, I've been playing around with some of the new
> Spring related classes in the 1.1 development trunk. I think I've
> managed to achieve a better fit than I had before, so I thought I'd
> share it and get some feedback. This is what I did:
>
>
> 1. Extend org.springframework.web.servlet.FrameworkServlet and
> essentially copy the functionality of ServerServlet but get the reslet
> bits from spring's bean factory instead of instantiating them itself and
> storing them in the servlet context. Source is attached.
>
> 2. Added the following constructor to
> org.restlet.ext.spring.SpringServer
>
> public SpringServer(String protocol, String address, int port, Restlet
> target) {
> super(target.getContext(), Protocol.valueOf(protocol), address,
> port, target);}
>
> 3. Wire everything up as shown in the attached applicationContext.xml.
> Including using the request scope for resources (which necessitates
> using org.springframework.web.context.request.RequestContextListener)
>
>
> Does this sound reasonable? As a prototype, it works just fine, but I
> haven't tested it in anything close to production.
>
>
> Cheers,
> Michael
>
>