1 2 Previous Next 15 Replies Latest reply on Aug 27, 2012 5:38 PM by wolfgangknauf Go to original post
      • 15. Re: Problems with JBoss 7 and remote-interface lookup with context
        wolfgangknauf

        Hi,

         

        sorry, I did not find the time to play with JBoss since a few months now. But I will try to help.

         

        How do you start your client app? For an application client, you should start the application client by using the script "bin\app-client.bat" or "bin/app-client.sh" in your JBoss distribution.

         

        I assume you followed the guide on using remote EJB invocations: https://docs.jboss.org/author/display/AS71/EJB+invocations+from+a+remote+client+using+JNDI ?

         

        I think the JNDI properties can be simplified (maybe something causes a conflict):

         

        Properties props = new Properties();

        props.setProperty(Context.URL_PKG_PREFIXES, "org.jboss.ejb.client.naming");

         

        InitialContext initialContext = new InitialContext(props);

         

        return (CalculatorRemote) initialContext.lookup("ejb:TesteEar/EJB3_Chap02//CalculatorBean!calc.CalculatorRemote");

         

        Best regards

         

        Wolfgang

        1 2 Previous Next