I've a service locator class in my project which connects up using code below:

Hashtable env = new Hashtable();
env.put(Context.INITIAL_CONTEXT_FACTORY, "weblogic.jndi.WLInitialContextFactory");
env.put(Context.SECURITY_PRINCIPAL, "weblogic");
env.put(Context.SECURITY_CREDENTIALS, "weblogic");
env.put(Context.PROVIDER_URL, "t3://localhost:7001");

return new InitialContext(env);

However, in a clustering environment, where you're testing various server configurations and ports etc, you don't want to hard code the values (user, password, url) in the code. It'd be nice to have some sort of properties file or some xml file for that purpose. What's the best way to address this? How do people generally get about it?

Second question is regarding clustering in weblogic:

Can a cluster listen to the same port an admin server is listening to? In my configuration, I have an admin server listening to 7001 port number. I've two managed servers part of the cluster. My admin server is not part of the cluster. managed server 1 is listening on port 7005 and managed server 2 is listening on port 7010. Given the above scenario, is it possible that my cluster would listen to port 7001 WHILE I SHUT DOWN admin server and still have two managed servers running and managing EJBs and other services? I tried that but my client class can't find my session facade bean although it's deployed on both managed servers. Thanks.