env.setProperty(JNP_DISABLE_DISCOVERY_JNP_INIT_PROP, String.valueOf(JNP_DISABLE_DISCOVERY));
env.setProperty("java.naming.factory.url.pkgs", "org.jboss.naming:org.jnp.interfaces"); //$NON-NLS-1$ //$NON-NLS-2$
InitialContext ic = new InitialContext(env);
try {
return (ProfileService)ic.lookup(PROFILE_SERVICE_JNDI_NAME);
} catch(NamingException e) {
ProfileService ps = (ProfileService)ic.lookup(SECURE_PROFILE_SERVICE_JNDI_NAME);
return (ProfileService)Proxy.newProxyInstance(this.getClass().getClassLoader(), new Class[] {ProfileService.class}, new JaasSecurityHandler(ps, this.userName, this.password));
}
} catch(NamingException e) {