From: Eric B. R. <eb...@tc...> - 2003-07-15 21:03:23
|
On Tuesday, July 15, 2003, at 04:55 PM, Brian Goetz wrote: >> Can we simply get rid of ContextTools completely? >> >> I've always found ContextTools to be too limiting to be useful. In >> many cases, I've wanted CT's (specified via wm.properties) to have >> access to my application data. Using the Context as a means to >> communicate back to my application seemed like a hack, so I just end >> up doing this: >> >> context.put ("MyGreatTool", new MyGreatTool (_app)); >> >> So I think we should just nuke CT's completely. Eliminates the need >> to worry about if/when/how they're destroyed or gc'd. > > All of the tools that are in the WM distro are basically repositories > for functions -- they require little initialization and teardown and > have little state. > > So in some sense, the current refactor "demotes" them in that > direction. right, but isn't there still special logic in Context.java in .get() that says "oh, we don't have <keyname>, let me see if we have a ContextTool by that name"? All of this could go away too, if we just dropped ContextTools. eric |