1 Reply Latest reply on Sep 6, 2002 12:34 PM by Manuel Fehlhammer

    Problems binding a remote RMI-IIOP Server to JNDI

    Mark Corbet Newbie

      I'm trying to bind a class remotely to the JNDI running in JBoss, but what gets bound is not the Remote object but the object itself.

      I've defined:
      public interface TestOperations extends Remote

      public class TestImpl extends TestObject implements TestOperations

      and a test class that does:
      TestImpl impl = new TestImpl();
      mContext.bind( "TestName", impl );

      and I've compiled the Impl stub classes using rmic.

      - When I define the Impl to extend the Serializable interface (which it shouldn't have to), the binding exports the actual Impl object, not the Remote object
      - If I define the Impl to not extend the Serialzable interface the bind operation throws and java.io.NotSerializable exception
      - I've also tried explicitly binding the Remote object using PortableRemoteObject.toStub() method, but then the bind operation throws a Null Pointer Exception.

      The exact same code works in Weblogic. Does the Naming Provider (org.jnp.interfaces.NamingContextFactory) allow stubs to be exported?