Without looking at your configuration files and the EJB/lookup code, i am just guessing that your bean is bound to the Global JNDI namespace, by the jndi name "env/ejb/CalcHome" (the remote home) and "env/ejb/CalcLocalHome" (for the local home). So if you are looking up the remote interface then your lookup code should look like:
Context ctx = new InitialContext();
| //remote bean lookup
| Object obj = ctx.lookup("env/ejb/CalcHome");
| CalcHome home = (CalcHome) PortableRemoteObject.narrow(obj,CalcHome.class);
| //create the remote bean
| bean = home.create();
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4055068#4055068
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4055068
anonymous wrote : +- MediasBean (class: org.jnp.interfaces.NamingContext)
| | +- remote (proxy: $Proxy73 implements interface org.jboss.projectland.Medias,interface org.jboss.ejb3.JBossProxy,interface javax.ejb.EJBObject)
anonymous wrote : Medias medias = (Medias) ctx.lookup(MediasBean.class.getName()+"/remote");
|
Change your lookup code to:
Medias medias = (Medias) ctx.lookup("MediasBean/remote");
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4055066#4055066
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4055066