[jboss-user] [JNDI and Naming] - Re: EJB 3.0 and JNDI problems

PeterJ do-not-reply at jboss.com
Sat Sep 5 17:01:39 EDT 2009


What object are you expecting? In EJB3, for a remote client, you will always get a proxy that implements the remote interface.

By the way, you no longer need this code:

HelloWorldBeanRemote beanH = (HelloWorldBeanRemote)PortableRemoteObject.narrow(bean, HelloWorldBe
anRemote.class);

You can instead do this:

HelloWorldBeanRemote beanH = (HelloWorldBeanRemote)bean;

Finally, you should not be using the HelloWorldBean in your client, you should use only the remote interface. 

View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4253748#4253748

Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4253748



More information about the jboss-user mailing list