Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 313577 - Code for JEE 6 still goes out to the web to access xsd files
Summary: Code for JEE 6 still goes out to the web to access xsd files
Status: RESOLVED FIXED
Alias: None
Product: WTP Java EE Tools
Classification: WebTools
Component: jst.j2ee (show other bugs)
Version: 3.2   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.2 RC2   Edit
Assignee: Carl Anderson CLA
QA Contact: Chuck Bridgham CLA
URL:
Whiteboard: PMC_approved
Keywords:
: 298576 (view as bug list)
Depends on:
Blocks:
 
Reported: 2010-05-19 13:01 EDT by Roberto Sanchez Herrera CLA
Modified: 2010-05-28 21:27 EDT (History)
3 users (show)

See Also:
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+


Attachments
The package must be registered with the Java EE 5 and Java EE 6 xsds (7.73 KB, patch)
2010-05-19 13:04 EDT, Carl Anderson CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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. ***