0 Replies Latest reply on Feb 19, 2007 11:15 PM by haribaasha

    newbie - Remote call not happening when ejb resides in same

    haribaasha

      this is my code to lookup the ejb

      private static Hashtable _jndiProperties = new Hashtable();

      _jndiProperties.put( Context.INITIAL_CONTEXT_FACTORY, "org.jnp.interfaces.NamingContextFactory" );

      _jndiProperties.put( Context.URL_PKG_PREFIXES , "org.jboss.naming:org.jnp.interfaces" );

      _jndiProperties.put( Context.PROVIDER_URL, "localhost:1100" );

      Context context = new InitialContext( _jndiProperties );

      Object objref = context.lookup( "IndicativesEJB" );

      RSIndicativeServiceHome indicServiceHome = (RSIndicativeServiceHome)PortableRemoteObject.narrow( objref, RSIndicativeServiceHome.class );

      RSIndicativeServiceRemote indicServiceRemote = indicServiceHome.create();

      indicResponse = indicServiceRemote.serviceRequest( param1, param2);



      my setup is as follows :
      3 jboss servers, with all three containing the ejb, when above code is invoked, the ejb from that local machine is only called, clustering/remote does not happen.

      when ejb is removed from that machine, then remote call happens to the other two machines(clustering)

      Cant the ejb reside in the same machine where the lookup happens?
      what have i done wrong?

      Hari