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

Bug 313577

Summary: Code for JEE 6 still goes out to the web to access xsd files
Product: [WebTools] WTP Java EE Tools Reporter: Roberto Sanchez Herrera <shr31223>
Component: jst.j2eeAssignee: Carl Anderson <ccc>
Status: RESOLVED FIXED QA Contact: Chuck Bridgham <cbridgha>
Severity: normal    
Priority: P3 CC: ccc, raghunathan.srinivasan, timo.kinnunen
Version: 3.2Flags: ccc: pmc_approved? (david_williams)
raghunathan.srinivasan: pmc_approved+
ccc: pmc_approved? (naci.dai)
ccc: pmc_approved? (deboer)
ccc: pmc_approved? (neil.hauge)
ccc: pmc_approved? (kaloyan)
cbridgha: review+
Target Milestone: 3.2 RC2   
Hardware: PC   
OS: Windows XP   
Whiteboard: PMC_approved
Attachments:
Description Flags
The package must be registered with the Java EE 5 and Java EE 6 xsds none

Description Roberto Sanchez Herrera CLA 2010-05-19 13:01:08 EDT
Build Identifier: I20100511-0800

For Java EE 6, WTP still has to go out to the web to access the xsd files to load the deployment descriptor. if the XSD files cannot be loaded from the web, WTP hangs

Reproducible: Always
Comment 1 Carl Anderson CLA 2010-05-19 13:04:29 EDT
Created attachment 169152 [details]
The package must be registered with the Java EE 5 and Java EE 6 xsds
Comment 2 Carl Anderson CLA 2010-05-19 13:07:36 EDT
Due to the fact that the same EMF models are used for both Java EE 5 and Java EE 6, the default EMF-generated code uses the original eNS_URI as the hashkey for looking up requests.  We need to register the Packages with both the Java EE 5 and Java EE 6 URIs, so that when a deployment descriptor is created for Java EE 6 objects, the parser for the deployment descriptor is able to look up the model in EMF instead of having to go out to the web.
Comment 3 Carl Anderson CLA 2010-05-19 13:10:36 EDT
Also, as a note, this patch does not effect Connector 1.6 nor Web fragment 3.0, since neither of these had an equivalent in Java EE 5.
Comment 4 Chuck Bridgham CLA 2010-05-19 13:28:37 EDT
approve
Comment 5 Carl Anderson CLA 2010-05-19 14:44:23 EDT
This bug is stop-ship because it can cause Eclipse to hang in certain scenarios.
There is no workaround.
This fix has had the Java EE Tools JUnit bucket run against it, as well as having been tested by hand- I put a breakpoint in URIHandlerImpl.createInputStream() and looked at the URIs passed in to ensure that we were not going out to the web.
Chuck Bridgham and Jason Sholl have reviewed this fix.  See comment #2 for a technical overview of the fix.
The risk is low- this is just additional keys that can be looked up in a HashMap to resolve the correct EPackage for the given URI.
Comment 6 Carl Anderson CLA 2010-05-19 15:53:49 EDT
Committed to HEAD for WTP 3.2 RC2.
Comment 7 Carl Anderson CLA 2010-05-28 21:27:40 EDT
*** Bug 298576 has been marked as a duplicate of this bug. ***