Re: Restlet Jax-RS extension and OSGi

2009-03-23 Thread Stephan Koops
Hi David, I've had no time to look into my own code or work with it, so I forget, that the injection was changed. Use a field (or parameter) of type javax.ws.rs.ext.Providers, annotate it with @Context and use method getContextResolver(...) . I hope, that's the right solution. As said, I've

Restlet vs RestEasy

2009-03-23 Thread Evan Worley
Hi All, I recently stumbled across http://jboss.org/resteasy and was wondering if anyone has done a compare/contrast between Restlet and RestEasy? I've been very pleased with Restlet in the past year that I've been using it, and am curious how RestEasy would stack up. It would be really great

Re: Restlet Jax-RS extension and OSGi

2009-03-23 Thread David Fogel
Hi Stephan- Thanks for taking a look at this. Yes, I did see that it would be possible to get the Providers object injected into my resource classes. However I don't think that is the recommended way to accomplish this with Jax-Rs. (from what I remember, I think the Providers object is often

Re: Restlet vs RestEasy

2009-03-23 Thread David Fogel
Hi Evan- RestEasy is an implementation of the JAX-RS (JSR-311, Restful Web Services) specification. It is roughly in the same category as the JAX-RS reference implementation called Jersey (jersey.dev.java.net). Both of these are usually used in a Servlet environment. Restlet also has an

RE: Help!!!!! Restlet ?!?!?!?!?

2009-03-23 Thread webpost
-Our problem is to understand how makes the client thet have to get or post a resource to know resource's location and therefore the final url to use in the GET or POST HTTP messages to refer to the correct locations. --

EJB and restlet

2009-03-23 Thread webpost
Hi I'm trying to use an existing EJB of mine in a restlet context. I'm quite noob in restlets so I'm not even sure this is supposed to work. When using @EJB annotation to inject the ejb reference I get a null-pointer. The EJB is deployed properly on my Glassfish application server, and the

X509 certificate authentication

2009-03-23 Thread webpost
Hi All I'm prototyping an application which will use user and server certificates extensively: every client request and server response must be ciphered and digitally signed. The ciphered part is easy with https, but ¿how do I accomplish the second part? I'm a bit confused and I think of

Re: EJB and restlet

2009-03-23 Thread John D. Mitchell
On Monday 2009.03.23, at 10:38 , webp...@tigris.org wrote: [...] I'm trying to use an existing EJB of mine in a restlet context. I'm quite noob in restlets so I'm not even sure this is supposed to work. When using @EJB annotation to inject the ejb reference I get a null- pointer. The EJB is

Re: Resource factories

2009-03-23 Thread Tal Liron
Thanks, Tim. This is a reasonable workaround -- creating a factory where one isn't there. And Guice adds some elegance to your solution. Another solution is simply to rewrite Finder entirely to use factories. This isn't hard. But it also goes against Restlet's current design. One of the very

Re: Resource factories

2009-03-23 Thread Rhett Sutphin
Hi Tal, On Mar 23, 2009, at 1:06 PM, Tal Liron wrote: Thanks, Tim. This is a reasonable workaround -- creating a factory where one isn't there. And Guice adds some elegance to your solution. Another solution is simply to rewrite Finder entirely to use factories. This isn't hard. But it

Re: Resource factories

2009-03-23 Thread Tal Liron
Good point, Rhett. Well, let me put it this way -- do you think the current Finder design encourages bad practices for Restlet users? -Tal Rhett Sutphin wrote: I don't think that subclassing Finder to be more factory-like goes against Restlet's design. The default finder is a

Re: Restlet Jax-RS extension and OSGi

2009-03-23 Thread Stephan Koops
Hi David, Yes, I did see that it would be possible to get the Providers object injected into my resource classes. However I don't think that is the recommended way to accomplish this with Jax-Rs. (from what I remember, I think the Providers object is often meant to be injected into other

Re: Resource factories

2009-03-23 Thread Rob Heittman
I'd be careful of judgement-words like bad practices since this implies some universal level of harm in all cases. I think the current Finder design is simplistic, flexible, and easy to implement. I think there is also room for a more structured base implementation that exposes some advantages

Re: Restlet vs RestEasy

2009-03-23 Thread Evan Worley
Thanks for sharing Dave, that is very informative. I would really like to see more of your sample projects using the various frameworks. Have you considered posting an article somewhere public? With RESTful approaches growing in popularity, I'm sure many people are wondering which framework to

EJB and Restlet

2009-03-23 Thread Runar Halse Kristiansen
Hi I'm trying to use an existing EJB of mine in a restlet context. I'm quite noob in restlets so I'm not even sure this is supposed to work. When using @EJB annotation to inject the ejb reference I get a null-pointer. The EJB is deployed properly on my Glassfish application server, and the

Re: Resource factories

2009-03-23 Thread Tal Liron
Ah, thanks, Rob. You've captured what I think is the main problem here: it has more to do with the Resource class than the Finder class specifically. Restlet expects extensions of class Resource to have a specific constructor. Of course, you don't have to implement that specific constructor --

RE: InputStream and InputRepresentation

2009-03-23 Thread vinoo
We are investigating some out of memory issues and we have narrowed down the issue to FileInputStream. So we would appreciate any help. Thanks. -- http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=1391718

Re: Resource factories

2009-03-23 Thread Rhett Sutphin
Hi Dave, On Mar 23, 2009, at 3:08 PM, David Bordoley wrote: Out of curiosity is there a reason why Resource isn't implemented as a subclass of Restlet? It seams like there is a lot of overhead in initializing a new Resource on every request especially when a lot of salient features such as

Re: Resource factories

2009-03-23 Thread Rob Heittman
In addition to what Rhett said ... one massively huge benefit of having Resources that are created per-request is that they need not be thread safe. Very few developers (:: cough :: except Tim) can do concurrency correctly every time. But I've spent most of the afternoon noodling over this

Re: Resource factories

2009-03-23 Thread Tal Liron
Thanks, Rob! I value your gut instinct in this. Perhaps, then, we can indeed move this over the code review side. Specifically, I would be very happy if you and others could take a look at the script extension I am working on in Restlet svn. It has two Resource-based classes that currently