On Wed, 26 Jun 2002 19:24, Nicola Ken Barozzi wrote:
> > Then your program wont scale, will be hell to maintain and suffer from
> > pattern hell. Self induced aswell - you don't honestly expect me to feel
> > sorry for you do you? :)
>
> ;-) hehehe
>
> Let me see if I understand.
>
> ComponentManager should give you course grained components.

Coarseness is not the main requirement for being accessible from CM. For 
instance in myrmidon we have components that just validate a name and that 
qualifies as a component (maybe 20 lines if that). The main requirement is 
that the object be a service NOT a resource. 

Ie it is perfectly valid to nab a DataSource from the SM but if you grabbed a 
JDBC Connection you are just inviting pain and user confusion. 

* Will multiple lookups produce same resource or new resources each time or do 
something completely different
* When are resources released
* what does it mean if you hold the resource
* you have to explicitly worry about which components are resources and which 
are services to make sure you micro-manage their usage patterns
* etc

> This would mean (Cocoon example) that the cm would not give you a
> Transformer or a Generator, but a service that manages them.

Depends on interface of Generator. If it is a resource then yes, if it is a 
service then no. It sounds like Generator has been made a resource (really 
bad move IMHO) and thus you do need a GeneratorManager. Personally I would 
have made it a service.

> Let me say anyway that I don't particularly like the fact that a
> developer has to write a Manager,

Thanks - I didn't hear it the first 5 or 6 times you said it. 

> but I suppose that this is what
> ContainerKit is for?

not really. ContainerKit is for building containers not reosurce managers.

In the end if you don't want to write a custom manager then don't. Just 
remember that I told you it wont scale when you start running into problems.

-- 
Cheers,

Peter Donald
--------------------------------------------------
 Logic: The art of being wrong with confidence...
--------------------------------------------------


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

Reply via email to