0 Replies Latest reply on Aug 21, 2002 10:16 AM by simo

    HA-JNDI for non-EJB participants

      I am trying to evaluate using HA-JNDI for an application that currently uses Java IDL's transient naming service with RMI-IIOP stubs. (This is potentially a first step towards migrating the app to EJBs, for now we would only take advantage of the clustered naming service.)

      I am trying to bind the stubs by calling :
      initialContext.rebind("aName", PortableRemoteObject.toStub(aRemoteObject))
      - and get error:

      java.lang.NullPointerException
      at java.io.ObjectOutputStream.write(ObjectOutputStream.java:1337)
      at com.sun.corba.se.internal.javax.rmi.CORBA.StubDelegateImpl.writeObjec
      t(StubDelegateImpl.java:294)
      at javax.rmi.CORBA.Stub.writeObject(Stub.java:187)
      at java.lang.reflect.Method.invoke(Native Method)
      at java.io.ObjectOutputStream.invokeObjectWriter(ObjectOutputStream.java
      :1864)
      at java.io.ObjectOutputStream.outputObject(ObjectOutputStream.java:1210)

      at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:366)
      at java.rmi.MarshalledObject.(MarshalledObject.java:95)
      at org.jnp.interfaces.MarshalledValuePair.(MarshalledValuePair.jav
      a:23)
      at org.jnp.interfaces.NamingContext.rebind(NamingContext.java:299)
      at org.jnp.interfaces.NamingContext.rebind(NamingContext.java:269)
      at javax.naming.InitialContext.rebind(InitialContext.java:366)

      I can bind other Serializable objects or References to the naming context with same jndi properties.

      Is it technically possible to use the HA-JNDI to store my RMI-IIOP stubs this way and achieve fail-safe Naming service? If not, could I use the iiop-service in this manner (only as an ORB, without moving my code to EJBs) and would the iiop-service be clustered? Or, is there any other way I could achieve the goal of migrating from using the Java IDL tnameserv to a clustered naming service provided by Jboss.
      Any help would be greatly appreciated,
      Thank you,
      -Simo