0 Replies Latest reply on Apr 4, 2006 12:06 PM by Gaston

    Problems with MBeanServerConnection in Context

    Gaston Newbie

      Hi, im just write about a possible error getting connections using
      Context.lookup.

      Right now i have 2 environments, both configured with jboss-3.2.5
      one over a windows 2000 and the other one over debian.

      Well, here is the code with strange behavior..

      Hashtable props = new Hashtable();
      props.put(Context.INITIAL_CONTEXT_FACTORY, "org.jnp.interfaces.NamingContextFactory");
      props.put(Context.URL_PKG_PREFIXES, "org.jboss.naming:org.jnp.interfaces");
      props.put(Context.PROVIDER_URL, "jnp://" +server+ "1099");

      Context ctx = new InitialContext(props);
      MBeanServerConnection server = (MBeanServerConnection)
      ctx.lookup("jmx/invoker/RMIAdaptor");

      When server match the following "servername." ("." at the end)...
      whell over windows the connection and context work fine, but
      over linux an exception is thrown.

      Anyone can tell me why the context and connection works over
      linux but not over windows systems?

      Thanks .