> For example, the only real answer to the 'what is the difference between a
> context and a service manager?' question I've had so far is 'they're
different
> because people think of them as different things'. Which is fine, except
> no-one seems to be able to explain what the difference is, and why that
> difference is important enough to model in framework.
Adam,
I'd like to offer the following definition of a context:
The Context is used as a means to provide data and a set of operations to
the component.
OK, so what data and what operations?
My thoughts are this:
Data: The data is not a general Object-passing mechanism. That is, the type
of data being passed is limited. Every container, when it deploys its
components (be they servlets or maillets or whatever), sets up a small
block of data for it. That block of data can be, for web-servlets the root
URL for the servlet, activation time, or mail address for mailets, or
information about interceptor chains. The block can also contain the class
loader in containers that do classloader isolation. Now, I'd say that the
Context is the component's way of accessing that data block.
Operations: The operations provided by the context can and should primarily
be accessed via a ServiceManager, but there are operations that belong in a
context more than other operations. Those operations that should be in a
context are those that require the above mentioned data block to work. For
example, operations involving the interceptor chains. (I also consider
type-safe getters for access to data values as valid operations.)
Does it make sense?
/LS
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
- RE: Context: usage recommendations? Leo Sutic
- RE: Context: usage recommendations? Noel J. Bergman
- RE: Context: usage recommendations? Leo Sutic
- RE: Context: usage recommendations? Noel J. Bergman
- RE: Context: usage recommendations? Berin Loritsch
- Re: Context: usage recommendations? Adam Murdoch
- RE: Context: usage recommendations? Noel J. Bergman
- RE: Context: usage recommendatio... Berin Loritsch
- RE: Context: usage recommend... Noel J. Bergman
- [Proposal] Topic conventions... Berin Loritsch
- Re: Context: usage recommendations? Adam Murdoch