* @return the initial context
* @throws NamingException for any naming error
*/
public Context getInitialContext() throws NamingException {
Hashtable environment = new Hashtable();
Namespace namespace;
try {
namespace = createNamespace(_provider.getNameParser());
} catch (NamingException exception) {
throw exception;
} catch (Exception exception) {
throw new CommunicationException(exception.toString());
}
environment.put(RemoteContext.NAMING_PROVIDER, _provider);
environment.put(RemoteContext.NAMESPACE, namespace);
final Name baseName = namespace.getNameParser().parse("");
return new RemoteContext(environment, baseName);
}