RE: Streaming multiple large data files through Restlet

2008-03-07 Thread Jerome Louvel
Hi all, The Jetty connector is the most robust one for now. I would recommend it for production and scalability purpose. The Jetty connector itself can be configured in different NIO/BIO modes. See this page for details: http://www.restlet.org/documentation/1.1/connectors#jetty Concerning the

RE: Issue 428 (POST seems to throw a 500 error code)

2008-03-07 Thread Jerome Louvel
Hi Aron, You're welcome! I've added a note to the issue as suggested. Also, I've entered a RFE: Use more obvious logger names http://restlet.tigris.org/issues/show_bug.cgi?id=459 See the description inside, I'm not 100% sure we should do the change yet. Best regards, Jerome -Message

RE: Shut down a Restlet server using kill?

2008-03-07 Thread Jerome Louvel
Hi Aron, I suggest instead that you leverage the Tanuki Wrapper: http://wrapper.tanukisoftware.org/ It provides you an Unix daemon that you can start/stop/restart easily and many other features. We happily use it in production and it is also included in the Restlet distribution. Best regards,

Re: Trouble with serving static files when using Tomcat.

2008-03-07 Thread Thierry Boileau
Hello Robert and Rob, I assume this is not pretty clear... The response is located in the javadoc of the ServerServlet class [1]. By default, this servlet creates a very simple component with no connectors and attaches your application to it. But just because the Directory requires the FILE

Re: Trouble with serving static files when using Tomcat.

2008-03-07 Thread Rob Heittman
Oh, I see, Rob did this: Component component = new Component(); while running in a servlet. Missed that! D'oh!

Re: Shut down a Restlet server using kill?

2008-03-07 Thread Kevin Conaway
You should just down a Restlet server like any other java application, either with QUIT on unix or Control-Break on Windows. That will allow the jvm to gracefully shutdown by running finalizers and shutdown hooks. Sincerely, Kevin Conaway On Thu, Mar 6, 2008 at 2:28 PM, Aaron Crow [EMAIL

Re: Shut down a Restlet server using kill?

2008-03-07 Thread John D. Mitchell
On Thu, Mar 6, 2008 at 11:28 AM, Aaron Crow [EMAIL PROTECTED] wrote: Is it ok to shut down a Restlet server using Unix kill? Depends on your application's specifics. For example, the oldest Restlet-based production code that I have is an authentication gateway that I would just kill outright.

Re: Streaming multiple large data files through Restlet

2008-03-07 Thread John D. Mitchell
On Thu, Mar 6, 2008 at 7:14 AM, Jon Blower [EMAIL PROTECTED] wrote: [...] We have an existing RESTful web application that involves clients downloading multiple streams of data simultaneously. Our current implementation is based on servlets and we are experiencing scalability problems

Re: Yes, Virginia, REST *is* stateless (was: Session)

2008-03-07 Thread John D. Mitchell
On Thu, Mar 6, 2008 at 3:07 PM, William Pietri [EMAIL PROTECTED] wrote: John D. Mitchell wrote: A better way, IME, to think of this stuff is using the notion of proposals but we're now fully divorced from anything Restlet specific so I'll shut up now. Please don't! Getting

Re: Streaming multiple large data files through Restlet

2008-03-07 Thread Jon Blower
Hi John (et al), Thanks very much to everyone for very helpful responses on this. Perhaps I should go into a bit more detail about our application. We are writing an application for climate scientists that allows them to run climate simulation codes on remote compute clusters. The codes produce

Re: restlet + spring --- managed resources

2008-03-07 Thread Brian Donnovan
Rhett Sutphin rhett at detailedbalance.net writes: Hi Brian, On Mar 6, 2008, at 10:04 AM, Brian Donnovan wrote: thanks for the hint, i will try it that way! just one thing, i looked at the springresource class and it seems to not have much in common with the original resource

Re: restlet + spring --- managed resources

2008-03-07 Thread Rhett Sutphin
Hi Brian, On Mar 7, 2008, at 9:50 AM, Brian Donnovan wrote: Rhett Sutphin rhett at detailedbalance.net writes: Hi Brian, On Mar 6, 2008, at 10:04 AM, Brian Donnovan wrote: thanks for the hint, i will try it that way! just one thing, i looked at the springresource class and it seems to not

Root URIs under Windows

2008-03-07 Thread Paul J. Lucas
Does anybody use Restlet under Windows? I want my server's root URI to be a directory like: C:\Documents and Settings\pjl\My Documents\My Pictures\ That's held in a File variable. I convert that to a URI then to a String like: String rootURI = rootDir.toURI().toString();

Re: Trouble with serving static files when using Tomcat.

2008-03-07 Thread Robert Bruggner
Thierry, Jerome, and Rob - After extending mapping the custom Component, I can now attach static directories. On a side note, I had been using the Restlet 1.0.8 release but for Thierry's fix, I needed to use the 1.1 release. Many thanks for your help guys, I really appreciate it. -Rob-

Read simple POST content

2008-03-07 Thread Peter Neubauer
Hi, I am trying to get over image data from a mobile phone using a very simple model where the data is sent as, according to the restlet Request headers, Content-Type: application/octet-stream Transfer-Encoding: chunked And the code sending it from the phone looks like conn = (HttpConnection)

Re: Read simple POST content

2008-03-07 Thread Stephan Koops
Hello Peter, do you tried to close the outputStream? I don't know if the OutputStream created by the HttpConnection handles the chunked encoding, or if you must do this by hand. Do you thought to use the Restlet on client side? Or is this to big for the mobile phone? BTW, if you know the

Re: Shut down a Restlet server using kill?

2008-03-07 Thread Aaron Crow
Hi John, So as far as server app code dealing with a forced shutdown, may I ask what you recommend for situations where there's some task running that really should be allowed to complete? For example, would you have the concept of an internal registry, where tasks are registered, and a

Re: Shut down a Restlet server using kill?

2008-03-07 Thread Aaron Crow
Thanks Jerome, I had not heard of the Tanuki Wrapper. Very cool! Jerome Louvel [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hi Aron, I suggest instead that you leverage the Tanuki Wrapper: http://wrapper.tanukisoftware.org/ It provides you an Unix daemon that you can

Re: Root URIs under Windows

2008-03-07 Thread cleverpig
I think it's helpful: Application application=new Application(component.getContext()){ @Override public Restlet createRoot(){ //directory where static web files live final String

Re: Root URIs under Windows

2008-03-07 Thread Paul J. Lucas
On Mar 7, 2008, at 5:12 PM, cleverpig wrote: public Restlet createRoot(){ final String DIR_ROOT_URI=file:///E:/eclipse3.1RC3/workspace/RestletPractice/static_files/ ; Yes, I already know how to do the code. That's not my question. The differences between your

Wap Media/Mime Types

2008-03-07 Thread code dude
Hi list , I have written a small program which returns WAP content , I want to sent mime type response as wap so that my mobile users can use it I can find MediaType as Wap pl let me know how i can set it to wap ?? Redards , cc

Re: Shut down a Restlet server using kill?

2008-03-07 Thread John D. Mitchell
On Fri, Mar 7, 2008 at 4:45 PM, Aaron Crow [EMAIL PROTECTED] wrote: Hi John, Howdy! So as far as server app code dealing with a forced shutdown, may I ask what you recommend for situations where there's some task running that really should be allowed to complete? For example, would you

ModificationDate of representation of static resource using CLAP protocol

2008-03-07 Thread keke
Hi All, I tried to serve my static files using Restlet Directory component. I use CLAP as the scheme of root url of Directory. Everything works fine for me expect that modification date of representation was not set by ClapClientHelper. I am not sure whether this is the intentional design or

Re: ModificationDate of representation of static resource using CLAP protocol

2008-03-07 Thread Rob Heittman
Does the classloader expose modification dates on classpath resources? On Sat, Mar 8, 2008 at 2:11 AM, keke [EMAIL PROTECTED] wrote: Everything works fine for me expect that modification date of representation was not set by ClapClientHelper.

Re: ModificationDate of representation of static resource using CLAP protocol

2008-03-07 Thread keke
Actually classLoader gets a URL of a resource. URL url = classLoader.getResource(Reference.decode(path)); We can either get the last modified date by calling URL.openConnection ().getLastModified() or create a File instance out of that URL. On Sat, Mar 8, 2008 at 3:16 PM, Rob Heittman [EMAIL