Hi Ryan, I was able to successfully modify the Tutorial Part12 to use the SpringFinder and to pass a value via the context to the target User resource (see files attached). I haven't used Spring for the wiring but the SpringFinder code in itself seems to work fine.
Let us know if you still have the issue. Best regards, Jerome > -----Message d'origine----- > De : Ryan Daum [mailto:[EMAIL PROTECTED] > Envoyé : samedi 10 mars 2007 18:11 > À : [email protected] > Objet : Re: Possible bug in ServerServlet? > > Thanks Jerome; > > I'm having another problem now, which I can't seem to track > down. It could be a problem with my code, but this worked in > RC4. In my Application subclass I am doing the following: > > /* > * Some attributes everybody needs. > */ > context.getAttributes().put(MODEL_KEY, model); > context.getAttributes().put(REGISTRY_KEY, registry); > > Later, inside my resource (which is now instantiated with > SpringFinder, so that's one difference): > > // obtain model from context > this.rdfModel = (Model) > context.getAttributes().get(AbstractRestApplication.MODEL_KEY); > > Unfortunately, the attributes map is empty now, and the RDF > Model comes out as null. > > Is this a bug? If not, what is the most acceptable way to > share global state initialized by the application? I might > end up having to inject it with Spring... > > Ryan > > > On 3/9/07, Jerome Louvel <[EMAIL PROTECTED]> wrote: > > > Hi Ryan, > > This is a bug that I've just fixed. I have uploaded a > snapshot with the fix > which is also available in SVN. Let me know if it let's > you get the > ServletContexAdapter (and associated ServletContext) as before: > http://www.restlet.org/downloads/1.0/current.zip > > Best regards, > Jerome > > > -----Message d'origine----- > > De : Ryan Daum [mailto: [EMAIL PROTECTED] > > Envoyé : vendredi 9 mars 2007 22:14 > > À : [email protected] > > Objet : Possible bug in ServerServlet? > > > > Line 197 sets the context of the created application to a > > ServletContextAdapter; however this only happens in the case > > that a NoSuchMethodException is triggered by the attempt to > > create the Application through its constructor. Thus if one > > has a valid constructor on the Application, one does not get > > a ServletContextAdapter, just a plain ApplicationContext. > > > > Is this intentional? It seems errant... > > > > -- > > Ryan Daum > > [EMAIL PROTECTED] > > Technical Lead, Toronto > > 647.724.5232 x 2073 > > > > > > > > -- > Ryan Daum > [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> > Senior Developer, Toronto > 647.724.5232 x 2073 >
Part12.java
Description: Binary data
UserResource.java
Description: Binary data
OrdersResource.java
Description: Binary data
OrderResource.java
Description: Binary data

