[jboss-user] [EJB 3.0] - Re: Remote access error (in the most simple situation, why?)
Wolfgang Knauf
do-not-reply at jboss.com
Fri Oct 13 04:16:49 EDT 2006
Hi !
First of all you cannot cast a remote interface but must use "PortableRemoteObject.narrow":
Object objRemote = initialContext.lookup("....");
BoardGamesServiceFacade bgsf = (BoardGamesServiceFacade) PortableRemoteObject.narrow(objRemote, BoardGamesServiceFacade.class);
The JNDI-name of your bean is by default
"EarName/BoardGamesServiceFacadeBean/remote" (where EARName is probably "bgsw" in your sample, your JNDI snippet is missing the first line where the ear name is shown ;-) ).
Hope this helps
Wolfgang
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3978098#3978098
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3978098
More information about the jboss-user
mailing list