I have registered JNDI. When I invoke Conrext.createSubcontext I get the exception:
javax.naming.OperationNotSupportedException
at com.sun.jndi.rmi.registry.RegistryContext.createSubcontext(RegistryContext.java:226)
at com.sun.jndi.toolkit.url.GenericURLContext.createSubcontext(GenericURLContext.java:390)
at javax.naming.InitialContext.createSubcontext(InitialContext.java:464)
Implementation looks like:
Registry reg = LocateRegistry.createRegistry(1099);
Properties properties = new Properties();
properties.put(Context.INITIAL_CONTEXT_FACTORY, "org.jnp.interfaces.NamingContextFactory");
properties.put(Context.URL_PKG_PREFIXES, "org.jboss.naming:org.jnp.interfaces");
properties.put(Context.PROVIDER_URL, "localhost:1099");
InitialContext initialContextcontext = new InitialContext(properties);
ic.createSubcontext("rmi://localhost/java:jdbc");
Please suggest where I missed.