? there is only one comp variable defined in James. and throughout the class, all the methods reference the comp variable to put/get components, including dnsServer, spool, user manager etc. In other words, the user repository component is at the same level as the other 'system' modules. Since the SimpleComponentManager is little more than a hashtable, potentially it's possible to override one of the 'system' components (such as spool) because one of the user happen to have the same name. IMHO, the user repositories should be managed by a separate component manager. --- Serge Knystautas <[EMAIL PROTECTED]> wrote: > The "comp" object is different for the different > sections of code you > mention. Each module is initialized with a > different comp object, and > so namespace conflicts shouldn't arise between > modules. Check out the > conf file to see how different comps are organized. > > Serge Knystautas > Loki Technologies > http://www.lokitech.com/ > > Ye Tao wrote: > > > > I was browsing the latest James 1.1.3 code and > noticed > > something. I might be missing something here, so > > forgive me if i am wrong > > > > in getUserInbox() of James.java, the code is like > > > > ----code pasted ---- > > > > public synchronized MailRepository > > getUserInbox(String userName) { > > > > MailRepository userInbox = > (MailRepository) > > null; > > try { > > userInbox = (MailRepository) > > comp.getComponent(userName); > > } catch (ComponentNotFoundException ex) { > > String dest = > > localInbox.getChildDestination(userName); > > userInbox = (MailRepository) > > store.getPrivateRepository(dest, > MailRepository.MAIL, > > Store.ASYNCHRONOUS); > > comp.put(userName, userInbox); > > } > > return userInbox; > > } > > ----------------------------------- > > > > my question is: since some other components like > > dnsServer is also stored in comp using > > > > comp.put("DNS_SERVER", dnsServer); > > > > what if a user name happens to be 'DNS_SERVER' > also? > > wouldn't that cause a problem? > > > > thanks > > > > --ye > > > > __________________________________________________ > > Do You Yahoo!? > > Kick off your party with Yahoo! Invites. > > http://invites.yahoo.com/ > > > > > ------------------------------------------------------------ > > To subscribe: > [EMAIL PROTECTED] > > To unsubscribe: > [EMAIL PROTECTED] > > Archives and Other: <http://java.apache.org/> > > Problems?: [EMAIL PROTECTED] > > > ------------------------------------------------------------ > To subscribe: [EMAIL PROTECTED] > To unsubscribe: [EMAIL PROTECTED] > Archives and Other: <http://java.apache.org/> > Problems?: [EMAIL PROTECTED] > __________________________________________________ Do You Yahoo!? Kick off your party with Yahoo! Invites. http://invites.yahoo.com/ ------------------------------------------------------------ To subscribe: [EMAIL PROTECTED] To unsubscribe: [EMAIL PROTECTED] Archives and Other: <http://java.apache.org/> Problems?: [EMAIL PROTECTED]
