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

Bug 313571

Summary: [XML Catalog] XML Catalog should provide a way to re-load cached entries.
Product: [WebTools] WTP Source Editing Reporter: Gabriel Indik <gindik>
Component: wst.xmlAssignee: Rakesh <rakes123>
Status: RESOLVED FIXED QA Contact: Nitin Dahyabhai <thatnitind>
Severity: normal    
Priority: P3 CC: keith.chong.ca, laszlo.varadi, nsand.dev, rakes123
Version: 3.2Flags: nsand.dev: review+
Target Milestone: 3.3 M6   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
patch nsand.dev: iplog+

Description Gabriel Indik CLA 2010-05-19 12:37:02 EDT
Take the following scenario:

 - Add a "Next Catalog" entry to the XML catalog
 - Test that the entry works properly and documents are correctly resolved
 - Make modifications to the catalog XML file, change URIs so that documents cannot be resolved
 - Test resolving the catalog entries again. They will continue to work. This is because these entries have been cached.

There doesn't seem to be a way to reload XML Catalog entries other than removing and adding them back. There should be an option to reload all cached entries.
Comment 1 Rakesh CLA 2010-08-04 03:23:19 EDT
Created attachment 175816 [details]
patch

We are using cached values , even if we remove and add NextCatalog, value cached for the first time are being used.Even though we may see new catalogs in preferences , behind the scene, only cached(stale) values are being used.I have added a ClearCache button in preferences page.
Comment 2 László Váradi CLA 2011-01-24 09:44:09 EST
I am facing this issue, as well. 

In our case, an m2eclipse project configurator tries to put nextcatalog entries into the xml catalog user catalog entries. The catalog file may change as these catalog files are generated based on the xsd files in a folder. The change is not taken into account, because the Catalog caches the old referencing catalog in case of nextcatalog entries.
Removing the nextcatalog entry and readding it does not solve the problem, becauase the entries from the catalog set are never removed. So next time, when the nextcatalog entry tries to "createOrLookup" the catalog from the catalog set to retrieve the referencing catalog, it will retrieve the old catalog object.

In case of removing a catalog, the catalog set should also be changed.

-- Vazul
Comment 3 Nick Sandonato CLA 2011-02-22 14:18:59 EST
Code checked in. Just tweaked Clear Cache to Reload Entries and removed some copy/paste comments.