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 73803 - EJB references for Java EE 5
Summary: EJB references for Java EE 5
Status: RESOLVED FIXED
Alias: None
Product: javaee
Classification: Unclassified
Component: EJB (show other bugs)
Version: 5.x
Hardware: All All
: P2 blocker (vote)
Assignee: Martin Adamek
URL:
Keywords: API_REVIEW_FAST
Depends on:
Blocks: 72063
  Show dependency tree
 
Reported: 2006-03-21 11:52 UTC by Martin Adamek
Modified: 2006-04-13 16:44 UTC (History)
2 users (show)

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments
Proposed change to EjbReference with removing of existing generateJNDILookup() methods (3.18 KB, text/plain)
2006-03-21 12:40 UTC, Martin Adamek
Details
New suggested EjbReferenceSimplified interface (1.57 KB, text/plain)
2006-03-28 07:28 UTC, Martin Adamek
Details
Changes in ejbapi module (4.65 KB, text/plain)
2006-03-28 07:29 UTC, Martin Adamek
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Adamek 2006-03-21 11:52:27 UTC
I see 2 problems with current EjbReference interface in EjbJar APIs module:
1) there is only one implementation of this interface and it has 2 additional
public methods (comparing to EjbReference interface) that are used on multiple
places, but they are not defined in interface. That's why on this places impl
class is used instead of using interface. That prevents new implementation of
this interface to be created and used.
2) current method for generating lookup code generateServiceLocatorLookup()
doesn't support following cases from from Java EE 5 area:
  2a) reference can be defined as annotated field
  2b) reference can be defined as field and its annotated setter
Current state suports only reference defined as exactly one method.
Comment 1 Martin Adamek 2006-03-21 12:10:43 UTC
Solution for problem 1) can be adding following methods to EjbReference interface:
void generateServiceLocatorLookup(EjbRef ref, JavaClass target, String
serviceLocatorName, boolean throwExceptions)
void generateServiceLocatorLookup(EjbLocalRef ref, JavaClass target, String
serviceLocatorName, boolean throwExceptions)

Solution for problem 2) can be adding following methods to EjbReference interface:
void generateReferenceCode(EjbRef ref, JavaClass target, boolean throwExceptions)
void generateReferenceCode(EjbLocalRef ref, JavaClass target, boolean
throwExceptions)

In fact best would be to remove existing methods generateJNDILookup(...), but
this is incompatible change and I am not sure it is possible.
Comment 2 Martin Adamek 2006-03-21 12:40:23 UTC
Created attachment 29323 [details]
Proposed change to EjbReference with removing of existing generateJNDILookup() methods
Comment 3 Martin Adamek 2006-03-28 07:26:17 UTC
To keep backward compatibility, EjbReference interface won't be touched. New
interface EjbReferenceSimplified is introduced. Old EjbReference will be
replaced everywhere with EjbReferenceSimplified in our code. EjbReference will
be marked as deprecated.
Comment 4 Martin Adamek 2006-03-28 07:28:31 UTC
Created attachment 29434 [details]
New suggested EjbReferenceSimplified interface
Comment 5 Martin Adamek 2006-03-28 07:29:29 UTC
Created attachment 29435 [details]
Changes in ejbapi module
Comment 6 Martin Adamek 2006-03-28 07:32:00 UTC
I would like to ask you for the review of this API change.
Comment 7 Martin Adamek 2006-04-12 14:09:34 UTC
I will commit tomorrow.
Comment 8 Martin Adamek 2006-04-13 16:44:39 UTC
Commited. As this is friend API, there is no deprecation but modification
instead. Also usages in friends are fixed.

cvs server: use 'cvs commit' to add this file permanently
/cvs/j2ee/ejbcore/src/org/netbeans/modules/j2ee/ejbcore/ui/logicalview/entres/CallEjbDialog.java,v
 <--  CallEjbDialog.java; new revision: 1.2.2.1.2.2; previous revision: 1.2.2.1.2.1
/cvs/j2ee/ejbcore/src/org/netbeans/modules/j2ee/ejbcore/ui/logicalview/entres/CallEjbPanel.java,v
 <--  CallEjbPanel.java; new revision: 1.2.2.5.2.3; previous revision: 1.2.2.5.2.2
/cvs/j2ee/ejbcore/src/org/netbeans/modules/j2ee/ejbcore/Utils.java,v  <-- 
Utils.java; new revision: 1.2.2.3.2.5; previous revision: 1.2.2.3.2.4
/cvs/j2ee/ejbcore/src/org/netbeans/modules/j2ee/ejbcore/Attic/EjbInjectionTargetQueryImplementation.java,v
 <--  EjbInjectionTargetQueryImplementation.java; new revision: 1.1.2.3;
previous revision: 1.1.2.2
/cvs/j2ee/ejbcore/src/org/netbeans/modules/j2ee/ejbcore/ui/logicalview/ejb/shared/EjbViewController.java,v
 <--  EjbViewController.java; new revision: 1.2.2.4.2.1; previous revision: 1.2.2.4
/cvs/j2ee/ejbcore/src/org/netbeans/modules/j2ee/ejbcore/ui/logicalview/ejb/session/SessionNode.java,v
 <--  SessionNode.java; new revision: 1.2.2.2.2.1; previous revision: 1.2.2.2
/cvs/j2ee/ejbapi/src/org/netbeans/modules/j2ee/api/ejbjar/EjbReference.java,v 
<--  EjbReference.java; new revision: 1.8.36.1; previous revision: 1.8
/cvs/j2ee/ejbapi/src/org/netbeans/modules/j2ee/spi/ejbjar/support/EjbEnterpriseReferenceContainerSupport.java,v
 <--  EjbEnterpriseReferenceContainerSupport.java; new revision: 1.1.2.3.2.1;
previous revision: 1.1.2.3
/cvs/j2ee/ejbcore/src/org/netbeans/modules/j2ee/ejbcore/ui/logicalview/ejb/dnd/EjbReference.java,v
 <--  EjbReference.java; new revision: delete; previous revision: 1.2.2.2.2
/cvs/j2ee/ejbcore/src/org/netbeans/modules/j2ee/ejbcore/ui/logicalview/ejb/dnd/Attic/EjbReferenceImpl.java,v
 <--  EjbReferenceImpl.java; new revision: 1.1.2.1; previous revision: 1.1
/cvs/j2ee/ejbapi/arch/apichanges.xml,v  <--  apichanges.xml; new revision:
1.1.22.1; previous revision: 1.1
/cvs/j2ee/ejbapi/arch/arch-j2ee-ejbprojectapi.xml,v  <-- 
arch-j2ee-ejbprojectapi.xml; new revision: 1.8.2.1.2.2; previous revision:
1.8.2.1.2.1
/cvs/websvc/dev/src/org/netbeans/modules/websvc/dev/wizard/WebServiceGenerator.java,v
 <--  WebServiceGenerator.java; new revision: 1.21.4.7.2.1; previous revision:
1.21.4.7
/cvs/j2ee/ejbcore/src/org/netbeans/modules/j2ee/ejbcore/ui/logicalview/ejb/entity/EntityNode.java,v
 <--  EntityNode.java; new revision: 1.2.2.2.2.1; previous revision: 1.2.2.2
/cvs/j2ee/utilities/src/org/netbeans/modules/j2ee/common/JMIUtils.java,v  <-- 
JMIUtils.java; new revision: 1.12.2.5.2.3; previous revision: 1.12.2.5.2.2
/cvs/j2ee/ejbapi/nbproject/project.properties,v  <--  project.properties; new
revision: 1.5.22.3; previous revision: 1.5.22.2