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]
Senior Developer, Toronto
647.724.5232 x 2073