0 Replies Latest reply on Mar 21, 2006 9:36 AM by preddy

    Problem in Remote Bean lookup

    preddy

      Hi,
      I have configured two machines in JBoss Cluster. I am using following code from machine1 for creating a bean object deployed in machine2
      (Bean is deployed in both machines)

      Properties properties = new Properties();
      properties.put(Context.INITIAL_CONTEXT_FACTORY,"org.jnp.interfaces.NamingContextFactory");
      properties.put(Context.PROVIDER_URL,remoteIP:1099);
      initialContext = new InitialContext(properties);
      managerHome = (ManagerHome)initialContext .lookup(jndiName);
      managerRemote = (ManagerRemote)managerHome.create();

      'remoteIP' is the IPAddress of 2nd machine in the cluster. But above code is always returning reference to the local bean.
      Is there any setting in jboss which lookup the local bean?

      Thanks.