Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 220156

Summary: [project creation] ejb-jar.xml should be mandatory when ejb-client.jar is generated
Product: [WebTools] WTP EJB Tools Reporter: Kaloyan Raev <kaloyan>
Component: jst.ejbAssignee: Kaloyan Raev <kaloyan>
Status: CLOSED FIXED QA Contact: Kaloyan Raev <kaloyan>
Severity: normal    
Priority: P3 CC: ccc, thebravoman
Version: 3.0   
Target Milestone: 3.0 M7   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
patch none

Description Kaloyan Raev CLA 2008-02-25 04:48:01 EST
I had a recent look at the EJB 3.0 (Core) spec. In chapter 20.4 - The Client View and the ejb-client JAR File - I read:

>>> QUOTE >>>
The ejb-client JAR file is specified in the deployment descriptor of the ejb-jar file using the optional ejb-client-jar element. The value of the ejb-client-jar element is the path name specifying the location of the ejb-client JAR file in the containing Java EE Enterprise Application Archive (.ear) file. The path name is relative to the location of the referencing ejb-jar file.
<<< END OF QUOTE <<<

In my opinion the above means that when an EJB 3.0 project is created and the option for generating client JAR is checked, then the ejb-jar.xml should be generated, too. And the ejb-client-jar tag should be automatically set. At the moment the user can still choose if he wants an ejb-jar.xml in this case (defaults to no ejb-jar.xml). 

If I invoke the Java EE > Generate Deployment Descriptor Stub action on the EJB project, then the ejb-jar.xml is generated and the ejb-client-jar tag is there pointing correctly to the ejb client project. This means that the EJB model is correct in the memory and only the ejb-jar.xml file is missing. 

The best solution, in my opinion, should be to modify the EJB wizard: when the "Create an EJB Client Jar" checkbox is checked, then the "Generate deployment descriptor" checkbox should be disabled and checked. 

Carl, any thought on this?
Comment 1 Kaloyan Raev CLA 2008-03-24 04:14:09 EDT
*** Bug 223502 has been marked as a duplicate of this bug. ***
Comment 2 Kaloyan Raev CLA 2008-04-16 05:56:35 EDT
Created attachment 96227 [details]
patch
Comment 3 Kaloyan Raev CLA 2008-04-16 05:59:19 EDT
dropped to HEAD
Comment 4 Kaloyan Raev CLA 2008-04-17 15:21:57 EDT
Cannot see the changed behavior in the I20080417052146 build.
Comment 5 Kaloyan Raev CLA 2008-04-18 04:14:29 EDT
I was actually looking on the wrong build. 
Comment 6 Kaloyan Raev CLA 2008-04-18 04:14:56 EDT
Verified with the I20080417213732 build. 
Comment 7 Kaloyan Raev CLA 2008-05-12 09:24:55 EDT
Closing