Why so few interfaces???

2009-12-11 Thread Conor Moran
Hi I'm new to restlet and was playing with some of the introductory examples and looking at the source code for the project. I'm evaluating it for use on a current project. One thing that leaps out at me is a lack of (java) interfaces. Just for curiosity sake, would like to know: * Has Jerome got

Re: Why so few interfaces???

2009-12-11 Thread Thierry Boileau
Hello Conor, >One thing that leaps out at me is a lack of (java) interfaces. I suppose you point out the fact that there is only a few interfaces. >* Has Jerome got something against interfaces? Oh, no! :) >* Was the code developed using TDD techniques? (I haven't come across any unit >tests

Re: GAE + Restlet + Spring

2009-12-11 Thread Thierry Boileau
Hello Jim, I can say, that the servlet is explicity removed from the jar, but I don't know why... I check that. Best regards, Thierry Boileau > Hey All, > > Started working with GAE + Restlet by following instructions on the > wiki > (http://wiki.restlet.org/docs_2.0/13-restlet/275-restlet/

Re: GAE 2.0m6 org.restlet.ext.httpclient.jar broken

2009-12-11 Thread Thierry Boileau
Hello, there is a bug in the Engine clas, why causes an infinite loop when an exception is thrown during the instantiation of the Engine. Especially this occurs when the connectors are discovered. This bug has been fixed in the current snapshot. I will check also why there is a problem with th

Re: Why so few interfaces???

2009-12-11 Thread Stephan Koops
Hi Conor, > * Was the code developed using TDD techniques? (I haven't come across any > unit tests yet...) > There is an own test project (maybe only in the SVN repository) with a lot of tests. To the interfaces I can't say much. There were discussions about this on the mailing lists one or

RE: Re: GAE 2.0m6 org.restlet.ext.httpclient.jar broken

2009-12-11 Thread webpost
Thanks for your work! Sebastien -- http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2429767

Re: GAE 2.0m6 org.restlet.ext.httpclient.jar broken

2009-12-11 Thread Thierry Boileau
Hello Sébastien, as far as we know the Apache HTTPClient can not be used on the gae platform due to the fact that it uses thread and thread groups which is not allowed. Thus, it seems that the internal Restlet client connector was use instead by your application... Best regards, Thierry Boile

Re: Why so few interfaces???

2009-12-11 Thread Tim Peierls
There's an issue about this with links to discussions: http://restlet.tigris.org/issues/show_bug.cgi?id=384 --tim On Fri, Dec 11, 2009 at 7:40 AM, Stephan Koops wrote: > Hi Conor, > > * Was the code developed using TDD techniques? (I haven'

Re: GAE + Restlet + Spring

2009-12-11 Thread Thierry Boileau
Hi Jim, >Is there any reason why it's missing? Is it incompatible with GAE? not at all... Thanks a lot for your report, the SpringServerServlet is now part of the gae edition! Best regards, Thierry Boileau > Hey All, > > Started working with GAE + Restlet by following instructions on the >

Opening transactions per resource

2009-12-11 Thread Jean-Philippe Steinmetz
Hello all, It's been a long time since i've last posted. Been pretty happily working with restlet 1.1 for some time now. I've come across an issue/optimization that i'm trying to solve that i'd like to get your thoughts on. We are using Spring's AOP and Transaction Management to handle a lot of o

Re: Opening transactions per resource

2009-12-11 Thread Tim Peierls
Why not move the functionality that you currently have in the init method into each of the HTTP method handlers (and remove this functionality and the @Transactional annotation from init)? --tim On Fri, Dec 11, 2009 at 2:57 PM, Jean-Philippe Steinmetz < caskate...@gmail.com> wrote: > Hello all,

Re: Opening transactions per resource

2009-12-11 Thread Jean-Philippe Steinmetz
Good question. We use the init to verify the resource actually exists as well as handling other bits. So the question is is mainly in interest of finding an easier way to get it done that won't cause us to redo a lot of boiler plate code all over the method handlers. On Fri, Dec 11, 2009 at 12:37

Re: Opening transactions per resource

2009-12-11 Thread Tim Peierls
Wouldn't it be just a matter of calling a single private method at the top of each of the method handlers? --tim On Fri, Dec 11, 2009 at 4:49 PM, Jean-Philippe Steinmetz < caskate...@gmail.com> wrote: > Good question. We use the init to verify the resource actually exists as > well as handling o

Re: Opening transactions per resource

2009-12-11 Thread Jean-Philippe Steinmetz
Like I said we could do that though it still requires more than one line of code in each function. We currently use init to determine resource available and setting the allowed actions (i.e. allowPost) in the init which as far as I know can only be done there. On Fri, Dec 11, 2009 at 1:52 PM, Tim

Re: Opening transactions per resource

2009-12-11 Thread Tim Peierls
I guess you could try sticking @Transactional on the handle method of the Finder that creates the resource. You'd have to subclass Finder: public class TransactionalFinder extends Finder { ... @Transactional public void handle(Request req, Response rsp) { super(req, rsp); } } I haven't ch

Re: Opening transactions per resource

2009-12-11 Thread Jean-Philippe Steinmetz
I'll give that a shot thanks. On Fri, Dec 11, 2009 at 2:52 PM, Tim Peierls wrote: > I guess you could try sticking @Transactional on the handle method of the > Finder that creates the resource. You'd have to subclass Finder: > > public class TransactionalFinder extends Finder { > ... > @

Re: Opening transactions per resource

2009-12-11 Thread Jean-Philippe Steinmetz
That works very nicely. Thanks for the help! On Fri, Dec 11, 2009 at 2:52 PM, Tim Peierls wrote: > I guess you could try sticking @Transactional on the handle method of the > Finder that creates the resource. You'd have to subclass Finder: > > public class TransactionalFinder extends Finder { >