On Wed, 13 Aug 2003, Sgarlata Matt wrote: > > In terms of making the infrastructure available to callers, it's pretty > > clear how passing a context object around makes the infrastructure > > available to anyone who needs it. Are there other options for how you'd > > make the infrastructure available without passing it? I haven't thought > > of any. > > Sorry if this was already said, but couldn't you use JNDI if you wanted to > use a "pull" approach? I'm not sure if that's a good idea or not, but I > thought I would throw it out there. >
Do you mean the JNDI naming context that the web contgainer provides for you? If so, it's got two serious problems: * It's read-only * It's application scoped so you wouldn't be able to store any per-request or per-session stuff there, without building some sort of data structures inside. Regarding "context" in general, what you normally want is essentially a HashMap with typesafe getters and setters for well-known things. You don't necessarily need the hierarchy support that something like JNDI would provide. > Matt Craig --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]