Re: [RT] Identity of resources and adaptables

2010-01-21 Thread Carsten Ziegeler
Felix Meschberger wrote: > Hi, > > I think equals should hold. == should not be required (and even less > depended upon). > > Especially in long used ResourceResolver instances having to guarantee > == will generate a memory hog sooner or later. > > I agree that we might build in some caching to

Re: [RT] Identity of resources and adaptables

2010-01-21 Thread Felix Meschberger
Hi, I think equals should hold. == should not be required (and even less depended upon). Especially in long used ResourceResolver instances having to guarantee == will generate a memory hog sooner or later. I agree that we might build in some caching to the ResourceResolver, for example using an

Re: [RT] Identity of resources and adaptables

2010-01-15 Thread Justin Edelson
On Jan 15, 2010, at 7:15 AM, Alexander Klimetschek wrote: On Thu, Jan 14, 2010 at 17:28, Justin Edelson wrote: But the more I think about it, the more I'm on the fence about: resolver.getResource("/a/b") == resolver.getResource("/a/b") My first instinct was basically what Mike wrote, t

Re: [RT] Identity of resources and adaptables

2010-01-15 Thread Carsten Ziegeler
Ok, thanks for all answers so far :) Bertrand Delacretaz wrote: > On Fri, Jan 15, 2010 at 1:15 PM, Alexander Klimetschek > wrote: >> ...Note that ensuring a == b can make implementations very difficult, as >> you need to cache all the Resource instances you returned to the API >> client. And wha

Re: [RT] Identity of resources and adaptables

2010-01-15 Thread Bertrand Delacretaz
Hi, On Wed, Jan 13, 2010 at 4:16 PM, Carsten Ziegeler wrote: > ...I've been thinking lately about identity of our objects, especially > resource objects and adaptables Identity crisis? Ok, I'll bite ;-) > Resource a = resolver.getResource("/a/b"); > Resource b = resolver.getResource("/a/b")

Re: [RT] Identity of resources and adaptables

2010-01-15 Thread Bertrand Delacretaz
On Fri, Jan 15, 2010 at 1:15 PM, Alexander Klimetschek wrote: > ...Note that ensuring a == b can make implementations very difficult, as > you need to cache all the Resource instances you returned to the API > client. And what about handling this across multiple threads?... Right, I wouldn't go t

Re: [RT] Identity of resources and adaptables

2010-01-15 Thread Alexander Klimetschek
On Thu, Jan 14, 2010 at 17:28, Justin Edelson wrote: > But the more I think about it, the more I'm on the fence about: > resolver.getResource("/a/b") == resolver.getResource("/a/b") > > My first instinct was basically what Mike wrote, this can be true, but isn't > required to be so. But the more I

Re: [RT] Identity of resources and adaptables

2010-01-14 Thread Justin Edelson
My initial reaction was basically what Mike wrote. But the more I think about it, the more I'm on the fence about: resolver.getResource("/a/b") == resolver.getResource("/a/b") My first instinct was basically what Mike wrote, this can be true, but isn't required to be so. But the more I think abou

Re: [RT] Identity of resources and adaptables

2010-01-14 Thread Vidar Ramdal
On Wed, Jan 13, 2010 at 4:16 PM, Carsten Ziegeler wrote: > I've been thinking lately about identity of our objects, especially > resource objects and adaptables. > > Without thinking about how this is implemented at the moment and without > thinking if/how this could be implemented, what would you

Re: [RT] Identity of resources and adaptables

2010-01-14 Thread Carsten Ziegeler
Mike Müller wrote: > Nobody seems to be willing to burn his finger on this topic, > nevertheless I try to jump in the hot pot... Hehe, thanks! > If the following is given and we talk about the same request > > Resource a = resolver.getResource("/a/b"); > Resource b = resolver.getResource("/a/b")

RE: [RT] Identity of resources and adaptables

2010-01-14 Thread Mike Müller
Nobody seems to be willing to burn his finger on this topic, nevertheless I try to jump in the hot pot... > From: Carsten Ziegeler [mailto:cziege...@apache.org] > Hi, > > I've been thinking lately about identity of our objects, especially > resource objects and adaptables. > > Without thinking abo

[RT] Identity of resources and adaptables

2010-01-13 Thread Carsten Ziegeler
Hi, I've been thinking lately about identity of our objects, especially resource objects and adaptables. Without thinking about how this is implemented at the moment and without thinking if/how this could be implemented, what would you expect for the following: We simply get the same resource twi