JBoss Community

Re: Problems with JBoss 7 and remote-interface lookup with context

created by Wolfgang Knauf in Beginner's Corner - View the full discussion

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

Reply to this message by going to Community

Start a new discussion in Beginner's Corner at Community