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.
(using Java EE 5 spec.) -have ejb module with remote session bean -have some web app w/ servlet -invoke Call EJB action in servlet => private field annotated with @EJB is generated that's ok but ejb-ref element should not be added to dd in this case
org.netbeans.modules.j2ee.api.ejbjar.EnterpriseReferenceContainer.addEjbReferernce(EjbRef, String,AntArtifact) does 2 things: adds reference to model and adds new jar on project's classpath (if needed). For annotations we want to use autodiscovery with automatical model filling based on annotations events. I suggest to to change this contract somehow - split in 2 methods or mark that method for use only with J2EE 1.4, or something else in this way. Another part of question is, why action has write access to model based on XML file and doesn't use merged model - I will look at this part and file new issue if needed.
The simple solution is to keep this method as it is and not use it for Java EE 5. It is possible to add a project into another project's classpath using ProjectCPExtender.
fixed: /cvs/j2ee/ejbcore/src/org/netbeans/modules/j2ee/ejbcore/Utils.java,v <-- Utils.java new revision: 1.2.2.3.2.7; previous revision: 1.2.2.3.2.6
v. in beta