StatusService getRepresentation and Variant

2009-03-06 Thread Tim Kuntz
Would anyone be able to recommend the correct way to determine what the preferred Variant was for the requested Resource from the StatusService.getRepresentation() method? I would like to return different representations of error messages based on the Variant requested for the original

Servlet container's filters, getParameters() and POSTing www-form-urlencoded data

2009-03-06 Thread Fabio Mancinelli
Dear all, this is a quite known issue[1][2] but I am wondering if you already have a solution to the following problem: Suppose you have a servlet filter that uses one of the getParameter*() method in order to get some data from the request. What happens is that if the request is a

RE: DirectoryResource, the clap://class/ scheme, and custom Classloaders - doesn't work? (OSGi- related)

2009-03-06 Thread Jerome Louvel
Hi David, I now consider this issue fixed. See my comments in the issue opened by Thierry for details. Best regards, Jerome Louvel -- Restlet ~ Founder and Lead developer ~ http://www.restlet.org Noelios Technologies ~ Co-founder ~ http://www.noelios.com -Message d'origine- De :

RE: Re: Managing a JPA/Hibernate session

2009-03-06 Thread Jerome Louvel
Hi Paul, You made a good point regarding the afterSend and beforeSend method. So, I decided to change their behavior. Those methods are now invoked all the time, even if there is no entity sent (null will be passed). Changes in SVN trunk. Best regards, Jerome Louvel -- Restlet ~ Founder and

Re: Managing a JPA/Hibernate session

2009-03-06 Thread Paul Austin
Jerome, Thanks, did you add it in a finally block so that it always gets executed even if there is an exception. Paul On 6-Mar-09, at 10:36 AM, Jerome Louvel wrote: Hi Paul, You made a good point regarding the afterSend and beforeSend method. So, I decided to change their behavior.

RE: Managing a JPA/Hibernate session

2009-03-06 Thread Jerome Louvel
Paul, Yes I did! :) Cheers, Jerome -Message d'origine- De : Paul Austin [mailto:paul.aus...@revolsys.com] Envoyé : vendredi 6 mars 2009 19:41 À : discuss@restlet.tigris.org Objet : Re: Managing a JPA/Hibernate session Jerome, Thanks, did you add it in a finally block so that it

RE: detecting that client aborted or timed out

2009-03-06 Thread Jerome Louvel
Hi Luis, Just a suggestion: you could provide client kits in various languages to your users, like large web services are doing. Best regards, Jerome Louvel -- Restlet ~ Founder and Lead developer ~ http://www.restlet.org Noelios Technologies ~ Co-founder ~ http://www.noelios.com -Message

RE: Re: Why does the Restlet class have lifecycle methods?

2009-03-06 Thread Jerome Louvel
Hi David, I think you put the finger on a serious issue here... We need to make this behavior more predictable and consistent. I suggest that we systematically propagate the start/stop actions to attached Restlets: - 'next' Restlet for a Filter - 'root' Restlet for an Application - 'routes'

Integrating WADL and Spring

2009-03-06 Thread David Bordoley
Hi All, I've been playing around with Restlet for some projects I'm working on and have really enjoyed the platform. I'm wondering if there is a way to define your service in a WADL document but still use Spring to configure all your applications Resources, etc. In the abstract what I would like

Re: Integrating WADL and Spring

2009-03-06 Thread Rhett Sutphin
Hi Dave, On Mar 6, 2009, at 1:08 PM, David Bordoley wrote: I've been playing around with Restlet for some projects I'm working on and have really enjoyed the platform. I'm wondering if there is a way to define your service in a WADL document but still use Spring to configure all your

Re: JAX-RS and per methods security

2009-03-06 Thread Stephan Koops
Alexander J. Perez Tchernov schrieb: Hello. Is it possible to ship an example how to operate with security in JAX-RS for the following problem. I want to specify that certain users may perform GET operation against a certain resource, and only subset of them can perform PUT /POST operation.

Upload to Directory

2009-03-06 Thread Christian Haintz
Hi, I simply wanna upload a File to the org.restlet.Directory. But all I get is: See Other (303) - The metadata are not consistent with the URI I don't know what that means, or what I can do against it. On the Server Side i do: Application application = new Application() {

Re: Integrating WADL and Spring

2009-03-06 Thread David Bordoley
On Fri, Mar 6, 2009 at 11:32 AM, Rhett Sutphin rh...@detailedbalance.net wrote: This would be an RFE (at least, I'm not aware of any way to get it to work currently).  I'm curious about how you would tie the resources in your application context to the WADL.  Would you add a custom attribute

Re: Upload to Directory

2009-03-06 Thread Thierry Boileau
Hello Christian, there is a mechanism based on the MetadaService [1] that checks the media type of the uploaded file with the one deduced from the URI of the resource. For instance, you put a file with mediatype */* on a URI such as http://www.example.com/fille.txt. Based on the metadata