re: InterruptedException when stopping component

2009-03-16 Thread Ty
I'm also interested in this functionality. I had thought of starting a separate thread that does the shutdown of the component after waiting a few moments; but that seems pretty clumsy. From: Romilly Cocking romilly.cock...@gmail.com Sent: Sunday, March

Re: Re: how to set default route in jax-rs

2009-03-16 Thread Ty
Thanks, I'll give it a try. From: Alexander J. Perez Tchernov xas...@gmail.com Sent: Sunday, March 15, 2009 11:03 PM To: discuss@restlet.tigris.org Subject: Re: Re: how to set default route in jax-rs An simple solution might be to introduce JAX-RS

Re: Handling a URI fragment identifier component using jax-rs?

2009-03-16 Thread Ty
Thanks Simon. Another read on the RFC' and I see that I must have mis-read the first time. I was hoping to use the fragment identifier as a general way of referencing another resource. Looks like I'll have to use the query component. From: Simon

RE: OSGi vs. Service Provider patterns

2009-03-16 Thread David Fogel
Hi Rob- I've been struggling with the same problem. In fact, I'm guessing that this Service Provider classpath/classloader hackery (made into a crazy best-practice by its inclusion in JDK 6 as the java.util.ServiceLoader) is one of the main reasons why OSGi isn't as widely adopted as it should

Re: Is org.restlet.Client thread safe?

2009-03-16 Thread Tim Peierls
Yes, or at least the most recent version of it in the trunk is. But I just noticed that that version unnecessarily declares the helper field as volatile when it could be final. Jerome, Thierry -- could you enter an issue for this? I'm having trouble wrangling the issue tracker. --tim On Sun, Mar

Re: Set content-location header ??

2009-03-16 Thread Paul Austin
You also have so set the downloadable flag Paul On 14-Mar-09, at 3:42 PM, Ty wrote: Hi, Restlet (1.2M) is refusing to set the content-location header and I can't seem to find a method that will let me set it. Does anyone know how to set the content-location header? Here's the code

RE: InterruptedException when stopping component

2009-03-16 Thread Romilly Cocking
I've found a workaround; I start another thread and send stop() to the container after a 100 ms delay. It works, but it's not pretty. Is there a better solution? -- http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=1326444

Re: OSGi vs. Service Provider patterns

2009-03-16 Thread Rob Heittman
Thanks for that really thorough response. At this point, mentally I'm breaking the problem into two categories: 1) Libraries/projects who are receptive to OSGi compatibility and are interested in supporting OSGi. Restlet is one of these. Here we can work with/within the project to include

RE: Restlet and OSGi Issues

2009-03-16 Thread Jerome Louvel
David, Thanks, we are on the same track! I've fix the javax.xml.xpath import and a couple of others missing. But I haven't tested it outside Eclipse due to lack of time. Do you have some usage instructions for this, like which JARs should be in the classpath and which class to launch with

RE: GWT Restlet Callback

2009-03-16 Thread Jerome Louvel
Hi Scooter, In the HttpClientConverter, we just create an anonymous inner class like that: // Send the request to the client httpCall.sendRequest(request, response, new Callback() { public void onEvent(Request request, Response response) {

RE: Re: Restlet (Client side) + Jersey (Server side): is it possible?

2009-03-16 Thread Guilherme Maranhão
Thanks a lot! -- http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=1333402

RE: Grizzly NIO examples

2009-03-16 Thread Jerome Louvel
Hi Bora, The benefit can be at two levels: 1) By leveraging NIO while handling the socket IO, Grizzly doesn't need to dedicate one thread per accepted request, therefore potentially increasing the scalability of your component. Note that the Jetty connector can also use NIO in a similar way. 2)

RE: jax-rs example throwing exception: please help

2009-03-16 Thread Jerome Louvel
Hi Ty, Note that in recent snapshots (1.1 and 1.2), there is no a lazy loading of JAX-RS providers so it won't complain about the javax/activation/DataSource missing anymore. Just be sure to include the JARs you do need in order to have the corresponding providers available to your JAX-RS

RE: Is org.restlet.Client thread safe?

2009-03-16 Thread Jerome Louvel
Hi Tim, No need for an issue for such a small change. Now checked in SVN trunk! Best regards, Jerome Louvel -- Restlet ~ Founder and Lead developer ~ http://www.restlet.org/ http://www.restlet.org Noelios Technologies ~ Co-founder ~ http://www.noelios.com/ http://www.noelios.com _

RE: Set content-location header ??

2009-03-16 Thread Jerome Louvel
Hi Ty, Paul is correct, you need to use the Representation#downloadable property instead. See this table for all the mappings: Mapping HTTP semantics http://wiki.restlet.org/docs_1.2/13-restlet/27-restlet/130-restlet.html Best regards, Jerome Louvel -- Restlet ~ Founder and Lead developer ~

RE: Re: Restlet (Client side) + Jersey (Server side): is it possible?

2009-03-16 Thread Jerome Louvel
Hi Guilherme, If you like the JAX-RS API, note that Restlet also have its own implementation that you can use as an alternative to Jersey. See more information here: JAX-RS extension http://wiki.restlet.org/docs_1.1/13-restlet/28-restlet/57-restlet.html Best regards, Jerome Louvel -- Restlet ~

RE: Broken pipes

2009-03-16 Thread Jerome Louvel
Hi Peter, This exception is thrown when your client has closed the socket. This might be the case due to the browser timing out the connection due to lack of activity. How much time does it take you to process the request and generate your response? If this time is too long, or increases upon

RE: InterruptedException when stopping component

2009-03-16 Thread Jerome Louvel
Hi Romilly, Your first solution doesn't work because when you stop the component, it stops the connectors and shuts downs the active socket connections including the one serving your shutdown request. Your second solution sounds good to me. Make sure you leverage the Application#taskService to

RE: OSGi vs. Service Provider patterns

2009-03-16 Thread Jerome Louvel
Hi guys, Just a quick reply to mention that our Restlet OSGi activator does use the META-INF/services pattern. See code here: http://restlet.tigris.org/source/browse/restlet/trunk/modules/org.restlet/sr c/org/restlet/engine/internal/Activator.java?view=markup Peter Kriens also suggested that

Re: InterruptedException when stopping component

2009-03-16 Thread Romilly Cocking
Thanks, Jerome, It's good to know I was not too far off course. What is the benefit of using the Application's getTaskService method, as opposed to creating a Thread myself and then starting my component-stopper? I'm currently just using a Component + some Restlets, and would prefer not to

Re: OSGi vs. Service Provider patterns

2009-03-16 Thread lukewpatterson
lukewpatterson wrote: I've been searching for answers to the same questions. I commented on this blog entry: http://www.sonatype.com/people/2009/03/the-future-of-maven-osgi-join-the-tycho-users-mailing-list/ Sorry, I should have clarified that the most relevant overlapping issue from

RE: Re: Restlet (Client side) + Jersey (Server side): is it possible?

2009-03-16 Thread webpost
thanks Is there a jar file that contains only the restlet-gwt classes? the files in http://www.restlet.org/downloads/ have about 15M!! Why are they so big? do they have all the engine to run restlet? --

POST redirect to GET

2009-03-16 Thread Cliff Binstock
My apologies for asking what I think should be obvious. I am using POST to upload files. Works great. When I'm done, I want to return to a standard GET URL. To do this, I am using: response.redirectTemporary(newLoc); My new location is a restlet route (of

Re: POST redirect to GET

2009-03-16 Thread Erik Beeson
Go back and reread the HTTP spec. In particular, read about 303 See Other on the first hit here: http://www.google.com/search?q=http+status --Erik On Mon, Mar 16, 2009 at 3:57 PM, Cliff Binstock cliff.binst...@coyotereporting.com wrote: My apologies for asking what I think should be

RE: POST redirect to GET

2009-03-16 Thread Cliff Binstock
Thank you! Cliff Binstock Coyote Reporting _ From: Erik Beeson [mailto:erik.bee...@gmail.com] Sent: Monday, March 16, 2009 4:09 PM To: discuss@restlet.tigris.org Subject: Re: POST redirect to GET Go back and reread the HTTP spec. In particular, read about 303 See Other on