Bug 469161 - Have SessionManager.getSession(URI) works with non standard URI
Summary: Have SessionManager.getSession(URI) works with non standard URI
Status: NEW
Alias: None
Product: Sirius
Classification: Modeling
Component: Core (show other bugs)
Version: unspecified   Edit
Hardware: PC Linux
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: Project inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords: triaged
Depends on:
Blocks:
 
Reported: 2015-06-02 11:15 EDT by Esteban DUGUEPEROUX CLA
Modified: 2015-06-05 07:44 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Esteban DUGUEPEROUX CLA 2015-06-02 11:15:21 EDT
It could be usefull to have SessionManager.getSession(URI) API works with non standard URI, for example in memory URI and cdo connection aware URI.

As in SessionManager.getSession(URI) we use "ResourceSet.getURIConverter().exists()" API to know if it is an existing session resource or a new one to create, we cannot use non standard session resource URI.

According to forum threads [1] & [2], there is no extension point for contributing URIHandler like we can do for ResourceFactory. Then non standard URIHandler like InMemoryURIHandlerImpl and CDOURIHandler must be contributed just after ResourceSet creation to be able to use ResourceSet.getURIConverter().exists() API on an empty ResourceSet as we do in SessionFactoryImpl.

There exists ResourceSetFactory extension point to allow customize ResourceSet creation but a single extension is allowed, i.e. XTextResourceSetFactory.

This bugzilla is to provide a better mean to contribute URIHandler to ResourceSet just after its creation.

[1] https://www.eclipse.org/forums/index.php?t=msg&th=523249/
[2] https://www.eclipse.org/forums/index.php?t=msg&th=136008/
Comment 1 Esteban DUGUEPEROUX CLA 2015-06-02 12:18:33 EDT
TransientSessionTests should be adapted to add a test about that.
Comment 2 Maxime Porhel CLA 2015-06-05 07:44:07 EDT
Implementer will have to add an homologation use case.