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]