Paulo,

I see your point, using Object keys would naturally allow maximum 
flexibility. However, the following operation is well defined:

   MyComponent mc = (MyComponent) m.lookup("com.domain.MyComponent");

Custom Object keys would be perfect for one application, but how about 
when we start switching container and component implementations?

(: A ;)

Paulo Gaspar wrote:
> Antti,
> 
> Building a String key can get REALLY complicated. I am not sure if
> it really is a simplification.
> 
> OTOH, if you know how to implement equals() and hashCode() methods,
> you can build efficient and non-coliding complex keys with ease...
> ...but then the key parameter should just be a
>    java.lang.Object
> 
> 
> Have fun,
> Paulo Gaspar
> 


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

Reply via email to