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

Bug 341712

Summary: [API] IApplicationStore - Provide storage area for application scope
Product: [RT] RAP Reporter: Frank Appel <fr.appel>
Component: RWTAssignee: Project Inbox <rap-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3    
Version: 1.4   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:
Attachments:
Description Flags
First draft of IApplicationStore none

Description Frank Appel CLA 2011-04-03 01:53:16 EDT
Created attachment 192421 [details]
First draft of IApplicationStore

Having the work done to solve https://bugs.eclipse.org/bugs/show_bug.cgi?id=337787 Stefan Röck brought my attention to the fact that this is only a library internal solution. RWT does not provide an abstraction for application developers that want to store data in application scope. However RWT does this for session and request scope so it feels somewhat unbalanced to omit such an abstraction. Because of this I added an API called IApplicationStore that serves this purpose.

The application store implementation basically wraps a Map as storage area and is fed by key-value attributes. As the application store works in application scope access to the map has been synchronized. The store itself is registered as an RWTContext singleton.

I've attached a patch that contains a first draft of the solution. 

What do you think?
Comment 1 Rüdiger Herrmann CLA 2011-04-11 06:24:12 EDT
As I will start working on bug 342415 and bug 342419 and we agreed on the API, I took the freedom to commit the patch. Otherwise the sanity of the patch would be at risk.
What is left to do is to provide method removeAttribute() on ISessionStore and IServiceStore (see bug 342420)
Changes are in CVS HEAD