Skip to content
This repository was archived by the owner on Mar 2, 2020. It is now read-only.

Enable master/clone mode for Specmate #250

Open
wants to merge 73 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
73 commits
Select commit Hold shift + click to select a range
fb68f27
wip: clone mode for cdo server
junkerm Jul 30, 2018
120a75a
wip: cdo server in master/clone config
junkerm Aug 1, 2018
b7fad7c
wip: make delete work in master/clone config
junkerm Aug 1, 2018
cdc3b07
wip
junkerm Aug 2, 2018
34b70bc
wip: clone works with delete
junkerm Aug 2, 2018
e550e52
update repo
junkerm Aug 2, 2018
85806a0
first working version of master/clone config
junkerm Aug 6, 2018
f711926
missing changes from previous commit
junkerm Aug 6, 2018
3b37ee5
fixed most tests (migrateAddObject) is missign
junkerm Aug 6, 2018
3b201f0
clone/master working with oracle except one restart is needed for clone
junkerm Aug 7, 2018
2d29c1e
update repo index
junkerm Aug 7, 2018
344237e
Merge branch 'develop' into cdo-master-cl
junkerm Aug 7, 2018
25c6805
Merge remote-tracking branch 'origin/develop' into cdo-master-cl
junkerm Aug 7, 2018
b2dae8e
Merge remote-tracking branch 'origin/develop' into cdo-master-cl
junkerm Aug 7, 2018
40d02a3
update run configs
junkerm Aug 8, 2018
404f8c0
Delete .log
munterkalmsteiner Aug 10, 2018
b6401bc
adapt master/clone configs
junkerm Aug 10, 2018
eff4c79
Oracle run config
munterkalmsteiner Aug 21, 2018
41fe802
Cleanup
munterkalmsteiner Aug 21, 2018
41d9e7d
wip
junkerm Aug 22, 2018
196c55d
wip
junkerm Aug 23, 2018
1a2ced4
Update AbstractMappingStrategy.java
junkerm Aug 23, 2018
096e44c
Merge branch 'cdo-master-cl' of github.com:junkerm/specmate into cdo-…
munterkalmsteiner Aug 23, 2018
145cae6
Merge branch 'develop' into cdo-master-cl
munterkalmsteiner Aug 31, 2018
11f56d3
Fix run configs
munterkalmsteiner Aug 31, 2018
8f2248d
Adaption to new CDO version
munterkalmsteiner Aug 31, 2018
72b2bbc
Committed by mistake old versions of packages... reverting.
munterkalmsteiner Aug 31, 2018
6b7ef72
Close transactions
munterkalmsteiner Aug 31, 2018
cc6a8a1
Shutting down persistency and CDO server
munterkalmsteiner Aug 31, 2018
ef64fe9
Increase timeouts
munterkalmsteiner Aug 31, 2018
ebe0ba0
Server needs to be activated before DB provider
munterkalmsteiner Aug 31, 2018
b191021
Config cleanup and use H2 for testing
munterkalmsteiner Sep 3, 2018
88e7aeb
Use relative paths for config
munterkalmsteiner Sep 3, 2018
9985cca
Use oracle DB
munterkalmsteiner Sep 4, 2018
c465fed
Merge branch 'cdo-master-cl' of https://github.com/junkerm/specmate.git
junkerm Sep 7, 2018
875c57a
Merge remote-tracking branch 'origin/develop' into cdo-master-cl
junkerm Sep 7, 2018
fbb5737
upate run configs
junkerm Sep 7, 2018
e47cc43
upate run configs
junkerm Sep 7, 2018
0cc505b
update run config
junkerm Sep 7, 2018
534bade
remove debug option from dev runconfig
junkerm Sep 7, 2018
0699d73
clean up repositories
junkerm Sep 7, 2018
d451a63
restore repositories
junkerm Sep 7, 2018
fe41b47
newly resolve auth-test
junkerm Sep 7, 2018
b2d6249
increase commit info timeout
junkerm Sep 7, 2018
a9c656c
wip
junkerm Sep 20, 2018
317a5a7
rebuild bundle index files
junkerm Nov 27, 2018
222bdf0
Merge branch 'cdo-master-cl' of https://github.com/junkerm/specmate.git
junkerm Nov 27, 2018
8c2e8b2
Merge remote-tracking branch 'origin/develop' into cdo-master-cl
junkerm Nov 27, 2018
e25bbc4
Fix test
munterkalmsteiner Nov 27, 2018
558d90e
Better error messages
munterkalmsteiner Nov 27, 2018
6dc424b
Update Oracle migration to CDO 4.6
munterkalmsteiner Nov 27, 2018
8303af2
Merge branch 'cdo-master-cl' of https://github.com/junkerm/specmate.git
junkerm Dec 1, 2018
0802bf7
wip
junkerm Dec 4, 2018
102134b
update to cdo 4.7
junkerm Dec 23, 2018
33cdb8f
wip
junkerm Dec 28, 2018
ec73d2c
wip: fix tests
junkerm Dec 28, 2018
987e1a1
wip: fix tests
junkerm Dec 29, 2018
c8495b1
address review comments
junkerm Dec 29, 2018
e60450e
master clone test projec
junkerm May 3, 2019
a89b7ee
Merge branch 'develop' into cdo-master-cl
junkerm May 3, 2019
c605a08
master clone test initial setup
junkerm May 3, 2019
fbd0273
testing clone/master functionality
junkerm May 8, 2019
dbdbe46
add launch config
junkerm May 15, 2019
27bc990
add gitignore
junkerm May 15, 2019
c7c2d4e
login test
junkerm May 15, 2019
3a225e4
add authorization header to login test
bliemelh May 22, 2019
c57e43e
initialize ceg creation test
bliemelh May 24, 2019
65f25b6
delete unused import
bliemelh May 24, 2019
ad5d91d
initialize create model test
bliemelh May 28, 2019
63b7810
minor refactoring
bliemelh Jun 7, 2019
dbd3735
wip
bliemelh Jun 13, 2019
e92d5d1
re-upload master clone test
bliemelh Jun 13, 2019
7b895f7
Merge branch 'cdo-master-cl' of https://github.com/junkerm/specmate.git
bliemelh Jun 13, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
10 changes: 5 additions & 5 deletions bundles/cnf/ext/repositories.bnd
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
-plugin: \
aQute.bnd.deployer.repository.LocalIndexedRepo;name=Release;local=${workspace}/cnf/releaserepo;pretty=true,\
aQute.bnd.deployer.repository.LocalIndexedRepo;name=Local;local=${workspace}/cnf/localrepo;pretty=true,\
aQute.lib.deployer.FileRepo;name=Build;location=${workspace}/cnf/buildrepo;latest=false
-releaserepo: Release
-plugin: \
aQute.bnd.deployer.repository.LocalIndexedRepo;name=Release;local=${workspace}/cnf/releaserepo;pretty=true,\
aQute.bnd.deployer.repository.LocalIndexedRepo;name=Local;local=${workspace}/cnf/localrepo;pretty=true,\
aQute.lib.deployer.FileRepo;name=Build;location=${workspace}/cnf/buildrepo;latest=false
-releaserepo: Release
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
Manifest-Version: 1.0
Ant-Version: Apache Ant 1.9.6
Created-By: 1.8.0_121-b13 (Oracle Corporation)
Bundle-SymbolicName: org.eclipse.emf.cdo.server.source
Bundle-ManifestVersion: 2
Bundle-Vendor: Eclipse Modeling Project
Eclipse-SourceBundle: org.eclipse.emf.cdo.server;version="4.6.0.v20170
602-1611";roots="."
Bundle-Version: 4.6.0.v20170602-1611
Bundle-Name: CDO Model Repository Server Source

28 changes: 28 additions & 0 deletions bundles/cnf/localrepo/org.eclipse.emf.cdo.server.source/about.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
<title>About</title>
</head>
<body lang="EN-US">
<h2>About This Content</h2>

<p>June 5, 2007</p>
<h3>License</h3>

<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
indicated below, the Content is provided to you under the terms and conditions of the
Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available
at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>

<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
apply to your use of any object code in the Content. Check the Redistributor's license that was
provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
indicated below, the terms and conditions of the EPL still apply to any source code in the Content
and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p>

</body>
</html>
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,224 @@
/*
* Copyright (c) 2008-2012, 2015 Eike Stepper (Berlin, Germany) and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Simon McDuff - initial API and implementation
* Eike Stepper - maintenance
*/
package org.eclipse.emf.cdo.internal.server;

import org.eclipse.emf.cdo.common.protocol.CDODataInput;
import org.eclipse.emf.cdo.server.StoreThreadLocal;
import org.eclipse.emf.cdo.spi.server.InternalCommitContext;
import org.eclipse.emf.cdo.spi.server.InternalCommitManager;
import org.eclipse.emf.cdo.spi.server.InternalRepository;
import org.eclipse.emf.cdo.spi.server.InternalTransaction;

import org.eclipse.net4j.util.ReflectUtil.ExcludeFromDump;
import org.eclipse.net4j.util.concurrent.ConcurrencyUtil;
import org.eclipse.net4j.util.concurrent.ThreadPool;
import org.eclipse.net4j.util.io.IOUtil;
import org.eclipse.net4j.util.lifecycle.Lifecycle;
import org.eclipse.net4j.util.om.monitor.OMMonitor;

import java.io.Closeable;
import java.util.Map;
import java.util.concurrent.Callable;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Future;

/**
* @author Simon McDuff
* @since 2.0
*/
public class CommitManager extends Lifecycle implements InternalCommitManager
{
private InternalRepository repository;

@ExcludeFromDump
private transient ExecutorService executors;

private boolean shutdownExecutorService;

@ExcludeFromDump
private transient Map<InternalTransaction, TransactionCommitContextEntry> contextEntries = new ConcurrentHashMap<InternalTransaction, TransactionCommitContextEntry>();

public CommitManager()
{
}

public InternalRepository getRepository()
{
return repository;
}

public void setRepository(InternalRepository repository)
{
this.repository = repository;
}

public synchronized ExecutorService getExecutors()
{
if (executors == null)
{
executors = ConcurrencyUtil.getExecutorService(repository);

if (executors == null)
{
shutdownExecutorService = true;
executors = ThreadPool.create();
}
}

return executors;
}

public synchronized void setExecutors(ExecutorService executors)
{
if (shutdownExecutorService)
{
if (this.executors != null)
{
this.executors.shutdown();
}

shutdownExecutorService = false;
}

this.executors = executors;
}

@Override
protected void doDeactivate() throws Exception
{
super.doDeactivate();
setExecutors(null);
}

@Deprecated
public void preCommit(InternalCommitContext commitContext, OMMonitor monitor)
{
preCommit(commitContext, null, monitor);
}

public void preCommit(InternalCommitContext commitContext, CDODataInput in, OMMonitor monitor)
{
TransactionCommitContextEntry contextEntry = new TransactionCommitContextEntry(in, monitor);
contextEntry.setContext(commitContext);

Future<Object> future = getExecutors().submit(contextEntry.createCallable());
contextEntry.setFuture(future);

contextEntries.put(commitContext.getTransaction(), contextEntry);
}

/**
* Called after a commitContext is done successfully or not.
*/
public void remove(InternalCommitContext commitContext)
{
contextEntries.remove(commitContext.getTransaction());
}

public void rollback(InternalCommitContext commitContext)
{
TransactionCommitContextEntry contextEntry = contextEntries.get(commitContext.getTransaction());
if (contextEntry != null)
{
contextEntry.getFuture().cancel(true);
commitContext.rollback("Remote rollback"); //$NON-NLS-1$
commitContext.postCommit(false);
}
}

/**
* Waiting for a commit to be done.
*/
public void waitForTermination(InternalTransaction transaction) throws InterruptedException, ExecutionException
{
TransactionCommitContextEntry contextEntry = contextEntries.get(transaction);
contextEntry.getFuture().get();
}

public InternalCommitContext get(InternalTransaction transaction)
{
TransactionCommitContextEntry contextEntry = contextEntries.get(transaction);
if (contextEntry != null)
{
return contextEntry.getContext();
}

return null;
}

/**
* @author Simon McDuff
*/
private static final class TransactionCommitContextEntry
{
private final CDODataInput in;

private final OMMonitor monitor;

private InternalCommitContext context;

private Future<Object> future;

public TransactionCommitContextEntry(CDODataInput in, OMMonitor monitor)
{
this.in = in;
this.monitor = monitor;
}

public Callable<Object> createCallable()
{
return new Callable<Object>()
{
public Object call() throws Exception
{
try
{
StoreThreadLocal.setCommitContext(context);
context.write(monitor);
}
finally
{
StoreThreadLocal.setCommitContext(null);
if (in instanceof Closeable)
{
IOUtil.closeSilent((Closeable)in);
}
}

return null;
}
};
}

public InternalCommitContext getContext()
{
return context;
}

public void setContext(InternalCommitContext context)
{
this.context = context;
}

public Future<Object> getFuture()
{
return future;
}

public void setFuture(Future<Object> future)
{
this.future = future;
}
}
}
Loading