endpoint.getConfiguration().getJndiProviderUrl() != null) {
props.put(InitialContext.INITIAL_CONTEXT_FACTORY, endpoint.getConfiguration().getJndiInitialContextFactory());
props.put(InitialContext.PROVIDER_URL, endpoint.getConfiguration().getJndiProviderUrl());
return new InitialContext(props);
} else {
BaseLifeCycle lf = (BaseLifeCycle) endpoint.getServiceUnit().getComponent().getLifeCycle();
return lf.getContext().getNamingContext();
}
}