4 Replies Latest reply on Oct 14, 2005 11:25 AM by Alexander Serbul

    Problem with JNDI security - please help

    Alexander Serbul Newbie

      Good day! I read in JBoss4 App.Server Guide that "Subcontexts and object bindings directly under java: are only visible within the JBoss server virtual machine and not to remote clients." But when my LOCAL client connects to REMOTE jboss4 server:

      Hashtable<String,String> env = new Hashtable<String,String>();
      env.put("java.naming.factory.initial","org.jnp.interfaces.NamingContextFactory");
      env.put("java.naming.provider.url","jnp://"+args[1]);
      env.put("java.naming.factory.url.pkgs","org.jboss.naming:org.jnp.interfaces");
      iniCtx = new InitialContext(env);
      NamingEnumeration ne = NamingEnumeration) iniCtx.list("java:");
      while (ne.hasMore()) log.info(ne.next());
      CMDBSHome thome = (CMDBSHome) iniCtx.lookup("CMDBSBean");
      log.info(thome);
      CMDBS tobj = (CMDBS) thome.create();
      log.info(tobj);
      log.info(tobj.start());

      i simply can create and invoke methods on REMOTE ejb residing in java: context. Please answer, why?