Brandon Lonac <brandon.lonac <at> theplatform.com> writes: > Based on the Spring example for configuring all the restlets and URIs in > the > config, I am subclassing the ServerServlet so I can override the > createApplication method so Spring can manage all the classes for me. > ... > Since the handler is now auto created and the Resource > constructor requires a context, request, and response to be created it > makes it > difficult to use Spring to manage the Resource objects. If the idea is > now that > the Resource class is subclassed to provide the implementation, it > generally is > going to need other objects, like a DAO, to do the work. DAOs in > particular are > much simplified when using Spring and being able to inject them into the > Resource is required if Spring is being used in my case.
Brandon, I think you are asking about the same question I was about to post. My particular situation is that my resource requires some parameterization so that it can do JAXB work (a package and a XSD path; these are configured external to the application). I want the convenience of auto-creation but how do I parameterize my resources? Additionally, I've read that I can create my own finder and instantiate my own resources - that ought to be a less convenient route to parameterize resources - but I don't know the idiom. In summary, I'd like a way to parameterize resources in the existing auto-create idiom, and I'd like to see an example of the 'do it yourself' idiom. Sean

