Hello,

Gabriel Sidler wrote:
> 
> Geir Magnusson Jr. wrote:
> 
> >>>Geir wrote:
> >>>
> >>>>A great example of application differences are scopes...  Darn important
> >>>>(sadly) in the servlet environment, but utterly irrelevant in Ant-driven
> >>>>tasks.
> >>>>
> >>
> >>Really? Conceptually, aren't there tools that apply to all templates of
> >>a batch (global scope) and potentially others that are specific to a
> >>particular template of a batch (local scope).
> >>
> >
> > That's really far-fetched :)
> >
> > Isn't that a misuse of the concept of scope?  You are talking more about the
> > notion of a pull model, where the template itself decides on which tool to
> > use and picks it accordingly out of the context.
> 
> No, I never thought that far. I am simpy thinking from the point of
> view of a toolbox manager: When does it need to instantiate a tool?
> - once for the entire runtime? (scope global)
> - or once for every template processing? (scope local)
> - or once for every xyz (scope xyz)
> 
> If 'scope' is not the right term here, let me what would be better.

The concept of "scope" and "contextname" mentioned earlier are really just
about the same thing.  In a servlet environment, you're limited to using
request, session and global.  In other environments you could use whatever
you wanted.

However, ToolboxManager should not use global scope by default when
loading a tool (in the servlet environment) because this implies the tool
is thread safe.  The default should be request.  

Also, instead of calling it "global", a term which I don't ever recall
seeing associated with the ServletContext, maybe the term "application"
would be better.  

-Bill

> 
> Gabe
> 
> --
> Gabriel Sidler
> Software Engineer, Eivycom GmbH, Zurich, Switzerland
>

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

Reply via email to