[jboss-user] [EJB 3.0] - Re: javax.naming.NotContextException

jaikiran do-not-reply at jboss.com
Wed Jun 6 14:47:22 EDT 2007


anonymous wrote : Yes, I am using EJB 3.0. I currently do not have an ejb-jar.xml file. I have not developed with EJBs before but I thought that EJB 3.0 does not need one? 

Yes, that's right. I just wanted to confirm you were not using one.

anonymous wrote : m_metaAgent = (MetaAgent) PortableRemoteObject.narrow(ref, MetaAgent.class);

In EJB3, you no longer need the PortableRemoteObject.narrow. You can directly cast the returned object to the remote interface:

MetaAgent metaAgent = (MetaAgent) jndiContext.lookup("MetaAgentImpl");

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

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



More information about the jboss-user mailing list