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.

Bug 75484 - Call EJB action should not add code to DDs
Summary: Call EJB action should not add code to DDs
Status: VERIFIED FIXED
Alias: None
Product: javaee
Classification: Unclassified
Component: EJB (show other bugs)
Version: 5.x
Hardware: All All
: P1 blocker (vote)
Assignee: Pavel Buzek
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-04-25 13:12 UTC by Lukas Jungmann
Modified: 2006-05-02 15:59 UTC (History)
3 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Lukas Jungmann 2006-04-25 13:12:09 UTC
(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
Comment 1 Martin Adamek 2006-04-25 16:03:34 UTC
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.
Comment 2 Pavel Buzek 2006-04-26 19:23:26 UTC
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.
Comment 3 Pavel Buzek 2006-04-26 21:07:12 UTC
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
Comment 4 Lukas Jungmann 2006-05-02 15:59:30 UTC
v. in beta