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

Bug 329786

Summary: Connection-aware URIs support : default serialization and reconnection management
Product: [Modeling] EMF Reporter: Alex Lagarde <alex.lagarde>
Component: cdo.coreAssignee: Eike Stepper <stepper>
Status: CLOSED FIXED QA Contact: Eike Stepper <stepper>
Severity: enhancement    
Priority: P3 CC: esteban.dugueperoux, stepper
Version: 4.1   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:
Attachments:
Description Flags
JUnit test showing the use of connection aware URI
none
JUnit test showing the use of connection aware URI none

Description Alex Lagarde CLA 2010-11-09 08:59:42 EST
Build Identifier: 

As established on EMF Community Forum
(http://www.eclipse.org/forums/index.php?t=msg&goto=637142&S=d2575181f9e963b075ed35f97229f38a#msg_637142),
it would be nice that users can activate such connection-aware URIs by default. 

For example, by using CDOURIUtil.setURIMode(URIMode.CONNECTION_AWARE) or
session.options().setURIMode(), any CDO Object referenced in a local resource
will be serialized using connection-aware URIs instead of standard CDO URIs.

For example, if user didn't change the URIMode, a local resource referencing a
CDOObject will be serialized as following : 

<referencedElement xmi:type="cars:Garage"
href="cdo:/repo1/remoteSemanticResource.xmi#1"/>

Therefore, if the connection to the CDO Repository is closed, there is no way
to reconnect to this repository automatically.

if the user has activated the CONNECTION_AWARE mode for URIs : 

<referencedElement xmi:type="cars:Garage"
href="cdo.net4j.tcp://localhost/repo1/remoteSemanticResource.xmi?transactional=true#1"/>
Reconnection to Repositories will then be transparent to users.

If possible, extension mechanisms should be provided to control how the
reconnection is made by CDO (do the created session have to allow legacyMode,
what is its PassiveUpdateMode...), and allow to control sessions/transactions lifecycle, so that this reconnection mechanism can be
used in all useCases.

Reproducible: Always
Comment 1 Eike Stepper CLA 2011-06-23 03:58:33 EDT
Moving all open enhancement requests to 4.1
Comment 2 Eike Stepper CLA 2011-11-15 13:04:09 EST
Would you consider this a duplicate of bug 326186?
Comment 3 Esteban DUGUEPEROUX CLA 2012-02-22 10:56:05 EST
Now the connection-aware URI works (see the attached JUnit for a example) and CDOSession opening can be customized by providing a 
CDOViewProvider to the CDOViewProviderRegistry.
Comment 4 Esteban DUGUEPEROUX CLA 2012-02-22 10:58:13 EST
Created attachment 211419 [details]
JUnit test showing the use of connection aware URI
Comment 5 Esteban DUGUEPEROUX CLA 2012-03-26 04:41:58 EDT
Created attachment 213163 [details]
JUnit test showing the use of connection aware URI

Sorry the previous attachment was incorrect, now I have attached the correct one, we can considers this bug has closed. Thanks.
Comment 6 Eike Stepper CLA 2012-04-05 06:56:21 EDT
Taking test case...
Comment 7 Eike Stepper CLA 2012-04-05 06:56:33 EDT
commit 4c0ca829c6eeb45344c9af887d24f84ad36a0153
Comment 8 Eike Stepper CLA 2012-09-21 07:17:56 EDT
Closing.