Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 313571 - [XML Catalog] XML Catalog should provide a way to re-load cached entries.
Summary: [XML Catalog] XML Catalog should provide a way to re-load cached entries.
Status: RESOLVED FIXED
Alias: None
Product: WTP Source Editing
Classification: WebTools
Component: wst.xml (show other bugs)
Version: 3.2   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.3 M6   Edit
Assignee: Rakesh CLA
QA Contact: Nitin Dahyabhai CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-05-19 12:37 EDT by Gabriel Indik CLA
Modified: 2011-02-22 14:23 EST (History)
4 users (show)

See Also:
nsand.dev: review+


Attachments
patch (5.75 KB, patch)
2010-08-04 03:23 EDT, Rakesh CLA
nsand.dev: iplog+
Details | Diff

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