Noel J. Bergman wrote:
You have lost me - can you expand on something for me? Context myContext = new InitialContext(); How does a container control what is in the instance myContext?The container can establish both the implementation and population of the initial context. To do this per component is a bit more of an issue.
Its the per component subject I'm thinking about.
This seems terribly complicated as compared to the approach of a component declaring what it needs, and the container supplying this via some method.One solution involves playing with NamingManager.setInitialContextFactoryBuilder(). You can also play around with classloaders. If this were really of interest, we can snarf code from Tomcat, which supports per-webapp contexts, as I understand it.
I though we were discussing the mailet API - I'm kind of not sure if I'm talking about things that have been set in concrete or not - clarification on this would be helpful. I'm personally not convinced that strait out following of the servlet API is the best thing - in fact I think we can do better than that. What I am very interested in is the contract between a mailet and its container (which is more than the Mailet API itself). My impression is that part of the puzzle is largely missing.However, my proposal wasn't an attempt to implement IoC. Servlets don't see separate contexts, and that is the model closest to the Mailet API.
Cheers, Steve.
--
Stephen J. McConnell
mailto:[EMAIL PROTECTED]
http://www.osm.net
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
