InitialContext initialContext = getAppServerInitialContext();
return clazz.cast(initialContext.lookup(jndiName));
}
public static InitialContext getAppServerInitialContext() throws NamingException {
ResourceContainer resourceContainer = PluginContainer.getInstance().getInventoryManager().getResourceContainer(
getASResource());
Configuration asConfiguration = resourceContainer.getResourceContext().getPluginConfiguration();
Properties env = new Properties();
env.setProperty(Context.PROVIDER_URL, asConfiguration.getSimpleValue("namingURL", null));
env.setProperty(Context.INITIAL_CONTEXT_FACTORY, "org.jnp.interfaces.NamingContextFactory");