Hi Peter, answer inline:

> -----Original Message-----
> From: Peter Donald [mailto:[EMAIL PROTECTED]]
> Sent: Monday, February 18, 2002 12:48 AM
> 
> On Mon, 18 Feb 2002 10:39, Paulo Gaspar wrote:
> > The token contains NO trace info. The CM does. The
> > token is just a key.
> 
> right but it is a key into a map that is used to look up another 
> structure 
> that contains traceinformation.

Of course. It was just that, the way you wrote it, it
looked like you were mentioning another way of using 
token that was mentioned before in the list.

> > I use 2 maps because I want BOTH to release single
> > components or all the components for a token. (I
> > want to release "limited" resources like database
> > connections ASAP.)
> 
> right. Thats about the only good reason that I have heard so far 
> that would 
> be useful to keep the release*() methods.

Yeahp! The only reason I have too.


> > But keep in mind that only a minority of the used
> > components are usually tracked - since most do not
> > need to be released. Quite a few of my typical
> > requests are processed using several components but
> > not needing to have any of them tracked.
> 
> yep.
> 
> > A new CM, as light as it might be, ends up creating
> > a few objects and adding an extra wrapping layer. I
> > just think that it does not pay its own overhead.
> 
> Perhaps you are not getting what I am saying. What I sam saying is that 
> creation of a new CM is ***LESS*** overhead than a token tracking 
> strategy ;) 

I am getting. But the new CM also needs to track components
although it only needs 1 map instead of 2. And it is an extra 
wrapping layer.

I just think that if you must track a lot of components per
"request" it might be worth the price, but if you only need to
track 2 or 3 components per request, I think it is not.


> BTW do you wanna post your code for this so I can see if you 
> implement it in 
> a way similar to the way I assume you do it.

I think you are assuming every think right, although we are 
both still trying to get to the 100% understanding of what 
the other is saying.

My CM is a monster that still has to be broken. (I think it
is not worth redesigning some things when you are still 
learning how/what they should be.) 

What is worse is that its current implementation is very
far from optimal and does not help my arguments. =:o(

Small example:

    protected class ComponentTracker
    {
        private Map m_componentMap          = new InstancekeyMap();
        private MapOfSets m_tokenComponents = new MapOfSets(new InstancekeyMap());
        ...

These data structures are very far from being efficient. I
think that using an InstancekeyMap is the safe way to go.
(An InstancekeyMap a map that treats its keys as Object 
instances so that 2 different instances can not be 
considered equal.) But using a Map of Sets to track the
components per token is bad (although safe). And there is
worse on my code!


Do it the way I am saying and not the way I am doing it.
=;o)

I will only redesign, breakdown and rewrite my CM again 
when I consider that the framework design is becoming 
stable (I am almost there). I had to quit redesigning it 
after a couple of attempts that went nowhere because 
everything around the CM (yes, it is still a monster-CM) 
was changing all the time. Then, after I break it down I 
can contribute the "ObjectManager" bit if you still want 
it.


 
> -- 
> Cheers,
> 
> Pete
> 
> ---------------------------------------------------
> "Wise men don't need advice. Fools don't take it." 
>                         -Benjamin Franklin 
> ---------------------------------------------------

And fools like me still keep insisting on giving it 
anyway!
=;o)


Have fun,
Paulo


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to