Berin Loritsch wrote:
> Marcus Crafter wrote:
> 
>> Hi All,
>>
>>     Container.java:
>>
>> /**
>>  * The Container is an interface used to mark the Containers in your 
>> system. It
>>  * exposes a protected getComponentManager() method so that the 
>> Container's
>>  * Manager can expose that to the instantiating class.
>>  *
>>  * @author <a href="mailto:[EMAIL PROTECTED]";>Berin Loritsch</a>
>>  * @version CVS $Revision: 1.6 $ $Date: 2002/02/05 20:38:17 $
>>  */
>> public interface Container
>> {
>>     String CONTEXT_CLASSLOADER = "container.classloader";
>>     String CONTEXT_DIRECTORY   = "context-root";
>>     String WORK_DIRECTORY      = "container.workDir";
>>     String LOGGER_MANAGER      = "container.logManager";
>>     String COMMAND_QUEUE       = "container.commandQueue";
>>     String POOL_MANAGER        = "container.poolManager";
>>     String ROLE_MANAGER        = "container.roleManager";
>> }
>>
>>     Should there be a getComponentManager() method here ?
> 
> 
> 
> No.
> 
> It is not normal to expose the getComponentManager beyond the Container.
> We do it in the test for testing reasons.  We have it in
> AbstractContainer so that the concrete container classes can easily
> reference the component manager.
> 
> It is a violation of IOC (aka subversion of control) to expose the CM
> to any class that can get a handle on the Container.

We should change the text.



-- 

"They that give up essential liberty to obtain a little temporary safety
  deserve neither liberty nor safety."
                 - Benjamin Franklin


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

Reply via email to