This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
I created a J2EE 1.4 web project and made it part of an EAR that contains an EJB 3.0 project. In the web project I created a new JAX-RPC web service endpoint, and told it to create the service from an existing EJB. I chose the EJB 3 session bean (only has a local interface). It created an empty web service and didn't show any sign that it used the EJB. It didn't add ejb resource reference to web.xml, no code that uses the EJB, etc. I was hoping this feature would show me how to access EJB 3.0 session bean from J2EE 1.4 since I can't figure out how to look it up in JNDI without getting exceptions.
The wizard generates configuration stuff like web.xml, webservices.xml or jaxrpc-config.xml file. But I agree the feature is rather poor. It should also generate the lookup method for Local interface. (Note: the feature works the same regardless EJB is 3.0 or 2.0) There is a workaround for that - use Insert Code -> Call Enterprise Bean (editor) action. The code like this is generated(the bean is ABean with ALocal interface): private a.ALocal lookupA() { try { Context c = new InitialContext(); return (a.ALocal) c.lookup("java:comp/env/A"); } catch (NamingException ne) { Logger.getLogger(getClass().getName()).log(Level.SEVERE, "exception caught", ne); throw new RuntimeException(ne); } } Nevertheless, I tested the generated code with GlasFish V2 and it doesn't seem to work. It's more likely a GlassFish problem and I'll report a bug for that.
I reported an issue to EJB experts to evaluate: issue 146293.
*** This issue has been marked as a duplicate of 134984 ***