Bug 242611 - Incorrect initial project for bottom-up EJB 3.0 Web service
Summary: Incorrect initial project for bottom-up EJB 3.0 Web service
Status: CLOSED FIXED
Alias: None
Product: WTP Webservices
Classification: WebTools
Component: jst.ws (show other bugs)
Version: 3.0   Edit
Hardware: PC Windows XP
: P2 major (vote)
Target Milestone: 3.0.1   Edit
Assignee: Allan Zhang CLA
QA Contact: Kathy Chan CLA
URL:
Whiteboard: PMC_approved
Keywords: contributed
Depends on:
Blocks:
 
Reported: 2008-07-30 14:45 EDT by Allan Zhang CLA
Modified: 2008-10-29 12:25 EDT (History)
3 users (show)

See Also:
kathy: pmc_approved? (david_williams)
kathy: pmc_approved? (raghunathan.srinivasan)
kathy: pmc_approved? (naci.dai)
deboer: pmc_approved+
kathy: pmc_approved? (neil.hauge)
kathy: pmc_approved? (kaloyan)


Attachments
Here's the patch. (1.94 KB, patch)
2008-07-30 14:55 EDT, Allan Zhang CLA
bjorn.freeman-benson: iplog+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Allan Zhang CLA 2008-07-30 14:45:02 EDT
1. Create EJB 3.0 with unsupported Web service runtime
2. Web Service wizard will default incorrect initial project which will cause exception instead of giving out error in the first page.
Comment 1 Allan Zhang CLA 2008-07-30 14:55:33 EDT
Created attachment 108771 [details]
Here's the patch.

Attaching the patch.
Comment 2 Allan Zhang CLA 2008-07-30 15:27:12 EDT
The patch only affect bottom-up EJB Web service scenarios. EJB 2.0, 2.1 and 3.0 has been tested. 
Comment 3 Allan Zhang CLA 2008-07-30 16:04:48 EDT
Changes are in org.eclipse.jst.ws.internal.creation.ui.widgets.runtime.ServerRuntimeSelectionWidgetDefaultingCommand line 145.

Where the initialProject_ need to set in DefaultRuntimeTriplet for bottom-up EJB Web service scenarios.

If the initialProject_ (where contains the EJB class) isn't set, the wizard would have problem to locate the EJB later in the Bean Identify page where it will give the exception.  
Comment 4 Kathy Chan CLA 2008-07-30 16:31:32 EDT
I've reviewed the code with Allan.  The change is only affecting bottom-up EJB scenario (bottom-up Java, skeleton and client project defaulting is not touched).  So with the fix, rather than defaulting to a project not containing the EJB and causing error down the road in the wizard, we are defaulting the project to the initial project for bottom-up EJB if the normal defaulting logic could not reasonably default a project. After the defaulting code is done, the validation code would be run to catch any error with using that project in the chosen scenario.  This is better than the original problem where it silently pick another project fails later on.

Allan has tested all EJB scenarios and Java scenarios as well.

PMC, please approve for WTP 3.0.1.
Comment 5 Tim deBoer CLA 2008-07-30 16:40:30 EDT
Minor change, approved.
Comment 6 Peter Moogk CLA 2008-07-30 17:05:26 EDT
The patch for this defect has been committed and released to the HEAD and V301 streams under v200807302056.
Comment 7 Kathy Chan CLA 2008-10-27 14:18:26 EDT
This defect has been in resolve state for a while.  Please verify this with the appropriate WTP driver which can be found in:

http://download.eclipse.org/webtools/downloads/

We would verify and close the defect on the originator's behalf if it has not been verified 2 weeks after it's been changed to Verified state.
Comment 8 Allan Zhang CLA 2008-10-29 12:24:44 EDT
Verified
Comment 9 Allan Zhang CLA 2008-10-29 12:25:26 EDT
Closed