2 Replies Latest reply on Jun 29, 2004 10:21 AM by maroni

    how to bind a serializable object into HA-JNDI

    maroni Newbie

      Hi,
      Can anybody help me? This JNDI is driving me mad...
      How can I bind a serializable(!) object to HA-JNDI, so that this object can be accessed and used clusterwide? Or is it just a dream I have?

      I know that there is a NonSerializableFactory to bind things into (HA-)JNDI, but this solution only works on the local machine.
      I just want to store a String object in HA-JNDI which tells everyone in the cluster which node is the master node so that the started singleton MBeans can be directly accessed.

      How can I achieve that? Or has anybody got another idea of how to "globalize" this master information?

      Thanks a lot,
      Marion

        • 1. Re: how to bind a serializable object into HA-JNDI
          raz Newbie

          bind it to port 1100, not to 1099(where the local JNDI is)
          props.put(javax.naming.Context.PROVIDER_URL, "localhost:1100");

          • 2. Re: how to bind a serializable object into HA-JNDI
            maroni Newbie

            Sorry, that´s a misunderstanding. I was not precise enough.

            Using port 1100, that´s what I did, and the name IS definitely in HA-JNDI. When I do a lookup on all the nodes of the cluster, the name is bound and there. But when I want to access the returned object, it´s null.

            For binding, I used the NonSerializableFactory class, and obviously that´s the reason why this does not work (according to what I read in the forum). But what can I use instead? How can I bind an object to HA-JNDI so that it stays serializable?