Niclas Hedhman wrote:

Niclas Hedhman wrote:


Looking from 10,000 feet, what is then the difference between an
"object" residing in Context and one that can be looked up in the
ServiceManager??


Currently, it is the purpose of the object. I understand where you are
coming from. For Avalon 5 whenever we get to that, I would like to have
one lookup manager--perhaps even a JNDI context that is passed in (no
InitialContext capabilities)--but that is the future. We have the
present Avalon 4 to support.



IMVHO it is a bad habit to expand on or extend a concept that is planned/considered to be removed.


I would say that it is the subject of discussion. I would not say that Context is planned/considered for removal. Context represents an import stage during which a container can gather non-component artifacts and apply them to a component before servicing occurs. A context entry could be something like a KeyStore which can be used by a component during the servicing stage (as an example).


What is *really* needed is tigher semantics on context entry requests.


I would like to propose that the Context package is deprecated, and the context values are made available via the ServiceManager instead. That would also give the Component authors some reasonable time to adjust to the complete removal later.

Aaron Farr wrote;


The difference is lifecycle and lifestyle management.





Objects from the ServiceManager are guaranteed to go
through the proper lifecycle and have proper lifestyle
management. You have no such promise for Context values.



Are you saying is that "because Context values doesn't have a defined lifecycle, we must keep them"? Context values can be created as components but not the other way around, so...?

If I don't declare any interfaces in the component, it could be a Context
value, i.e. ContextValue is-kind-of Component, and I could basically
create Components that behaves like the existing context values.


Only if your context entry has a null construcor. How are you going to diferrentiate between the establishment of a service and the creation of a File instance? If context were removed, we would be forced to declare factories for any "non-component" and that's not an attractive proposition.


Cheers, Steve.

--

Stephen J. McConnell
mailto:[EMAIL PROTECTED]
http://www.osm.net

Sent via James running under Merlin as an NT service.
http://avalon.apache.org/sandbox/merlin




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



Reply via email to