1 Reply Latest reply on Sep 9, 2003 9:29 AM by Adrian Brock

    EJB interacting between nodes in a cluster

    juliankite Newbie

      I have three stateless session beans FacadeEJB, FirstEJB and SecondEJB. I have a two node cluster. The FacadeEJB and the FirstEJB are on node 1. The SecondEJB is on node 2. The facadeEJB is a coordinater that interacts with the FirstEJB followed by the SecondEJB. My client application talks only to the FacdeEJB. It correctly connects via the cluster wide HA-JNDI to FacadeEJB on node 1. The FacadeEJB's first task is to obtain the home intreface of the FirstEJB and then the home interface of SecondEJB. It obtains the home interface for the FirstEJB (the same node i.e. node 1) without problem. However, when it attempts to obtain the home interface of the SecondEJB (which is only on node 2) it returns a NameNotFoundException.

      Now, according to the HA-JNDI documentation the home interfaces are only available in the local JNDI server. However, it also states that if it is not available in the cluster-wide JNDI server (HA-JNDI) then it will look at the local JNDI server and then at each JNDI server of each node in the cluster. For my scenerio,the SecondEJB is not in the HA-JNDI (home interfaces never are) and is not in the local JNDI server of node 1 but it is in the JNDI server of node 2.

      My question is why can it not find it? Is this a bug? I'm using JBoss3.2.2RC3.

      The FacadeEJB acts as if it only as access to the local JNDI server - that would explain the results I am seeing. I'm using a default initial context (i.e. no properties) which I presume then uses the JNDI.properties in the \conf directory. That file is the default from the initial installation and has no setting for the URL (as per the comment that it contains). To me that means that it should be using the HA-JNDI server.

      Any help on this would be appraciated.

      Cheers Julian Kite