1 Reply Latest reply on Dec 6, 2006 11:59 AM by Francisco Reverbel

    Can't download the ejb home stub using iiop instead of jnp

    William Wong Newbie

      I successfully deployed a session bean with both iiop and jnp invoker. In the client, with using jnp, everythings work fine but when using iiop, PortableRemoteObject.narrow() return a null object. Once I put the stub class in the client class path, it works fine. Seems the dynamic downloading of the stub isn't working for iiop.

      Here's the client code:
      env.put(InitialContext.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.cosnaming.CNCtxFactory");
      env.put(InitialContext.PROVIDER_URL, "corbaloc::lap-ww:3528/JBoss/Naming/root");
      InitialContext context = new InitialContext(env);
      Object staHomeObj = context.lookup ("myTest/Status");
      StatusHome staHome = (StatusHome)javax.rmi.PortableRemoteObject.narrow( (org.omg.CORBA.Object)staHomeObj, StatusHome.class);

      I have the following jar included in the client class path:

      $JBOSS_HOMEclient/logkit.jar"
      "$JBOSSLIB/jacorb.jar"
      "$JBOSSLIB/commons-logging.jar"
      "$JBOSSLIB/avalon-framework.jar"

      With the following client.policy:

      grant {
      permission java.security.AllPermission;
      };

      I also inspected the staHomeObject ior string using jacorb's dior, which is matched to the one when jboss startup with the following java code base:

      http://lap-ww:8083/WebCL[myTest/Status]/

      Is anything I have been missed?