I m wrting a 'block' which uses only one Container to hold all the configrations read from roles and xconf file, I did like this:
final FortressConfig config = new FortressConfig();
config.setContextDirectory(""); config.setWorkDirectory(""); config.setContainerConfiguration("system.xconf" ); config.setRoleManagerConfiguration("report.roles"); config.setLoggerManagerConfiguration("logkit.xconf");
ContainerManager cm = new
DefaultContainerManager(config.getContext());
ContainerUtil.initialize( cm );
DefaultContainer container = (DefaultContainer) cm.getContainer(); ServiceManager manager = container.getServiceManager();
Using that manager, I can look up every service I need in my block. The question is , my block is supposed to be used in an uppper level block which has some configurations useful to my block.I guess it somehow has its own ServiceManager, so how can I use this ServiceManager(or what else) to get those configurations? I think this must have something to do with the hierarchical containers idea, Can anyone tell me how to achive this goal?
Thanks Mike
_________________________________________________________________
享用世界上最大的电子邮件系统― MSN Hotmail。 http://www.hotmail.com
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]