4 Replies Latest reply on Jun 4, 2013 4:04 PM by wdfink

    Did anyone get ejb lookup to work with remote:// ?

    gwwallace

      Trying to get remote EJB lookup to work using

       

          final Properties env = new Properties();

       

          env.put(Context.INITIAL_CONTEXT_FACTORY, org.jboss.naming.remote.client.InitialContextFactory.class.getName());
          env.put(Context.PROVIDER_URL, "remote://cmc5-104.alpha.farecompare.com:4447");

       

          InitialContext ctx = new InitialContext(env);

       

          RelayModuleAPI relayModule = (RelayModuleAPI) ctx.lookup(beanLookupString);

       

      If i use 'relaymodule/farecompare-relaymodule/RelayModuleSessionBean!com.farecompare.jboss7example.relay.api.RelayModuleAPI' as the beanLookupString

      that works but when i make a method call i get

       

      Exception in thread "main" java.lang.IllegalStateException: EJBCLIENT000025: No EJB receiver available for handling [appName:relaymodule, moduleName:farecompare-relaymodule, distinctName:] combination for invocation context org.jboss.ejb.client.EJBClientInvocationContext@3ab62081

              at org.jboss.ejb.client.EJBClientContext.requireEJBReceiver(EJBClientContext.java:583)

              at org.jboss.ejb.client.ReceiverInterceptor.handleInvocation(ReceiverInterceptor.java:116)

              at org.jboss.ejb.client.EJBClientInvocationContext.sendRequest(EJBClientInvocationContext.java:181)

              at org.jboss.ejb.client.EJBInvocationHandler.doInvoke(EJBInvocationHandler.java:136)

              at org.jboss.ejb.client.EJBInvocationHandler.doInvoke(EJBInvocationHandler.java:121)

              at org.jboss.ejb.client.EJBInvocationHandler.invoke(EJBInvocationHandler.java:104)

              at $Proxy0.getNameForCityCode(Unknown Source)