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

Bug 370256

Summary: Component interfaces for EJB 3.x beans are created with wrong package declaration if default package is changed in wizard
Product: [WebTools] WTP EJB Tools Reporter: Roberto Sanchez Herrera <shr31223>
Component: jst.ejbAssignee: Roberto Sanchez Herrera <shr31223>
Status: RESOLVED FIXED QA Contact: Kaloyan Raev <kaloyan>
Severity: normal    
Priority: P3 CC: ccc, neil.hauge
Version: 3.2.5PFlags: ccc: review+
Target Milestone: 3.2.5 P   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Bug Depends on: 369985    
Bug Blocks:    
Attachments:
Description Flags
Proposed patch for 3.2.5 P none

Description Roberto Sanchez Herrera CLA 2012-01-31 13:29:43 EST
+++ This bug was initially created as a clone of Bug #369985 +++

If the default package for component interfaces of a EJB 3.x session bean is changed in the wizard, the interface is created in the correct package, but the package statement in the interface is wrong: the package of the bean class is always used. 

I do not know if this error has been there since the creation of the wizard, but it is more evident now that the default package for interfaces can be changed by adopters (see bug 368506)

Steps to recreate:

1. In an EB 3.0 or 3.1 project, open the new session bean wizard
2. Type the name and the package (use com.test) for the bean class and click next
3. In the Home and Component interfaces (EJB 2.x) section, select bot the local and remote views. 
4. Click on the name of the local component interface, and change the package to com.test2). Do the same with the remote component interface.
5. Click finish. Both component interfaces are created inside the com.test2 package, but the package declaration in both interfaces is com.test.
Comment 1 Roberto Sanchez Herrera CLA 2012-01-31 13:31:00 EST
Bug to backport fix to 3.2.5 P
Comment 2 Roberto Sanchez Herrera CLA 2012-01-31 13:39:15 EST
Created attachment 210328 [details]
Proposed patch for 3.2.5 P
Comment 3 Carl Anderson CLA 2012-02-01 11:33:24 EST
Committed to R3_2_5_patches