0 Replies Latest reply on Aug 26, 2008 11:28 AM by Bernd Weigel

    strange behaivor of nonclustered ejb calling clustered ejb

    Bernd Weigel Newbie


      during my work on a student research project, I noticed a strage behavior.
      Following scenario:

      EJB1: a not clustered stateless EJB, which calls EJB2 per lookup

      public class Bean implements BeanLocal, BeanRemote {
       private Bean2 bean2;
       public void call(){
       Properties properties = new Properties();
       Context context;
       try {
       context = new InitialContext(properties);
       bean2 = (RemoteBean2) context.lookup(Bean2.RemoteJNDIName);
       } catch (NamingException e) {

      EJB2: a simple clustered stateless EJB
      public class Bean2 implements BeanLocal2, BeanRemote2 {
       public void doSomwthing(){

      So, if I start these Beans like above, Bean2 starts only on one node of my Cluster. If I use port 1099 (normal JNDI instead of HAJNDI), Bean2 starts on different nodes each time I start bean2.doSomething().
      I realy don't undestand this behaivior. Why does the use of HA-JNDI lets the bean2 unclustered while the use of JNDI leads to a clustered behaivior? I would understand if HAJNDI leads to a clustered and JNDI to an unclustered behaivior, but the opposite happens.
      Does anybody have got a good explanation or at least an idea why?

      Best Regards