RE: ServerResource is currently incompatible with OSGi

2009-04-16 Thread Jerome Louvel
://www.restlet.org Noelios Technologies ~ Co-founder ~ http://www.noelios.com/ http://www.noelios.com _ De : Tal Liron [mailto:tal.li...@threecrickets.com] Envoyé : dimanche 12 avril 2009 17:39 À : discuss@restlet.tigris.org Objet : Re: ServerResource is currently incompatible with OSGi Tim

Re: ServerResource is currently incompatible with OSGi

2009-04-12 Thread Tim Peierls
...@gmail.com] *De la part de* Tim Peierls *Envoyé :* mercredi 8 avril 2009 00:23 *À :* discuss@restlet.tigris.org *Objet :* Re: ServerResource is currently incompatible with OSGi Why involve Context at all? The AnnotationInfo associated with a Class? extends UniformResource does not depend on Context

Re: ServerResource is currently incompatible with OSGi

2009-04-12 Thread Tal Liron
Envoy: mercredi 8 avril 2009 00:23 : discuss@restlet.tigris.org Objet: Re: ServerResource is currently incompatible with OSGi Why involve Context at all? The AnnotationInfo associated with a Class? extends UniformResource does not depend on Context

Re: ServerResource is currently incompatible with OSGi

2009-04-09 Thread Tim Peierls
...@gmail.com] *De la part de* Tim Peierls *Envoyé :* mercredi 8 avril 2009 00:23 *À :* discuss@restlet.tigris.org *Objet :* Re: ServerResource is currently incompatible with OSGi Why involve Context at all? The AnnotationInfo associated with a Class? extends UniformResource does not depend

Re: ServerResource is currently incompatible with OSGi

2009-04-09 Thread Tim Peierls
On Wed, Apr 8, 2009 at 9:42 AM, Jerome Louvel jerome.lou...@noelios.comwrote: Hi all, Beautiful! This new solution is available in SVN trunk. Thanks Dave for the report and Tim for the clever fix! You're welcome. ;-) This fix will do for now, but it could be made more robust. Having

Re: ServerResource is currently incompatible with OSGi

2009-04-09 Thread Tal Liron
tpeie...@gmail.com [mailto:tpeie...@gmail.com] De la part de Tim Peierls Envoy: mercredi 8 avril 2009 00:23 : discuss@restlet.tigris.org Objet: Re: ServerResource is currently incompatible with OSGi Why involve Context at all? The AnnotationInfo associated w

Re: ServerResource is currently incompatible with OSGi

2009-04-08 Thread Tim Peierls
Why involve Context at all? The AnnotationInfo associated with a Class? extends UniformResource does not depend on Context. You could just add a method to AnnotationUtils: public static AnnotationInfo getAnnotationDescriptor(Class? extends UniformResource resourceClass) {

RE: ServerResource is currently incompatible with OSGi

2009-04-08 Thread Jerome Louvel
://www.noelios.com http://www.noelios.com _ De : tpeie...@gmail.com [mailto:tpeie...@gmail.com] De la part de Tim Peierls Envoyé : mercredi 8 avril 2009 00:23 À : discuss@restlet.tigris.org Objet : Re: ServerResource is currently incompatible with OSGi Why involve Context at all? The AnnotationInfo

Re: ServerResource is currently incompatible with OSGi

2009-04-08 Thread Tal Liron
De: tpeie...@gmail.com [mailto:tpeie...@gmail.com] De la part de Tim Peierls Envoy: mercredi 8 avril 2009 00:23 : discuss@restlet.tigris.org Objet: Re: ServerResource is currently incompatible with OSGi Why involve Context at all? The AnnotationInfo associated with a Class? extends UniformRes

Re: ServerResource is currently incompatible with OSGi

2009-04-07 Thread David Fogel
Hi Tal- I think what you suggested about appending a classloader id (perhaps System.identityHashCode(cl) ?) would work. Regarding the Restlet Context and this cache being cruft: You say the Context is a reasonable place for information that applies to the Application, but this doesn't have

Re: ServerResource is currently incompatible with OSGi

2009-04-07 Thread Rob Heittman
There's a lot of precedent -- look at all the weird stuff that ends up in System.properties() on startup of some JVMs, or the values hanging out in ServletContext or PageContext in every JEE server I know. Doesn't mean it thrills me. Thanks for spotting this, David ... would have been a stopper

Re: ServerResource is currently incompatible with OSGi

2009-04-07 Thread Tal Liron
Ah, I can see your point now. I would recommend, then, that a Context would have two separate ConcurrentHashMaps, something like this: 1. Context.getConfiguration() -- this would be for the user 2. Context.getImplementationCache() -- this would be for things like AnnotationUtils, and the

Re: ServerResource is currently incompatible with OSGi

2009-04-06 Thread Tal Liron
I've noticed this, too, but couldn't immediately think of an application where this would be a problem... thanks for bringing up OSGi. An immediate solution could be to append the class's ClassLoader instance into the key: org.restlet.resource.ServerResource.annotations.classloader