11 Replies Latest reply on Nov 16, 2007 6:23 PM by Ian Nelson

    Help with simple sample setup.

    Ian Nelson Newbie

      I'm running the example from http://wiki.jboss.org/wiki/Wiki.jsp?page=JMXMBeanRemoteProxy
      but whenever my clients try to connect they cannot find the object in the JNDI registry.

      When I do a "/usr/local/jboss/bin/twiddle.sh --server= serverinfo --list" I see the new InvokeTarget listed:


      but when my client code tries to connect to it, it always fails to look it up. Here is the client code:

      try {
      Hashtable<String,String> environment = new Hashtable<String,String>();
      environment.put(Context.INITIAL_CONTEXT_FACTORY, "org.jnp.interfaces.NamingContextFactory");
      environment.put(Context.URL_PKG_PREFIXES, "org.jboss.naming:org.jnp.interfaces");
      environment.put(Context.PROVIDER_URL, "jnp://"); // remote machine IP
      InitialContext ic = new InitialContext( environment );
      MyServiceMBean myService = (MyServiceMBean)ic.lookup("MyService");
      } catch( Exception e ) {
      log.error("exception: " + e);

      I'm sure there is something stupid I'm seeing or doing. I'm running on Jboss 4.2 with a fairly stock default like server.

      thanks for any suggestions.