Re: Dynamic resource classes

2010-02-26 Thread Rhett Sutphin
Hi Tariq, On Feb 26, 2010, at 5:33 AM, webp...@tigris.org wrote: > I would like to know why instances of "resource" classes cannot be > dynamically created at runtime like the "application" class. Resources _are_ instantiated dynamically at runtime -- one instance per request (assuming that

Re: How to write an Universal redirector

2010-02-26 Thread Tal Liron
Hi Thierry -- The documentation for the URI template variables is so deeply hidden (Resolver API doc) that I always have trouble finding it. My recommendation is to put it somewhere much more obvious, possibly even in the "first Resource" tutorials, and to document it more with examples. It's

Random Grizzly NIO Exception

2010-02-26 Thread Sopasakis Pantelis
Dear all, I'm using Restlet 2.0 m7 and I have a resource that returns a large URI list (about 1 thousands URIs or more) upon a GET request. In general everything seem to work without bugs in my application except for that resource which every now and then throws an IOException with message "Un

Serve file from blob column in database

2010-02-26 Thread webpost
I would like to have my restlet serve the content of a blob column in database as it were a file identified by the URI. After getting the blob content as a byte array, I could not figure out how restlet framework is intended to be used to create a representation that contains the byte array. S

Re: Restlet JAX-RS question

2010-02-26 Thread Stephan Koops
Hi Fabio, hi Jerome, hi Thierry, cool Fabio, that you want allow the the Servlet artifacts in JAX-RS. Every help is welcome. I think it is important, that the JAX-RS extension has no dependency to the Servlet API, so we need to have another way. @ Jerome and Theirry: Do you think it useful to c

RE: How to write an Universal redirector

2010-02-26 Thread asdfasdf
Hi, It is really nice of you to help me. It is quite possible, that my problem is in the project set-up. The RestLet libraries are from 25.2.2010. I have minimized the Eclipse project to a single onModuleLoad function and the minimum of server-side classes (2). What it large makes are the librari

Re: ConcurrentModificationException from Resource

2010-02-26 Thread Bruno Harbulot
Hi, The groupIds in the Maven repository have changed after 2.0M3 to take into account the notion of editions (JEE, JSE, GWT, Android). You can use org.restlet.jee or org.restlet.jse (for example) instead of org.restlet. Best wishes, Bruno. Ruben Hernando wrote: > > Hi, > > I can't see that

RE: ConcurrentModificationException from Resource

2010-02-26 Thread Ruben Hernando
Hi, I can't see that version in maven repository (latest is 2.0M3), but next week I'll try it. Even though, yesterday we tried setting singleton="false" into the definition of the resource's bean in spring and it seems to work fine. I mean, it doesn't fail, but I don't know if it's the best s

RE: ConcurrentModificationException from Resource

2010-02-26 Thread Jerome Louvel
Hi Ruben, Could you try again with 2.0 M7 and send us the stack trace that you get (if you get one)? It will be easier for us to fix any related bug. Best regards, Jerome Louvel -- Restlet ~ Founder and Technical Lead ~ http://www.restlet.org Noelios Technologi

RE: Re: Including DIGEST auth ChallengeResponse with initial request

2010-02-26 Thread webpost
Thierry, Thanks for the reply. We are in sync as far as your description goes. The server is a restlet server where I setup the authentication guard as follows ArrayList domainRefs = new ArrayList(); domainRefs.add(new Reference("/")); DigestAuthenticator da = new DigestAuthenticator(get

RE: firstResource tutorial: item put vs. items post

2010-02-26 Thread Jerome Louvel
Hi Daniel, To complete, PUT method has precise semantics saying that it can be retrieved if needed without side-effect (it is idempotent), which isn’t the case of POST for example. Therefore, in case on network error, the ClientResource class might be able to automatically retry a PUT reques

RE: Including DIGEST auth ChallengeResponse with initial request

2010-02-26 Thread Jerome Louvel
Hi Rich, In addition to Thierry’s answer, we recently added support for the Authentication-Info HTTP header which can be used for preemptive DIGEST authentication. There is an org.restlet.data.AuthenticationInfo class and the Response#authenticationInfo for this. See the related issue f

RE: Including DIGEST auth Response with initial request

2010-02-26 Thread Jerome Louvel
FYI, see follow-up thread here: http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=24520 86 -Message d'origine- De : webp...@tigris.org [mailto:webp...@tigris.org] Envoyé : jeudi 18 février 2010 18:52 À : discuss@restlet.tigris.org Objet : Including DIGEST auth Respon

RE: Restlet Security - Securing URLs

2010-02-26 Thread Jerome Louvel
Hi Nirav, Thanks for your feed-back. The new security API is still fresh, so we also look forward to hearing how it is applied in the field and what are its limitations. Regarding authorization, there are generally two approaches: 1) Coarse-grained authorization You configure some Author

Re: Object serialization with GWT

2010-02-26 Thread Xavier Méhaut
Thanks Jerome for having spent time to find the bug ; we'll update our code once the last milestone of our product will be achieved, ie when we will have less pressure ;) Best regards Xavier 2010/2/26 Jerome Louvel > Hi Xavier, > > > > As you may have noticed, we were able to find the bug in Re

Dynamic resource classes

2010-02-26 Thread webpost
Hello, I would like to know why instances of "resource" classes cannot be dynamically created at runtime like the "application" class. The idea is that I would like to initialize the resource class instance depending on different data that is acquired during runtime, and hence handle interacti

RE: Object serialization with GWT

2010-02-26 Thread Jerome Louvel
Hi Xavier, As you may have noticed, we were able to find the bug in Restlet/GWT thanks to your simple project. I hope you’ll have time to try again with a recent snapshot or with the upcoming 2.0 RC1 version. Best regards, Jerome Louvel -- Restlet ~ Founder and Technical Lead ~

RE: Jackson extension replaces XStream extension?

2010-02-26 Thread Jerome Louvel
Hi Juan Carlos, Recently, GAE added support for JAXB, so Thierry added our JAXB extension to the Restlet edition for GAE. This could provide a nice way to handle XML serialization in addition to Jackson for JSON. I think there are also bridges from JAXB to JSON that you could explore... Best r

RE: XML mapper for GWT

2010-02-26 Thread Jerome Louvel
Hi Harald, My initial idea was to not use the ConverterService at runtime in GWT but instead provide something similar at compilation time. Instead of using ObjectRepresentation in the proxy code, we would use PiritiXmlRepresentation or PiritiJsonRepresentation instead. This would be based from

RE: How to write an Universal redirector

2010-02-26 Thread Jerome Louvel
Hi ab, It would help if you could package a small project reproducing your issue. There is really nothing in Restlet that should prevent you from doing this reverse proxy scenario. Best regards, Jerome Louvel -- Restlet ~ Founder and Technical Lead ~ http://www.restlet.org Noelios Technologies ~

RE: Re: Access to HttpSession from Restlet ...

2010-02-26 Thread Jerome Louvel
Hi all, I'm fine with exposing the SSL session ID as a request attribute if that can be useful. Bruno, feel free to provide a patch for that purpose! If you need to build an alternative to Servlet sessions in Restlet, I could check this RFE: "Alternatives to Servlet sessions" http://restlet.tig

RE: Starting/stopping restlets

2010-02-26 Thread Jerome Louvel
Hi Tal, When a call reaches a Restlet, this Restlet is automatically started if it wasn’t before. In your case, you need to detach them from the whole routing chain. Note that in recent milestones, we have implemented cascading start/stop propagation. So when you start an application, it at

RE: rejectedExecution

2010-02-26 Thread Jerome Louvel
Hi Maxime, In Restlet 2.1, we will improve the default connector by reducing thread usage using asynchronous NIO processing. Currently, we have to block at least one thread per active connection or two when pipelining is enabled. In case you encounter issues down the road, it is always possible

RE: "Only HTTP or HTTPS resource URIs are allowed here"

2010-02-26 Thread Jerome Louvel
Hi Rickard, Thanks for your report! I was able to reproduce it. In fact, it occurs because the client connectors were not automatically resolving relative URIs, even when a base URI was provided. A fix has been checked in SVN trunk. Note that the new internal HTTP connector available in M7 didn'

RE: Problems Creating Items using the addEntity Method

2010-02-26 Thread Jerome Louvel
Hi Jaime, We've been so busy recently... especially updating the Data Services extension for Thierry (now called OData). Could you test again with a recent Restlet 2.0 snapshot and let us know if you still have the issue? If so, Thierry will fix it early next week as we are getting close to our

RE: M7 and TunnelService fix still not working for IE7/8 (or so it seems)

2010-02-26 Thread Jerome Louvel
Hi Fabian, It seems that IE6 doesn't use "*/*" but a longer Accept HTTP header so we need to be careful. One option you have is overriding the default "accept.properties" file from Restlet with your own to do tests. You need to place it in a "/org/restlet/service/accept.properties" location, a

RE: restlet + spring + camel + tomcat

2010-02-26 Thread Jerome Louvel
Hi Bruno, Any success? Restlet can work fine in Servlet containers like Tomcat. See the POM of the Servlet extension used as a bridge: http://maven.restlet.org/org/restlet/jee/org.restlet.ext.servlet/2.0-M7/org. restlet.ext.servlet-2.0-M7.pom Best regards, Jerome Louvel -- Restlet ~ Founder and

RE: restlet 2.0, spring 3.0 and log4j 1.2.15

2010-02-26 Thread Jerome Louvel
Hi Sriram, It seems like the fact that we are using a bridge class confuses Slf4j or log4j about the actual invoking code... See related discussion with workarounds: http://stackoverflow.com/questions/1486233/java-logging-show-the-source-line -number-of-the-caller-not-the-logging-helper-m You mig

RE: not able to update an item on wcf .net dataservice using restlet

2010-02-26 Thread Jerome Louvel
Hi Jaime, Could you send us the differences you observed in term of HTTP headers between Restlet and .NET? You can also try with a recent Restlet 2.0 snapshot as we are upgrading our Data Services extension (now called org.restlet.ext.odata) to cover the latest enhancements in the specification.

RE: Delete temp file automatically after it's been downloaded

2010-02-26 Thread Jerome Louvel
Hi Fabian, With Restlet 2.0 M7 and using the internal HTTP connector, you can register an "onSent" callback on the response. See ServerResource#setOnSent(Uniform) method. Also, I have just checked in SVN trunk a change that makes this callback work with other HTTP connectors. That should help y

RE: Restlet and OSGi Issues

2010-02-26 Thread Jerome Louvel
Vikash, A Restlet Router can dynamically attach and detach routes, so there is nothing that technically prevents you from leveraging life cycle events of OSGi bundles to attach/detach Restlet resources to a parent Restlet applications. This is all OSGi plumbing (not necessarily easy!). Again, we

RE: Re: Adding/removing JAX-RS resources at runtime

2010-02-26 Thread Jerome Louvel
Hi Vikash, We had feedback from people able to successfully integrate OSGi and Restlet to achieve such dynamic attachment of applications. See those posts for example: http://blog.noelios.com/2008/05/05/nasa-launch-restlet-on-osgi-orbit/ http://bryanhunt.wordpress.com/2009/11/23/updating-ensemble-

RE: [SOLVED] Problem with missing connector for WAR running gwt example as stand alone Java application

2010-02-26 Thread Jerome Louvel
Hi Stefan, The WAR pseudo-protocol is currently only supported when deploying your Restlet in a Servlet container. Your solution looks good. Sometimes, people leverage the CLAP pseudo protocol which is based on the classpath resources which can work consistently in both Servlet and standalone en

RE: newbie question

2010-02-26 Thread Jerome Louvel
Hi Brian, Restlet has various ways to deal with XML. You should look at the XML, XStream, JiBX, JAXB extensions and the related technologies. On this page, we also recommend a book on XML processing in Java that might help: http://www.restlet.org/documentation/books Best regards, Jerome Louvel

RE: Cancelling request entity

2010-02-26 Thread Jerome Louvel
Salut Nicolas, Thanks for reporting this with a test case. We initially only implemented this feature on the internal HTTP connector. After a bit of refactoring I extended this to other connectors, including Simple. Changes are in SVN trunk. Note that the method actually closes the underlying so