Bug 232983 - FileSettingStore uses the same key for different entry-points and/or servlet names
Summary: FileSettingStore uses the same key for different entry-points and/or servlet ...
Status: ASSIGNED
Alias: None
Product: RAP
Classification: RT
Component: Workbench (show other bugs)
Version: 1.0   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-05-20 10:37 EDT by Frank Appel CLA
Modified: 2013-06-06 08:47 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Frank Appel CLA 2008-05-20 10:37:10 EDT
Using the same key for different entry-points and servlet names leads to problems. If a user starts different entry-points from the same browser (this means the settingstore cookie is reused), the same settingstore is provided for both.

The generated key should take this into account. Maybe it would be also a better approach to let the key be generated by RWT and not by the settingstore implementation.
Comment 1 Ivan Furnadjiev CLA 2013-06-05 09:09:06 EDT
Today I've checked the current status of this issue with RAP 2.1. I've tested with two scenarios:
a) RWT application with two entry points running in the same browser accessed by:
http://127.0.0.1:8080/foo/hello-1
http://127.0.0.1:8080/foo/hello-2
In this case both entry points share the same setting store (same cookie, as context/cookie path is the same).
b) Two RWT applications running in the same browser accessed by:
http://127.0.0.1:8080/foo/hello-1
http://127.0.0.1:8080/bar/hello-1
In this case the entry points have different setting stores (different cookie, as context/cookie path is different).
I think that in both scenarios the behavior is correct and expected.
Comment 2 Ralf Sternberg CLA 2013-06-06 08:47:30 EDT
With the current implementation, persisted data is shared among all entrypoints of the same application. I agree that this is more likely to be the expected implementation.

There may be user settings that are not related to the entrypoint, but to the entire application, for example the chosen language, font size, etc. The SettingStore seems like the obvious place to keep those user settings. If different entrypoints of the same application each had their own SettingStore, there was no way to share those settings across entrypoints.

When a setting is only related to a single entrypoint, I think it should be prefixed. Since the problem described here affects only the Workbench, I'd suggest to fix this problem by prefixing the keys that the workbench uses to preserve its data.

Does that make sense?