Re: Commons Logging

2007-05-24 Thread Piyush Purang
Hi Adam, We already had a discussion on this topic. See http://thread.gmane.org/gmane.comp.java.restlet/905/focus=937 Cheers Piyush On 5/24/07, Adam Taft <[EMAIL PROTECTED]> wrote: Yes, I've read all that. Those links are well known. But please carefully read from the link you provided...

Re: Restlet 1.0.0 released!

2007-04-16 Thread Piyush Purang
Congratulations Jerome and Thierry, Keep up the good work. I know I haven't contibuted much lately but I do follow the discussions and hope to contribute more to the restlet community. Cheers Piyush Purang

Re: StackOverflowError

2007-03-08 Thread Piyush Purang
Perhaps this helps? http://63.246.22.60/browse/CONF-7573 On 3/8/07, Jonathan Hall <[EMAIL PROTECTED]> wrote: Hi, Just before I start to debug. Has anyone load tested an application yet? I'm getting StackOverflowError on 1.0rc5: Happens after about 1k requests on 1.6. SEVERE: Unhandled exce

Re: Tutorial, cleanup

2006-12-20 Thread Piyush Purang
HI Dave, I had the same issues .. it was cumbersome to always locate the java process and kill it. I have a shutdown restlet ... where it can be told in secs when to shutdown .. in my soln. it isn't a guarded restlet but I think it should be Ideally JMX would be the solution for stopping starti

Re: Java SE 6

2006-12-16 Thread Piyush Purang
Nice to be connected again .. so can answer emails finally.. I have already moved my project to SE 6... I like that fact that JAXB is part of the JDK too.. So I like JAXB and the Scripting engine.. I agree with Jerome on the time lines to move officially to Java 6. I just wanted to make sure th

Java SE 6

2006-12-11 Thread Piyush Purang
Hi, Do we move now? Supposed to be faster and hey i like that Mozilla rhino comes bundled! I don't see any migration efforts. I might be wrong on that though. Cheers Piyush

Re: Applications

2006-12-07 Thread Piyush Purang
Hi Jerome, At first I though that the first requirement would already have met because of a common container context... Here are the use cases.. 1) Sharing resources: Suppose I have a very expensive resource that is not only accessed (multiple times) but also managed within the same physical con

Applications

2006-12-07 Thread Piyush Purang
Hello, I have been thinking of what to expect from restlet applications. Here are two requirements that I can come up with that would be really great ... 1) A common application context for sharing between applications. 2) Hierarchical applications. In order to be able to selectively overrride r

Re: Restlet 1.0 beta 21 released

2006-11-26 Thread Piyush Purang
hi Jerome, shouldn't that be b21 in the download link?

Re: authentication.

2006-11-17 Thread Piyush Purang
Hi Dave, I implemented an authetication service + session manager that timed out (configurable value) authenticated sessions. But my session manager used a manager id in the url instead of a cookie. I can provide something on monday or so .. this weekend i don't have access to my laptop :)

Re: authentication.

2006-11-17 Thread Piyush Purang
Hi Dave, I think if you use http basic authentication (as the tutorial example uses) only way to prompt for authentication again is if the user accesses a resource in another realm (where he hasn't already been authenticated once) or to close and start the browser again. One option that i know

Re: name conflicts

2006-11-17 Thread Piyush Purang
Dave, Hmm this is tricky .. I think I never encountered them while I never worked with the set of classes you mention. Let me try and look at it from another perspective. I googled "class Handler". As expected lots of entries (4,120,000). So should Cocoon rename its Handler class to CHandler? I'

Re: name conflicts

2006-11-17 Thread Piyush Purang
I use netbeans too and it behaves just like eclipse it proposes potential imports and you import one. Till now I haven't had this problem of direct conflict with java(x).* packages. Dave are you referring to a sun.* package? Could you please give a specific example? Checkstyle can check for fol

Re: equals and hashcode

2006-11-16 Thread Piyush Purang
Hi Chris, Yes, I evaluated it (eclipse 3.2.1 can do that) and used one of the generated hashCode (in a hurry) but equals isn't ideal!. I wouldn't touch it with a barge pole :) especially this piece of code if (getClass() != obj.getClass()) return false; See http://www.art

equals and hashcode

2006-11-15 Thread Piyush Purang
Hi Jerome, I saw the implementation of equals for cookie and have to admit I was almost shocked :) The code brings out to the fore the following phrases/sentences from the Object#equals and hashcode contracts Object#equals 1.1 equals method for class Object implements the most discriminating po

Re: New snapshot of beta 21

2006-11-15 Thread Piyush Purang
Hi Jerome, Maybe it is important to warn the fact that the DateUtils formats are lists now instead of arrays ? the only public api that I changed.. And the fact that trying to modify system set dates will yield unsupportedoperationexception Cheers Piyush P.S: I am trying to compile latest chec

Re: patch for issues reported by findbugs for org.restlet

2006-11-15 Thread Piyush Purang
Hi Jerome, I messed up the parameter equals method here is the fix and the hash codes etc... You can review them. I used new templates that you provided and still the formatting is an issue while generating patches .. Cheers Piyush findbugs_build2.patch Description: Binary data

Re: patch for issues reported by findbugs for org.restlet

2006-11-15 Thread Piyush Purang
Hi Jerome, Cookie hashcode needs to be corrected asap (I presume cookies will end up in hashmaps quite often). Findbugs still issues 8 warning with respect to the mutability of java.util.Date objects which is a well known issue see (http://discuss.fogcreek.com/joelonsoftware3/default.asp?cmd=sho

patch for issues reported by findbugs for org.restlet

2006-11-14 Thread Piyush Purang
Hi Jerome, I tried fixing some of the issues. Cheers Piyush findbugs_build.patch Description: Binary data

Re: Re: monitoring an application

2006-11-14 Thread Piyush Purang
Yes, John this is a real world requirement this we are out for a coffee thingy :) Cheers Piyush

Re: monitoring an application

2006-11-13 Thread Piyush Purang
Hi Sumit, Yes! that shows that we are on course in the right direction .. it would be an interface like that .. can't use that interface as is as it belongs to the com.sun.* namespace Cheers Piyush

Re: Wiki - How to develop with Eclipse and contribute

2006-11-13 Thread Piyush Purang
Further thoughts... I used the eclipse formatter and now I am having problems creating a patch because I sadly asked it to format a complete package and it warned me but I thought well it'll just touch the files I have been working on .. no! it basically touched all of them! trying to update isn

Re: Wiki - How to develop with Eclipse and contribute

2006-11-13 Thread Piyush Purang
Looks good.

Re: Wiki - How to develop with Eclipse and contribute

2006-11-13 Thread Piyush Purang
I was going to provide a patch for some findbugs warnings but there seems to be some very drastic changes on the way .. I will wait ...

Re: Wiki - How to develop with Eclipse and contribute

2006-11-13 Thread Piyush Purang
I thought so ..

Re: Wiki - How to develop with Eclipse and contribute

2006-11-13 Thread Piyush Purang
Hi Jerome, The tutorial misses on how to enable/use the provided build.xml file within eclipse. Cheers Piyush

findbugs and checkstyle

2006-11-13 Thread Piyush Purang
Hi Jerome, It seems like you are already implementing the suggestions.. Encodings.java etc. cool :) But I think checkstyle should be preferred for revelations like using final while declaring constants etc. What do you think? Cheers Piyush P.S: I saw that in PipeStream you did queue.put(Integ

Re: Another npe

2006-11-13 Thread Piyush Purang
Hi Jerome, I realised.. just checkedout fresh sources... It is something I have come to rely on for my projects .. automated build system with checkstyle, findbugs and a good IDE .. extremely important .. and a continous integration box is a great addition... http://fisheye1.cenqua.com/browse

Re: Another npe

2006-11-12 Thread Piyush Purang
Hi Jerome, How about integrating findbugs (http://findbugs.sourceforge.net/) in the build process that would go a longway in reducing such bugs. Cheers Piyush

Re: monitoring an application

2006-11-11 Thread Piyush Purang
I think we need to put in a little more thought about lifecycles first ... the states that i would love to have is created (The application was created/initialized properly but never started) started (The application has been asked to run) running (The application is successfully running maybe we

Application classloader

2006-11-10 Thread Piyush Purang
Hi Jerome, I saw the roadmap and would like to know if the planned separate classloader for each application has already been realised and if not then when do you think it will happen? Cheers Piyush

mina

2006-11-09 Thread Piyush Purang
Hi Jerome, Any plans to upgrade to the latest mina release (1.0 released in October)? Cheers Piyush

Re: Wiki - How to develop with Eclipse and contribute

2006-11-08 Thread Piyush Purang
Thanks Jerome.

Re: Re: toString shouldn't change the object's state

2006-11-03 Thread Piyush Purang
The problem with cache invalidation for muttable objects in a multithreaded environment isn't straightforward .. I'll get back to you on the exception scenario...

Re: using log4j

2006-11-03 Thread Piyush Purang
Hi Sean, I think you nailed it. That is exactly what I was hinting at (or atleast that was the undercurrent) if teams want to use X framework for something they are welcome to do it and frankly they will do it. But as a specification you don't always have the leisure to accommodate all. And tryi

Re: toString shouldn't change the object's state

2006-11-03 Thread Piyush Purang
Is it an immutable that the getValue returns the same value for the entire lifetime of the object? else we have the added problem of invalidating the cached value etc... what is interesting about your example code is that you use a boolean and not a compare to null like private value = null;

Re: using log4j

2006-11-03 Thread Piyush Purang
Yeah! and that was a comment written in 2002 (If I can deduce that correctly) .. that is some very specific planning.. divide and conquer monthly :) But eh! august is long gone.. I would love to know what were the other 5 and what happened to them?

Re: using log4j

2006-11-03 Thread Piyush Purang
Dave your bug got me very curious ... Found this http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4629315 Sadly.. it was reported way back in 2002 and it is still in progress... !!! You could vote for this bug to be removed.. I just hope it hasn't got lost a bit in all the other bugs .. so jus

Re: using log4j

2006-11-03 Thread Piyush Purang
My 2 cents: there was a JSR, 47 I think, apache was the only one who voted No in the final ballot .. sometimes being more flexible isn't good.. I'd vote for sticking with what comes with the JDK.. it reduces the version-clashes (classloader issues) that I have seen so often creep up when you try a

Re: Handlers for search urls

2006-11-03 Thread Piyush Purang
Honestly there are many ways you could solve this ... I would create /accounts/search/less_than/1 /accounts/search/greater_than/1 /accounts/search/between/1/2 And then you could either have a generalised Serach restlet ... or you could have restlets handling each search case indiv

Re: Filter questions

2006-11-01 Thread Piyush Purang
I would recommend using @Override annotation (whenever you intend to override a method) to avoid this in the future! Jerome, perhaps all the example source code and tutorial examples should be altered to reflect this paradigm? Cheers Piyush

Re: Restlets and JMX

2006-10-23 Thread Piyush Purang
I agree with your plan .. I rather like the automatic service discovery.

Re: starting, stopping and starting a container throws an exception

2006-10-23 Thread Piyush Purang
rue)" must be done before binding if you > want to reuse the socket. Jetty 6 doesn't seem to set this > property so I guess that the core of the problem. > > I'll send an email to Jetty's list for confirmation. Any > other thoughts? > > Best regards, >

Re: Last beta 19 snapshot

2006-10-23 Thread Piyush Purang
Ouch ... thanks got it... (Though I had been using b19 but I think maybe it went that way recently)

starting, stopping and starting a container throws an exception

2006-10-22 Thread Piyush Purang
Hi, stopping a running container and then starting it again throws the following exception 2006-10-21 23:55:11.968::INFO: Logging to STDERR via org.mortbay.log.StdErrLog 2006-10-21 23:55:12.007::INFO: jetty-6.0.x 2006-10-21 23:55:12.041::INFO: Started SelectChannelConnector @ 127.0.0.1:8184 S

Re: Last beta 19 snapshot

2006-10-21 Thread Piyush Purang
So I updated to revision 1025 compiled and part of the log is shown as attachment to2.txt. Note it is a Linux box. Then I packaged it (removed test as depency) in the build file. Now I fail to get anything on my browser for the following code... Container container = new Container(); Serv

Re: Restlets and JMX

2006-10-19 Thread Piyush Purang
Okay here are the results of my first test with JMX integration I was able to stop the container but when I try and start it again ... I get an "address already bound" exception So that means stop doesn't stop all connectors which makes sense but then why does start try and start a new connector

Re: Running a simple example

2006-10-19 Thread Piyush Purang
thanks that explains it ...and so does the result.getAllowedNames().add("127.0.0.1"); in the static method createLocalHost

Re: Running a simple example

2006-10-19 Thread Piyush Purang
Hi Jerome, I added this line host.getAllowedNames().add("localhost"); and now my url localhost:8182/something works but 127.0.0.1:8182/something doesn't work Using getDefaultHost() and then attaching the target works fine in both the cases. And when I do VirtualHost h

Running a simple example

2006-10-19 Thread Piyush Purang
Hi Jerome, I wanted to update my code. Before that in order to comprehend things I started implementing some simple use cases. The following code doesn't work as intended I always get a 404 public class Playground { public static void main(String[] args) throws Exception { Contai

Re: Restlets and JMX

2006-10-19 Thread Piyush Purang
Hi Jerome, What about lifecycles? It is nice to be able to document lifecycle of a restlet and container etc... Then we can expose status through the MBeans ... and ways (operations) to transit from one state to another. Looks like a comprehensive list and I don't see why we can't have a hierar

Restlets and JMX

2006-10-18 Thread Piyush Purang
Hi, The easiest way I see of integrating parts of restlet api is to declare the related MBean interfaces. The two interfaces that I see are: RestletContainerMBean RestletMBean Later we can consider RestletApplicationMBean. Or does anyone have another idea/approach? Cheers Piyush

Re: Shutting down

2006-10-16 Thread Piyush Purang
Hi Jerome, I totally agree that restlets shouldn't be able to stop containers... I thought may be there is already a way to administratively stop a container that I am not aware of. I guess JMX interface would be the best way to do that. Till then I will have to work out something :) That brin

Shutting down

2006-10-16 Thread Piyush Purang
Hi Jerome, I have this ShutdownRestlet that basically exits the JVM using System.exit. I'd like to shutdown a bit more gracefully. I thought I could do something like restlet.getContainer().stop(); but with b18 I can at best get hold of the Context. So is there a way to exit gracefully? Che

Re: Beta 19 and fluent builders

2006-10-11 Thread Piyush Purang
And use the the following to restrict protocols?

Re: New releases and API changes

2006-10-11 Thread Piyush Purang
Hi Jerome, I agree that after 1.0 release the developers get more breathing room to migrate to API changes. Usually they would be bound by their own release cycles and by spanning two releases will afford them more flexibility. Cheers Piyush

Re: Beta 19 and fluent builders

2006-10-11 Thread Piyush Purang
Hi Jerome, One thing that I propose is to have a schema (a must) for the configuration file. No schema is bad and a DTD isn't enough. Cheers Piyush

Re: Beta 19 and fluent builders

2006-10-11 Thread Piyush Purang
Hi Sean, Honestly I didn't like the fluent builder because (apart from aesthetically unpleasing upRouter() and a little hack of owner().start()) a) problem with multiline statements (including compromised readability). And to fit it all on a single line would mean unecessary tinkering with check

Re: New releases and API changes

2006-10-10 Thread Piyush Purang
Rather be well documented and embarassed as not-documneted and still very embarassed :) Isn't there a way to have a deprecated free javadocs (so java docs for migrators and javadocs for newbies)? And the reason for suggesting a removal by date is to make sure that there is a quick removal of th

Re: Beta 19 and fluent builders

2006-10-10 Thread Piyush Purang
My work isn't affected by these changes as I never used the fluent builders. I have an XML configuration which I use to dynamically change the setup of my restlets. Other changes will affect my work hence I have decided that I will not move that readily to the new release unless I see an updated t

New releases and API changes

2006-10-09 Thread Piyush Purang
Hi Jerome, I have been thinking about how we could manage API changes and the related pain better. I think the best way would be to start using the @deprecated and setting a removal deadline by naming a future release. Here is a good synopsis of the annotation (picked up from a cached Google re

Re: Breaking Call into Request and Response (Was: Allow Header)

2006-10-09 Thread Piyush Purang
Been thinking over the weekend on this issue. I rather like the call interface. It is a unified and well encapsulated entity. How about keeping the Restlets "handle(Call)" as is and let it extract the request and response objects as and when it requires? Call.getRequest() Call.getResponse() So

Re: Breaking Call into Request and Response (Was: Allow Header)

2006-10-05 Thread Piyush Purang
Hi Jerome, +1 As usual I will keep the final word till I have already used the refactorings... Bugger I have to change all that code again.. did I just ask for all those changes... what extent we go for apparent improvements :) Do you have a deadline in mind for the b19? I think many are wait

Re: Allow Header

2006-10-05 Thread Piyush Purang
My immediate concern is a Call object with an ever increasing interface. As of last count (b18) it stands at 30+ methods.

Re: handling posted forms

2006-09-26 Thread Piyush Purang
Hi Jerome, So here are my findings... 1. I had erroneously used "id" instead of "name" for form input elements that is why things didn't turn up as expected. 2. A form with enctype="multipart/form-data" isn't parsed properly. Attached restlet shows it. Everything works fine if you remove the en

handling posted forms

2006-09-22 Thread Piyush Purang
Hi, So as my http basic setup continues to befuddle me I decided to use a login form instead. So I wrote an Authentication filter that basically looks for a session id if it isn't found or the associated session is stale it redirects to a login resource which is basically "/login". That resour

Re: b19 - Call converters

2006-09-21 Thread Piyush Purang
Sorry I was way too quick for myself ... There is a method Parameter get(int) and it throws IOException. On 9/21/06, Piyush Purang <[EMAIL PROTECTED]> wrote: Hi Jerome, > There is a programmatic way to get this: > Call.getResourceRef().getQueryAsForm().get("key1") I

Re: b19 - Call converters

2006-09-21 Thread Piyush Purang
Hi Jerome, There is a programmatic way to get this: Call.getResourceRef().getQueryAsForm().get("key1") I couldn't find any such method in b18 is it in b19? Only one that resembles is String get(int) If we need to attract some servlet developers later-on maybe it is wise to have a method like

Re: b19 - Call converters

2006-09-20 Thread Piyush Purang
> Could we somehow do the same with parameters of the query string? > > /a/b/c?key1=value1&key2=value2 > > org.restlet.reference.params.key1 > org.restlet.reference.params.key2 There is a programmatic way to get this: Call.getResourceRef().getQueryAsForm().get("key1") Was just a thought. Maybe

Re: b19 - Call converters

2006-09-20 Thread Piyush Purang
Hi Jerome, I think "org.restlet.http.request.headers" is the best choice. It may seem lengthy but adheres the pattern of namespaces and properties very well. Javadoc would capture that attribute keys starting with "org.restlet" are reserved. As for the length it can easily be declared as a cons

Jetty 6 and GuardFilter with Http Basic

2006-09-19 Thread Piyush Purang
Hi Jerome, I was going to post the message that appears later. I did upgrade to the latest jetty-util-6.0.0.jar and jetty-6.0.0.jar released around 10.09.06 the IllegalStateException (as mentioned later) doesn't occur anymore. But the usual HTTP Basic authentication dialog doesn't popup either!

b18 factory methods

2006-09-18 Thread Piyush Purang
Hi Jerome, I am trying to migrate my work to b18. Eventhough I have to unlearn a lot, it is much nicer to work with the API. I have a suggestion to make about some o.r.data classes. For Protocol you provide the method - create, that acts as a factory method. It would be very convenient to have a

Re: API design review

2006-08-17 Thread Piyush Purang
I agree with the very first comment to the message posted on theserverside.com. But I also agree Chris's comment - Make all classes, except those intended to be subclasses, as final. Which ones? This is trickier. You might want to let the API stabilize a bit and see what people actually do s

Re: API design review

2006-08-17 Thread Piyush Purang
Hi Jerome, +1 for the move. One fact that troubles me is that we are already at/near version 1. Isn't that a tad too soon? Please see my inline comments. On 8/16/06, Jerome Louvel <[EMAIL PROTECTED]> wrote: Following the recent questions and suggestions from Piyush Purang, I

Re: silly sample app available

2006-08-10 Thread Piyush Purang
hmmm strange... why didn't I get that mail. Thanks for passing the link again. On 8/10/06, Chris Winters <[EMAIL PROTECTED]> wrote: Piyush Purang wrote: > Where is it available? Did I miss a few emails here? It was in the first message in the thread: Location: http://www.cw

Re: silly sample app available

2006-08-10 Thread Piyush Purang
Hi Chris, Where is it available? Did I miss a few emails here? Cheers Piyush On 8/10/06, Jerome Louvel <[EMAIL PROTECTED]> wrote: [...] > Another note: you probably noticed I didn't use the Fluent Builder > pattern for creating the site. I actually found it a little > too hard to > read. As a

Re: Restlet wiki (was: Resources and Representations)

2006-08-10 Thread Piyush Purang
Thanks John, for creating my suggestion into another discussion thread. I am glad that little piece wasn't missed. +1 JIRA would be great and once it is up and running we can start adding issue numbers directly into the changelog and every API change should, from then on, be first added to JIRA

Re: Resources and Representations

2006-08-10 Thread Piyush Purang
Perhaps a "WIKI" on restlet.org with a general/open examples section would be great so that examples could be uploaded and discussions can be had on the uploaded examples.. I would then upload my solution to configuring components using an XML file (JAXB and handler classes). Chris could upload h

Re: Some API related questions

2006-08-10 Thread Piyush Purang
Thanks Jerome for lending an ear. How can I best get to what you have already done? Should I wait for the next b-release or a nightly release (that would be cool)? I will need to change my classes now :) I will comment on/pursue these issues after I have used what's been done. Cheers Piyush

Re: Resources and Representations

2006-08-09 Thread Piyush Purang
I think I will wait for those examples before I form an opinion on these matters.

Re: Some API related questions

2006-08-09 Thread Piyush Purang
Hi Jerome, > 1) Why does org.restlet.data have so many classes? Couldn't they be > divided into sub packages? See also remark 3. There is a simple reason which is that the REST style defines three and only three architectural elements: - Data Elements > org.restlet.data - Connectors> org.

internal redirects

2006-08-08 Thread Piyush Purang
Hi, Before I creat an issue in the issues DB I wanted to discuss it here... I want to "internally" redirect all "/a/" calls to "/a/b" so I use the RedirectRestlet like RedirectRestlet redirect = new RedirectRestlet(myContainer, "/a/b", RedirectRestlet.MODE_INTERNAL); host.getScorers().add("/a/"

Some API related questions

2006-08-08 Thread Piyush Purang
Hi Jerome, 1) Why does org.restlet.data have so many classes? Couldn't they be divided into sub packages? See also remark 3. 2) Is the implementation of "Map component.getServers()" using a "ServerMap" in RestletContainer advisable? For example I wanted to work with components in general and th

Resources and Representations

2006-08-08 Thread Piyush Purang
Hi Jerome, I find that the Resource and its representations is a central part of the dissertation but the tutorial somehow doesn't bring that to the fore. Would you agree on that? And I am still not convinced why Representation should extend Resource (We are talking API here)? Shouldn't Resource

Re: representations + caching (ETags, etc.)

2006-08-08 Thread Piyush Purang
Hi Chris, I am working on some ideas with restlets .. could you share your code or is that closed-source? Cheers Piyush On 8/8/06, Jerome Louvel <[EMAIL PROTECTED]> wrote: Hi Chris, Your approach sounds very good to me, unless your client is a Web browser. In this case, you might have troubl