Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » [CDO] Is there any example for offline mode ?
[CDO] Is there any example for offline mode ? [message #629562] Tue, 28 September 2010 17:16 Go to next message
Guillaume P. is currently offline Guillaume P.Friend
Messages: 69
Registered: June 2010
Location: Toulouse, France
Member
Hi,

Everything is in the title of the topic. ^^

(Sorry for the multiplication of topics, but I think it's best to separate my questions, when it is possible, to make searching easier for other users)

I would like to use the new feature of the CDO 3.0 version: the offline mode. But I find nowhere any concrete explanation of it (except in this document, but after creating the ISynchronizableRepository object, I don't know what to do with).
Does anybody have an example or some detailed information to help me please ?

Regards,
Guillaume
Re: [CDO] Is there any example for offline mode ? [message #629664 is a reply to message #629562] Wed, 29 September 2010 07:57 Go to previous messageGo to next message
Martin Fluegge is currently offline Martin FlueggeFriend
Messages: 141
Registered: July 2009
Senior Member
Hi Guillaume,


unfortunately we do not have any example for offline mode prepared yet.

Eike is the expert for the offline stuff but he is currently on the way
to a conference and will not return until Thursday.

But he recently told me that he soon wants to write an article about the
offline mode and the fail-over scenario. This would certainly include
some examples.


Cheers,

Martin

Am 28.09.2010 19:16, schrieb Guillaume P.:
> Hi,
>
> Everything is in the title of the topic. ^^
>
> (Sorry for the multiplication of topics, but I think it's best to
> separate my questions, when it is possible, to make searching easier for
> other users)
>
> I would like to use the new feature of the CDO 3.0 version: the offline
> mode. But I find nowhere any concrete explanation of it (except in
> http://www.eclipse.org/cdo/documentation/relnotes_30/index.p hp#Offline_clones_are_now_supported,
> but after creating the ISynchronizableRepository object, I don't know
> what to do with).
> Does anybody have an example or some detailed information to help me
> please ?
>
> Regards,
> Guillaume
Re: [CDO] Is there any example for offline mode ? [message #629694 is a reply to message #629664] Wed, 29 September 2010 09:50 Go to previous messageGo to next message
Guillaume P. is currently offline Guillaume P.Friend
Messages: 69
Registered: June 2010
Location: Toulouse, France
Member
Ok, so I'll be waiting his return to have some hints about this.
Thank you for the information.

Regards,

Guillaume
Re: [CDO] Is there any example for offline mode ? [message #630208 is a reply to message #629694] Fri, 01 October 2010 07:29 Go to previous messageGo to next message
Eike Stepper is currently offline Eike StepperFriend
Messages: 6446
Registered: July 2009
Senior Member
Am 29.09.2010 11:50, schrieb Guillaume P.:
> Ok, so I'll be waiting his return to have some hints about this.
> Thank you for the information.
BTW. there is an example setup in our tests: org.eclipse.emf.cdo.tests.config.impl.RepositoryConfig.Offli neConfig.createRepository(String)

Only the focus there is not to be self-explanatory.

Cheers
/Eike


Re: [CDO] Is there any example for offline mode ? [message #630239 is a reply to message #630208] Fri, 01 October 2010 09:49 Go to previous messageGo to next message
Guillaume P. is currently offline Guillaume P.Friend
Messages: 69
Registered: June 2010
Location: Toulouse, France
Member
Sorry, but what tests are you speaking about ? It's probably written somewhere, but I'm unable to the org.eclipse.emf.cdo.tests package in cdo sources... :-/

Regards,
Guillaume
Re: [CDO] Is there any example for offline mode ? [message #630250 is a reply to message #630239] Fri, 01 October 2010 09:57 Go to previous messageGo to next message
Eike Stepper is currently offline Eike StepperFriend
Messages: 6446
Registered: July 2009
Senior Member
Am 01.10.2010 11:49, schrieb Guillaume P.:
> Sorry, but what tests are you speaking about ? It's probably written somewhere, but I'm unable to the org.eclipse.emf.cdo.tests package in cdo sources... :-/
You're unable to "what"? To *see* the package? That package exists since 8 years ;-)

Cheers
/Eike


Re: [CDO] Is there any example for offline mode ? [message #630251 is a reply to message #630239] Fri, 01 October 2010 09:59 Go to previous messageGo to next message
Eike Stepper is currently offline Eike StepperFriend
Messages: 6446
Registered: July 2009
Senior Member
This is a multi-part message in MIME format.
--------------040105000008080006010006
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit

Am 01.10.2010 11:49, schrieb Guillaume P.:
> Sorry, but what tests are you speaking about ? It's probably written somewhere, but I'm unable to the org.eclipse.emf.cdo.tests package in cdo sources... :-/
org.eclipse.emf.cdo.tests.config.impl.RepositoryConfig.Offli neConfig:

| @Override
*protected *InternalRepository createRepository(String name)
{
*boolean *failover = getTestFailover();
Map<String, String> props = getRepositoryProperties();

*final *String masterName = name + "_master";
IStore masterStore = createStore(masterName);

InternalRepository master;
*if *(failover)
{
InternalRepositorySynchronizer synchronizer = createSynchronizer("backup", name);
master = (InternalRepository)CDOServerUtil.createFailoverParticipant( masterName, masterStore, props,
synchronizer, *true*);
}
*else*
{
master = (InternalRepository)CDOServerUtil.createRepository(masterNam e, masterStore, props);
}

*synchronized *(repositories)
{
repositories.put(masterName, master);
}

LifecycleUtil.activate(master);
startMasterTransport();

InternalRepositorySynchronizer synchronizer = createSynchronizer("master", masterName);
IStore store = createStore(name);

*if *(failover)
{
*return *(InternalRepository)CDOServerUtil.createFailoverParticipant (name, store, props, synchronizer, *false*);
}
*else*
{
OfflineClone repository = *new *OfflineClone()
{
@Override
*public **void *handleCommitInfo(CDOCommitInfo commitInfo)
{
waitIfLockAvailable();
*super*.handleCommitInfo(commitInfo);
}

*private **void *waitIfLockAvailable()
{
*long *millis = getTestDelayedCommitHandling();
*if *(millis != 0L)
{
ConcurrencyUtil.sleep(millis);
}
}
};

repository.setName(name);
repository.setStore((InternalStore)store);
repository.setProperties(props);
repository.setSynchronizer(synchronizer);
*return *repository;
}
}

*protected *InternalRepositorySynchronizer createSynchronizer(*final *String acceptorName, *final *String repositoryName)
{
CDOSessionConfigurationFactory masterFactory = *new *CDOSessionConfigurationFactory()
{
*public *org.eclipse.emf.cdo.session.CDOSessionConfiguration createSessionConfiguration()
{
IManagedContainer container = getCurrentTest().getServerContainer();
IConnector connector = (IConnector)container.getElement("org.eclipse.net4j.connectors ", "jvm", acceptorName);

InternalCDORevisionManager revisionManager = (InternalCDORevisionManager)CDORevisionUtil
..createRevisionManager();
revisionManager.setCache(*new *NOOPRevisionCache());

CDOSessionConfiguration config = *new *CDONet4jSessionConfigurationImpl()
{
@Override
*public *InternalCDOSession createSession()
{
*return new *CDONet4jSessionImpl(*this*)
{
*volatile **int *counter = 1;

@Override
*public **void *handleCommitNotification(CDOCommitInfo commitInfo)
{
*long *delay = getTestDelayed2CommitHandling();
*if *(delay != 0L && counter++ % 2 == 0)
{
AbstractOMTest.sleep(delay);
}

*super*.handleCommitNotification(commitInfo);
}
};
}
};

config.setConnector(connector);
config.setRepositoryName(repositoryName);
config.setRevisionManager(revisionManager);
*return *config;
}
};

RepositorySynchronizer synchronizer = *new *RepositorySynchronizer();
synchronizer.setRemoteSessionConfigurationFactory(masterFact ory);
synchronizer.setRetryInterval(1);
synchronizer.setRawReplication(getTestRawReplication());
// synchronizer.setSqueezeCommitInfos(getTestSqueezeCommitInfos ());
*return *synchronizer;
}

*protected **boolean *getTestFailover()
{
Boolean result = (Boolean)getTestProperty(PROP_TEST_FAILOVER);
*if *(result == *null*)
{
result = *false*;
}

*return *result;
}

*protected **boolean *getTestRawReplication()
{
Boolean result = (Boolean)getTestProperty(PROP_TEST_RAW_REPLICATION);
*if *(result == *null*)
{
result = *false*;
}

*return *result;
}|



--------------040105000008080006010006
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: 8bit

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Am 01.10.2010 11:49, schrieb Guillaume P.:
<blockquote cite="mid:i84alq$l8j$1@news.eclipse.org" type="cite">Sorry,
but what tests are you speaking about ? It's probably written
somewhere, but I'm unable to the org.eclipse.emf.cdo.tests package
in cdo sources...  :-/
<br>
</blockquote>
org.eclipse.emf.cdo.tests.config.impl.RepositoryConfig.Offli neConfig: <br>
<br>
<style type="text/css">code { font-family: Courier New,Courier; font-size: 10pt; margin: 0px; }</style>
<div class="java" align="left">
<table bgcolor="#ffffff" border="0" cellpadding="3"
cellspacing="0">
<tbody>
<tr>
<td nowrap="nowrap" align="left" valign="top"> <code>
<font color="#ffffff">    </font><font color="#646464">@Override</font><br>
<font color="#ffffff">    </font><font color="#7f0055"><b>protected </b></font><font
color="#000000">InternalRepository createRepository</font ><font
color="#000000">(</font><font color="#000000">String name</font><font
color="#000000">)</font><br>
<font color="#ffffff">    </font><font color="#000000">{</font><br>
<font color="#ffffff">      </font><font color="#7f0055"><b>boolean </b></font><font
color="#000000">failover = getTestFailover</font><font
color="#000000">()</font><font color="#000000">;</font><br>
<font color="#ffffff">      </font><font color="#000000"> Map&lt;String, String&gt; props = getRepositoryP roperties </font><font
color="#000000">()</font><font color="#000000">;</font><br>
<font color="#ffffff"></font><br>
<font color="#ffffff">      </font><font color="#7f0055"><b>final </b></font><font
color="#000000">String masterName = name + </font><font
color="#2a00ff">"_master"</font><font color="#000000">;</font><br>
<font color="#ffffff">      </font><font color="#000000">IStore masterStore = createStore</font ><font
color="#000000">(</font><font color="#000000">masterName</font><font
color="#000000">)</font><font color="#000000">;</font><br>
<font color="#ffffff"></font><br>
<font color="#ffffff">      </font><font color="#000000">InternalRepository master;</font><br>
<font color="#ffffff">      </font><font color="#7f0055"><b>if </b></font><font
color="#000000">(</font><font color="#000000">failover</font><font
color="#000000">)</font><br>
<font color="#ffffff">      </font><font color="#000000">{</font><br>
<font color="#ffffff">        </font><font
color="#000000"> InternalRepositorySynchronizer synchronizer = createSynch ronizer </font><font
color="#000000">(</font><font color="#2a00ff">"backup"</font><font
color="#000000">, name</font><font color="#000000">)</font><font
color="#000000">;</font><br>
<font color="#ffffff">        </font><font
color="#000000">master = </font><font color="#000000">(</font><font
color="#000000">InternalRepository</font><font
color="#000000">)</font><font color="#000000">CDOServerUtil.createFailoverParticipant</font ><font
color="#000000">(</font><font color="#000000">masterName, masterStore, props,</font><br >
<font color="#ffffff">            </font><font
color="#000000">synchronizer, </font><font
color="#7f0055"><b>true</b></font><font
color="#000000">)</font><font color="#000000">;</font><br>
<font color="#ffffff">      </font><font color="#000000">}</font><br>
<font color="#ffffff">      </font><font color="#7f0055"><b>else</b></font><br>
<font color="#ffffff">      </font><font color="#000000">{</font><br>
<font color="#ffffff">        </font><font
color="#000000">master = </font><font color="#000000">(</font><font
color="#000000">InternalRepository</font><font
color="#000000">)</font><font color="#000000">CDOServerUtil.createRepository</font><font
color="#000000">(</font><font color="#000000">masterName, masterStore, props</font><font
color="#000000">)</font><font color="#000000">;</font><br>
<font color="#ffffff">      </font><font color="#000000">}</font><br>
<font color="#ffffff"></font><br>
<font color="#ffffff">      </font><font color="#7f0055"><b>synchronized </b></font><font
color="#000000">(</font><font color="#000000">repositories</font><font
color="#000000">)</font><br>
<font color="#ffffff">      </font><font color="#000000">{</font><br>
<font color="#ffffff">        </font><font
color="#000000">repositories.put</font><font
color="#000000">(</font><font color="#000000">masterName, master</font><font
color="#000000">)</font><font color="#000000">;</font><br>
<font color="#ffffff">      </font><font color="#000000">}</font><br>
<font color="#ffffff"></font><br>
<font color="#ffffff">      </font><font color="#000000">LifecycleUtil.activate</font><font
color="#000000">(</font><font color="#000000">master</font><font
color="#000000">)</font><font color="#000000">;</font><br>
<font color="#ffffff">      </font><font color="#000000">startMasterTransport</font><font
color="#000000">()</font><font color="#000000">;</font><br>
<font color="#ffffff"></font><br>
<font color="#ffffff">      </font><font color="#000000"> InternalRepositorySynchronizer synchronizer = createSynch ronizer </font><font
color="#000000">(</font><font color="#2a00ff">"master"</font><font
color="#000000">, masterName</font><font
color="#000000">)</font><font color="#000000">;</font><br>
<font color="#ffffff">      </font><font color="#000000">IStore store = createStore</font><font
color="#000000">(</font><font color="#000000">name</font><font
color="#000000">)</font><font color="#000000">;</font><br>
<font color="#ffffff"></font><br>
<font color="#ffffff">      </font><font color="#7f0055"><b>if </b></font><font
color="#000000">(</font><font color="#000000">failover</font><font
color="#000000">)</font><br>
<font color="#ffffff">      </font><font color="#000000">{</font><br>
<font color="#ffffff">        </font><font
color="#7f0055"><b>return </b></font><font
color="#000000">(</font><font color="#000000">InternalRepository</font><font
color="#000000">)</font><font color="#000000">CDOServerUtil.createFailoverParticipant</font ><font
color="#000000">(</font><font color="#000000">name, store, props, synchronizer, </font ><font
color="#7f0055"><b>false</b></font><font
color="#000000">)</font><font color="#000000">;</font><br>
<font color="#ffffff">      </font><font color="#000000">}</font><br>
<font color="#ffffff">      </font><font color="#7f0055"><b>else</b></font><br>
<font color="#ffffff">      </font><font color="#000000">{</font><br>
<font color="#ffffff">        </font><font
color="#000000">OfflineClone repository = </font><font
color="#7f0055"><b>new </b></font><font
color="#000000">OfflineClone</font><font
color="#000000">()</font><br>
<font color="#ffffff">        </font><font
color="#000000">{</font><br>
<font color="#ffffff">          </font><font
color="#646464">@Override</font><br>
<font color="#ffffff">          </font><font
color="#7f0055"><b>public </b></font><font
color="#7f0055"><b>void </b></font><font
color="#000000">handleCommitInfo</font><font
color="#000000">(</font><font color="#000000">CDOCommitInfo commitInfo</font><font
color="#000000">)</font><br>
<font color="#ffffff">          </font><font
color="#000000">{</font><br>
<font color="#ffffff">            </font><font
color="#000000">waitIfLockAvailable</font><font
color="#000000">()</font><font color="#000000">;</font><br>
<font color="#ffffff">            </font><font
color="#7f0055"><b>super</b></font><font
color="#000000">.handleCommitInfo</font><font
color="#000000">(</font><font color="#000000">commitInfo</font><font
color="#000000">)</font><font color="#000000">;</font><br>
<font color="#ffffff">          </font><font
color="#000000">}</font><br>
<font color="#ffffff"></font><br>
<font color="#ffffff">          </font><font
color="#7f0055"><b>private </b></font><font
color="#7f0055"><b>void </b></font><font
color="#000000">waitIfLockAvailable</font><font
color="#000000">()</font><br>
<font color="#ffffff">          </font><font
color="#000000">{</font><br>
<font color="#ffffff">            </font><font
color="#7f0055"><b>long </b></font><font
color="#000000">millis = getTestDelayedCommitHandling</font ><font
color="#000000">()</font><font color="#000000">;</font><br>
<font color="#ffffff">            </font><font
color="#7f0055"><b>if </b></font><font color="#000000">(</font><font
color="#000000">millis != </font><font color="#990000">0L</font><font
color="#000000">)</font><br>
<font color="#ffffff">            </font><font
color="#000000">{</font><br>
<font color="#ffffff">              </font><font
color="#000000">ConcurrencyUtil.sleep</font><font
color="#000000">(</font><font color="#000000">millis</font><font
color="#000000">)</font><font color="#000000">;</font><br>
<font color="#ffffff">            </font><font
color="#000000">}</font><br>
<font color="#ffffff">          </font><font
color="#000000">}</font><br>
<font color="#ffffff">        </font><font
color="#000000">}</font><font color="#000000">;</font><br>
<font color="#ffffff"></font><br>
<font color="#ffffff">        </font><font
color="#000000">repository.setName</font><font
color="#000000">(</font><font color="#000000">name</font><font
color="#000000">)</font><font color="#000000">;</font><br>
<font color="#ffffff">        </font><font
color="#000000">repository.setStore</font><font
color="#000000">((</font><font color="#000000">InternalStore</font><font
color="#000000">)</font><font color="#000000">store</font><font
color="#000000">)</font><font color="#000000">;</font><br>
<font color="#ffffff">        </font><font
color="#000000">repository.setProperties</font><font
color="#000000">(</font><font color="#000000">props</font><font
color="#000000">)</font><font color="#000000">;</font><br>
<font color="#ffffff">        </font><font
color="#000000">repository.setSynchronizer</font><font
color="#000000">(</font><font color="#000000">synchronizer</font><font
color="#000000">)</font><font color="#000000">;</font><br>
<font color="#ffffff">        </font><font
color="#7f0055"><b>return </b></font><font
color="#000000">repository;</font><br>
<font color="#ffffff">      </font><font color="#000000">}</font><br>
<font color="#ffffff">    </font><font color="#000000">}</font><br>
<font color="#ffffff"></font><br>
<font color="#ffffff">    </font><font color="#7f0055"><b>protected </b></font><font
color="#000000">InternalRepositorySynchronizer createSynchronizer </font><font
color="#000000">(</font><font color="#7f0055"><b>final </b></font><font
color="#000000">String acceptorName, </font><font
color="#7f0055"><b>final </b></font><font
color="#000000">String repositoryName</font><font
color="#000000">)</font><br>
<font color="#ffffff">    </font><font color="#000000">{</font><br>
<font color="#ffffff">      </font><font color="#000000">CDOSessionConfigurationFactory masterFactory =  </font><font
color="#7f0055"><b>new </b></font><font
color="#000000">CDOSessionConfigurationFactory</font><font
color="#000000">()</font><br>
<font color="#ffffff">      </font><font color="#000000">{</font><br>
<font color="#ffffff">        </font><font
color="#7f0055"><b>public </b></font><font
color="#000000"> org.eclipse.emf.cdo.session.CDOSessionConfiguration createS essionConfiguration </font><font
color="#000000">()</font><br>
<font color="#ffffff">        </font><font
color="#000000">{</font><br>
<font color="#ffffff">          </font><font
color="#000000">IManagedContainer container = getCurrentTest </font><font
color="#000000">()</font><font color="#000000">.getServerContainer</font><font
color="#000000">()</font><font color="#000000">;</font><br>
<font color="#ffffff">          </font><font
color="#000000">IConnector connector = </font><font
color="#000000">(</font><font color="#000000">IConnector</font><font
color="#000000">)</font><font color="#000000">container.getElement</font><font
color="#000000">(</font><font color="#2a00ff">"org.eclipse.net4j.connectors"</font><font
color="#000000">, </font><font color="#2a00ff">"jvm"</font><font
color="#000000">, acceptorName</font><font
color="#000000">)</font><font color="#000000">;</font><br>
<font color="#ffffff"></font><br>
<font color="#ffffff">          </font><font
color="#000000">InternalCDORevisionManager revisionManager =  </font><font
color="#000000">(</font><font color="#000000">InternalCDORevisionManager</font><font
color="#000000">)</font><font color="#000000">CDORevisionUtil</font><br>
<font color="#ffffff">              </font><font
color="#000000">.createRevisionManager</font><font
color="#000000">()</font><font color="#000000">;</font><br>
<font color="#ffffff">          </font><font
color="#000000">revisionManager.setCache</font><font
color="#000000">(</font><font color="#7f0055"><b>new </b></font><font
color="#000000">NOOPRevisionCache</font><font
color="#000000">())</font><font color="#000000">;</font><br>
<font color="#ffffff"></font><br>
<font color="#ffffff">          </font><font
color="#000000">CDOSessionConfiguration config = </font ><font
color="#7f0055"><b>new </b></font><font
color="#000000">CDONet4jSessionConfigurationImpl</font><font
color="#000000">()</font><br>
<font color="#ffffff">          </font><font
color="#000000">{</font><br>
<font color="#ffffff">            </font><font
color="#646464">@Override</font><br>
<font color="#ffffff">            </font><font
color="#7f0055"><b>public </b></font><font
color="#000000">InternalCDOSession createSession</font><font
color="#000000">()</font><br>
<font color="#ffffff">            </font><font
color="#000000">{</font><br>
<font color="#ffffff">              </font><font
color="#7f0055"><b>return new </b></font><font
color="#000000">CDONet4jSessionImpl</font><font
color="#000000">(</font><font color="#7f0055"><b>this</b></font><font
color="#000000">)</font><br>
<font color="#ffffff">              </font><font
color="#000000">{</font><br>
<font color="#ffffff">                </font><font
color="#7f0055"><b>volatile </b></font><font
color="#7f0055"><b>int </b></font><font
color="#000000">counter = </font><font color="#990000">1</font><font
color="#000000">;</font><br>
<font color="#ffffff"></font><br>
<font color="#ffffff">                </font><font
color="#646464">@Override</font><br>
<font color="#ffffff">                </font><font
color="#7f0055"><b>public </b></font><font
color="#7f0055"><b>void </b></font><font
color="#000000">handleCommitNotification</font><font
color="#000000">(</font><font color="#000000">CDOCommitInfo commitInfo</font><font
color="#000000">)</font><br>
<font color="#ffffff">                </font><font
color="#000000">{</font><br>
<font color="#ffffff">                  </font ><font
color="#7f0055"><b>long </b></font><font
color="#000000">delay = getTestDelayed2CommitHandling</font ><font
color="#000000">()</font><font color="#000000">;</font><br>
<font color="#ffffff">                  </font ><font
color="#7f0055"><b>if </b></font><font color="#000000">(</font><font
color="#000000">delay != </font><font color="#990000">0L </font><font
color="#000000">&amp;&amp; counter++ % </font> <font
color="#990000">2 </font><font color="#000000">== </font><font
color="#990000">0</font><font color="#000000">)</font><br>
<font color="#ffffff">                  </font ><font
color="#000000">{</font><br>
<font color="#ffffff">                    </font ><font
color="#000000">AbstractOMTest.sleep</font><font
color="#000000">(</font><font color="#000000">delay</font><font
color="#000000">)</font><font color="#000000">;</font><br>
<font color="#ffffff">                  </font ><font
color="#000000">}</font><br>
<font color="#ffffff"></font><br>
<font color="#ffffff">                  </font ><font
color="#7f0055"><b>super</b></font><font
color="#000000">.handleCommitNotification</font><font
color="#000000">(</font><font color="#000000">commitInfo</font><font
color="#000000">)</font><font color="#000000">;</font><br>
<font color="#ffffff">                </font><font
color="#000000">}</font><br>
<font color="#ffffff">              </font><font
color="#000000">}</font><font color="#000000">;</font><br>
<font color="#ffffff">            </font><font
color="#000000">}</font><br>
<font color="#ffffff">          </font><font
color="#000000">}</font><font color="#000000">;</font><br>
<font color="#ffffff"></font><br>
<font color="#ffffff">          </font><font
color="#000000">config.setConnector</font><font
color="#000000">(</font><font color="#000000">connector</font><font
color="#000000">)</font><font color="#000000">;</font><br>
<font color="#ffffff">          </font><font
color="#000000">config.setRepositoryName</font><font
color="#000000">(</font><font color="#000000">repositoryName</font><font
color="#000000">)</font><font color="#000000">;</font><br>
<font color="#ffffff">          </font><font
color="#000000">config.setRevisionManager</font><font
color="#000000">(</font><font color="#000000">revisionManager</font><font
color="#000000">)</font><font color="#000000">;</font><br>
<font color="#ffffff">          </font><font
color="#7f0055"><b>return </b></font><font
color="#000000">config;</font><br>
<font color="#ffffff">        </font><font
color="#000000">}</font><br>
<font color="#ffffff">      </font><font color="#000000">}</font><font
color="#000000">;</font><br>
<font color="#ffffff"></font><br>
<font color="#ffffff">      </font><font color="#000000">RepositorySynchronizer synchronizer = </font ><font
color="#7f0055"><b>new </b></font><font
color="#000000">RepositorySynchronizer</font><font
color="#000000">()</font><font color="#000000">;</font><br>
<font color="#ffffff">      </font><font color="#000000">synchronizer.setRemoteSessionConfigurationFactory </font><font
color="#000000">(</font><font color="#000000">masterFactory</font><font
color="#000000">)</font><font color="#000000">;</font><br>
<font color="#ffffff">      </font><font color="#000000">synchronizer.setRetryInterval</font><font
color="#000000">(</font><font color="#990000">1</font><font
color="#000000">)</font><font color="#000000">;</font><br>
<font color="#ffffff">      </font><font color="#000000">synchronizer.setRawReplication</font><font
color="#000000">(</font><font color="#000000">getTestRawReplication</font><font
color="#000000">())</font><font color="#000000">;</font><br>
<font color="#ffffff">      </font><font color="#3f7f5f"> // synchronizer.setSqueezeCommitInfos(getTestSqueezeCommitI nfos()); </font><br>
<font color="#ffffff">      </font><font color="#7f0055"><b>return </b></font><font
color="#000000">synchronizer;</font><br>
<font color="#ffffff">    </font><font color="#000000">}</font><br>
<font color="#ffffff"></font><br>
<font color="#ffffff">    </font><font color="#7f0055"><b>protected </b></font><font
color="#7f0055"><b>boolean </b></font><font
color="#000000">getTestFailover</font><font
color="#000000">()</font><br>
<font color="#ffffff">    </font><font color="#000000">{</font><br>
<font color="#ffffff">      </font><font color="#000000">Boolean result = </font><font
color="#000000">(</font><font color="#000000">Boolean</font><font
color="#000000">)</font><font color="#000000">getTestProperty</font><font
color="#000000">(</font><font color="#000000">PROP_TEST_FAILOVER</font><font
color="#000000">)</font><font color="#000000">;</font><br>
<font color="#ffffff">      </font><font color="#7f0055"><b>if </b></font><font
color="#000000">(</font><font color="#000000">result == </font><font
color="#7f0055"><b>null</b></font><font
color="#000000">)</font><br>
<font color="#ffffff">      </font><font color="#000000">{</font><br>
<font color="#ffffff">        </font><font
color="#000000">result = </font><font color="#7f0055"><b>false</b></font><font
color="#000000">;</font><br>
<font color="#ffffff">      </font><font color="#000000">}</font><br>
<font color="#ffffff"></font><br>
<font color="#ffffff">      </font><font color="#7f0055"><b>return </b></font><font
color="#000000">result;</font><br>
<font color="#ffffff">    </font><font color="#000000">}</font><br>
<font color="#ffffff"></font><br>
<font color="#ffffff">    </font><font color="#7f0055"><b>protected </b></font><font
color="#7f0055"><b>boolean </b></font><font
color="#000000">getTestRawReplication</font><font
color="#000000">()</font><br>
<font color="#ffffff">    </font><font color="#000000">{</font><br>
<font color="#ffffff">      </font><font color="#000000">Boolean result = </font><font
color="#000000">(</font><font color="#000000">Boolean</font><font
color="#000000">)</font><font color="#000000">getTestProperty</font><font
color="#000000">(</font><font color="#000000">PROP_TEST_RAW_REPLICATION</font><font
color="#000000">)</font><font color="#000000">;</font><br>
<font color="#ffffff">      </font><font color="#7f0055"><b>if </b></font><font
color="#000000">(</font><font color="#000000">result == </font><font
color="#7f0055"><b>null</b></font><font
color="#000000">)</font><br>
<font color="#ffffff">      </font><font color="#000000">{</font><br>
<font color="#ffffff">        </font><font
color="#000000">result = </font><font color="#7f0055"><b>false</b></font><font
color="#000000">;</font><br>
<font color="#ffffff">      </font><font color="#000000">}</font><br>
<font color="#ffffff"></font><br>
<font color="#ffffff">      </font><font color="#7f0055"><b>return </b></font><font
color="#000000">result;</font><br>
<font color="#ffffff">    </font><font color="#000000">}</font></code>
</td>
</tr>
</tbody>
</table>
</div>
<br>
</body>
</html>

--------------040105000008080006010006--


Re: [CDO] Is there any example for offline mode ? [message #630298 is a reply to message #630251] Fri, 01 October 2010 13:30 Go to previous message
Guillaume P. is currently offline Guillaume P.Friend
Messages: 69
Registered: June 2010
Location: Toulouse, France
Member
Yes, a word was missing.
I found the package you were speaking about: I had to add the " http://download.eclipse.org/modeling/emf/cdo/updates/3.0-rel eases" repository site, and then to add the "CDO Model Repository Test" plugin for that.
I'll check it to see if it can help me.

Thanks,
Guillaume

[Updated on: Fri, 01 October 2010 13:32]

Report message to a moderator

Previous Topic:Incorrect use of namespace prefixes when namespace-prefix is overridden in an xsd:any element
Next Topic:generate "wrapper" classes from annotated java
Goto Forum:
  


Current Time: Sun Oct 20 06:19:17 GMT 2019

Powered by FUDForum. Page generated in 0.02574 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top