Re: ServerResource is currently incompatible with OSGi

2009-04-07 Thread David Fogel
Hi Tal- I think what you suggested about appending a classloader id (perhaps System.identityHashCode(cl) ?) would work. Regarding the Restlet Context and this cache being cruft: You say the Context is a reasonable place for information that applies to the Application, but this doesn't have

list of resource

2009-04-07 Thread webpost
hi, some day ago i posted a a problem. Hi i'm an italian student and i have to plan a restful architecture using RESTLET. The architecture have to implement a B2B message exchange in xml format powered by GS1 XML. -My problem is to understand how makes the client thet have to get or post a

Multiple Application Handling in web.xml

2009-04-07 Thread webpost
Hello, I am using restlet 1.2M2 in the TomCat 6 web container. I am trying to create multiple Restlet applications and define different URI patterns that map to each one. I tried to do this following all the Restlet examples posted and it seems that all the examples show how to handle only one

Re: Comments on First Resource article (Restlet 1.2m2)

2009-04-07 Thread Thierry Boileau
Hi Tim, thanks a lot for your useful comments! Ive updated the sample code. The call to putIfAbsent needs to be prefixed with getItems(). Actually, I created a putIfAbsent method on the BaseResource class because I was not aware you meant to use a ConcurrentMap. best regards, Thierry Boileau

Media types specified as a query parameter

2009-04-07 Thread Fabio Mancinelli
Hi everybody, I would like to use query parameters in order to specify the media type to be sent to the client. Tunneling and metadata services should do the trick. However I cannot achieve this. I called in createRoot() of the JaxRsApplication (I am the using JAX-RS extension)

JAXRS and media type via query parameters

2009-04-07 Thread webpost
Hi everybody, I am using the JAX-RS extension for developing my application. I would like to specify the accepted formats using query parameters because the client I am using is not able to send accept headers. I did this in the JaxRsApplication create root method:

Re: ServerResource is currently incompatible with OSGi

2009-04-07 Thread Rob Heittman
There's a lot of precedent -- look at all the weird stuff that ends up in System.properties() on startup of some JVMs, or the values hanging out in ServletContext or PageContext in every JEE server I know. Doesn't mean it thrills me. Thanks for spotting this, David ... would have been a stopper

Re: list of resource

2009-04-07 Thread Stephen Groucutt
I am aware of two primary approaches to deal with this problem: 1) Directory-style discovery. By this, I mean that there is a resource that contains references to other resources, that is accessible and is one of the known URIs to all clients. For example, a folder resource may contain

Re: DirectoryResource throws/logs useless exceptions for CLAP protocol

2009-04-07 Thread Rob Heittman
I also wish it were a bit faster. We do serve several hundred thousand impressions out of Directory every month, but we serve several million using thinner Resources not wrapped in Directory -- not sure what would happen if we wrapped those in Directory. On Tue, Apr 7, 2009 at 1:58 AM, David

Re: Media types specified as a query parameter

2009-04-07 Thread Rhett Sutphin
Hi Fabio, On Apr 7, 2009, at 4:18 AM, Fabio Mancinelli wrote: Hi everybody, I would like to use query parameters in order to specify the media type to be sent to the client. Tunneling and metadata services should do the trick. However I cannot achieve this. I called in createRoot()

Multiple Application Handling in web.xml and restlet.xml

2009-04-07 Thread tameremil
Hello, I am using restlet 1.2M2 in the TomCat 6 web container. I am trying to create multiple Restlet applications and define different URI patterns that map to each one. I tried to do this following all the Restlet examples posted and it seems that all the examples show how to handle only one

RE: Re: Media types specified as a query parameter

2009-04-07 Thread Fabio Mancinelli
Hi Rhett, thanks for the hint. I activated the query service but still no luck. I am starting to think that the ?media mechanism is not supported when using the JAX-RS extension. Thanks, Fabio --

Grizzly Https Server

2009-04-07 Thread srsk
Hi, I am Sheshakiran, developer from one of the service based industry. I have a requirement to develop one Grizzly Asynhcronous Https Server, which would do Basic Authentication and HTTPCertificate validation. I found Http implementation of grizzly server, but i am not able to get sufficient

RE: Resource factories

2009-04-07 Thread Kyrre Kristiansen
Hello, all. *rant alert* I came over this discussion, and wanted to share my experiences with creating resources. I started playing around with restlet before it became 1.0, and am generally very, very pleased with it. One of the things I use it for is my own prototype environment, where I

Restlet and maven

2009-04-07 Thread Rémi Dewitte
Hello, I know there is some ongoing work about maven and restlet. If I checkout the trunk and build it, how do I install the new artifacts into my local m2 repository ? Thanks, Rémi --

Re: Restlet and maven

2009-04-07 Thread Alexander J. Perez Tchernov
Have you already checked http://www.restlet.org/downloads/maven ? Or you want to build /install from the trunk sources from scratch. 2009/4/7 Rémi Dewitte r...@gide.net: Hello, I know there is some ongoing work about maven and restlet. If I checkout the trunk and build it, how do I install

RE: Re: Media types specified as a query parameter

2009-04-07 Thread Fabio Mancinelli
I am starting to think that the ?media mechanism is not supported when using the JAX-RS extension. This is probably the reason... Anyway I did this very simple application http://pastebin.com/m5e963eea Could somebody confirm the incompatibility, or hint a solution if I am doing something

RE: Restlet and maven

2009-04-07 Thread Jerome Louvel
Rémi, Otherwise, for working with Maven, you want to check this page: Building with Maven http://wiki.restlet.org/developers/179-restlet/240-restlet.html Best regards, Jerome Louvel -- Restlet ~ Founder and Lead developer ~ http://www.restlet.org Noelios Technologies ~ Co-founder ~

Re: Resource factories

2009-04-07 Thread Rhett Sutphin
Hi Kyrre, On Apr 7, 2009, at 9:28 AM, Kyrre Kristiansen wrote: Hello, all. *rant alert* I came over this discussion, and wanted to share my experiences with creating resources. I started playing around with restlet before it became 1.0, and am generally very, very pleased with it. One

Re: Resource factories

2009-04-07 Thread Kyrre Kristiansen
Hello Rhett, That's not at all a bad idea! I keep forgetting about the fact that classes themselves are generic. I'd still have to make a subclass of finder to add the extra class parameter to my resource (I really like the idea of creating a resource per request, mostly for the reasons

Re: Restlet and Large PUT requests

2009-04-07 Thread Stephan Koops
Hi, because it seems to me, you get no answer until now, here a possibility: You use the representation, and write into or write from its InputStream / Reader. best regards Stephan webp...@tigris.org schrieb: Greetings, I am new to Restlet and am not sure how to solve this problem, or

RE: Serving static content with the CLAP connector

2009-04-07 Thread Jerome Louvel
Hi Jim, Do you still have the issue? From what I see, it should work. The easiest way for us to debug this is to try your application. Could you send us some code to reproduce the issue? Best regards, Jerome Louvel -- Restlet ~ Founder and Lead developer ~ http://www.restlet.org Noelios

RE: Restlet 1.2 M2 released

2009-04-07 Thread Jerome Louvel
Hi Tim, Thanks for your proposition. It makes me realize that I didn't explain my design goals well enough. What I would like to be able to do is express potentially complex variants with a compact syntax as annotation values. By complex variants, I mean variants like JSON and UTF-8 and

RE: list of resource with relatives url

2009-04-07 Thread Jerome Louvel
Hi Rob, The current WADL is able to do exactly what you describe. You can use a WADL document to configure your application, wire your resources. Your resources can be also be automatically described, by introspecting the routing configuration and the resource capabilities. The mapping with

Re: ServerResource is currently incompatible with OSGi

2009-04-07 Thread Tal Liron
Ah, I can see your point now. I would recommend, then, that a Context would have two separate ConcurrentHashMaps, something like this: 1. Context.getConfiguration() -- this would be for the user 2. Context.getImplementationCache() -- this would be for things like AnnotationUtils, and the

RE: Restlet 1.2 M2 released [throw previous email away]

2009-04-07 Thread Jerome Louvel
Hi all, As I tried to explain in reply to Tim's alternative design (http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447 http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=1579 830 dsMessageId=1579830) the goal for the annotation value is to go beyond a simple

RE: Getting various mediaTypes through browser

2009-04-07 Thread Jerome Louvel
Hi Pracheer, This exact feature is automatically handled for you by the TunnelService (!). This service is enabled by default for each application: http://www.restlet.org/documentation/snapshot/api/org/restlet/service/Tunnel Service.html Best regards, Jerome Louvel -- Restlet ~ Founder and Lead

RE: how to set media type for requests

2009-04-07 Thread Jerome Louvel
Hi there, Please have a look at the http://www.restlet.org web site and related documentation. There are also examples available that do this. Finally, we are working on a book that will provide more guidance (http://book.restlet.org/) for new users. Best regards, Jerome Louvel -- Restlet ~

RE: Spring + Restlet 1.2-SNAPSHOT, NullPointerException

2009-04-07 Thread Jerome Louvel
Hi Eric, Here is a sample configuration attached. You can check the source code here: http://restlet.tigris.org/source/browse/restlet/trunk/modules/org.restlet.te st/src/org/restlet/test/ext/spring/ Best regards, Jerome Louvel -- Restlet ~ Founder and Lead developer ~ http://www.restlet.org/

Re: Resource factories

2009-04-07 Thread Tal Liron
Just to join the choir -- In addition to Rhett's standard solution, you can also use Restlet's application Context.getAtrributes() to set the referred type for each resource class, which they could then read at runtime. Just an option; I prefer Rhett's solution. By the way, having worked

Re: Restlet 1.2 M2 released [throw previous email away]

2009-04-07 Thread Tal Liron
Thanks for joining the discussion, Jerome, we were getting a bit ridiculous in trying to second guess your intentions. :) It makes sense to me to use simple strings for referring to media types, and your examples are definitely elegant. But I have to again say that using filename extension

[1.1.3] Tomcat + RestletFrameworkServlet mapping SpringBeanRouter to /

2009-04-07 Thread Paul Austin
In my project I am deploying an application as a war file. The root of the web application /* is mapped to the RestletFrameworkServlet so that all handling is performed by Restlet. servlet servlet-namebpf/servlet-name

Re: Restlet 1.2 M2 released [throw previous email away]

2009-04-07 Thread Paul Austin
Jerome, I would be happy if users can choose to either use the extensions or the mime-type where the extension is currently used. Consider a web service which is designed to be used either from a web browser when the media= parameter is used or from a Java client where the accept header can be

RE: Restlet 1.2 M2 released [throw previous email away]

2009-04-07 Thread Jerome Louvel
Tal, It's really a matter of terminology, so it's hard to rationalize the choice. I know that extension is often synonymous of file extension but it doesn't have to. If you look at WordNet definition of the extension word, you should feel more comfortable about using it as an equivalent to

Re: [1.1.3] Tomcat + RestletFrameworkServlet mapping SpringBeanRouter to /

2009-04-07 Thread Paul Austin
Here is a class which fixes the issue. Probably a better solution would be to change the Route class so that if the remainingPart is it sets it to / before doing the regex matching. On a related note is it possible to force exact matching so that say /apps would be mapped but not /apps/xyz?

Re: Restlet and maven

2009-04-07 Thread Rémi Dewitte
Cool ! Exactly what I wanted :). Rémi On Tue, Apr 7, 2009 at 17:15, Jerome Louvel jerome.lou...@noelios.comwrote: Rémi, Otherwise, for working with Maven, you want to check this page: Building with Maven http://wiki.restlet.org/developers/179-restlet/240-restlet.html Best regards,

Re: Restlet 1.2 M2 released [throw previous email away]

2009-04-07 Thread Tal Liron
I like the idea of having a default Extension for each MediaType, which means that they are all mappable. I understand the multiple uses of the word Extension, but my problem is the multiple uses of Extension itself in Restlet. :) The MetadataService really is used for mapping filename

Re: Restlet 1.2 M2 released [throw previous email away]

2009-04-07 Thread David Fogel
Hi Jerome- I don't know, this whole extension thing sounds strange to me. Why replace a well-defined, standardized namespace for media-types (e.g. text/html etc) with a new, ad-hoc, non-standard namespace like this extension stuff? I don't think that the goal of compactness is a good

1.1.4 isn't in maven.restlet.org

2009-04-07 Thread Mark Derricutt
Hi all, Any reason why restlet 1.1.4 isn't available in the maven.restlet.org repository yet? I assume its a manual deployment process? ...and then Buffy staked Edward. The End. --