mirror of
https://github.com/eclipse-sailing-analytics/sailing-analytics.git
synced 2026-09-24 14:38:45 +00:00
Merge remote-tracking branch 'server/activemq'
This commit is contained in:
+8
-1
@@ -131,7 +131,14 @@ e) Rebuild the base target platform by running the script
|
||||
createLocalBaseP2repository.sh
|
||||
(com.sap.sailing.targetplatform/scripts)
|
||||
|
||||
f) Reload the target platform in the IDE
|
||||
f) Test the new overall target platform by settings the race-analysis-p2-ide-p2admin.target as target platform
|
||||
in the IDE
|
||||
|
||||
g) The admin of the central p2 repository must now replace the content of the central server
|
||||
/home/trac/p2-repositories/sailing with the content of the new local base p2 repository
|
||||
(com.sap.sailing.targetplatform/base/gen/p2)
|
||||
|
||||
g) Reload the target platform in the IDE
|
||||
|
||||
2. Adding a library from an internal SAP repository (e.g. Nexus)
|
||||
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<classpath>
|
||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"/>
|
||||
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
|
||||
<classpathentry kind="src" path="src"/>
|
||||
<classpathentry kind="output" path="bin"/>
|
||||
</classpath>
|
||||
@@ -0,0 +1 @@
|
||||
/bin
|
||||
@@ -0,0 +1,28 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<projectDescription>
|
||||
<name>com.sap.sailing.server.replication.test</name>
|
||||
<comment></comment>
|
||||
<projects>
|
||||
</projects>
|
||||
<buildSpec>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.jdt.core.javabuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.pde.ManifestBuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.pde.SchemaBuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
</buildSpec>
|
||||
<natures>
|
||||
<nature>org.eclipse.pde.PluginNature</nature>
|
||||
<nature>org.eclipse.jdt.core.javanature</nature>
|
||||
</natures>
|
||||
</projectDescription>
|
||||
@@ -0,0 +1,8 @@
|
||||
#Thu Apr 19 18:09:29 CEST 2012
|
||||
eclipse.preferences.version=1
|
||||
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
|
||||
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
|
||||
org.eclipse.jdt.core.compiler.compliance=1.7
|
||||
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
|
||||
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
|
||||
org.eclipse.jdt.core.compiler.source=1.7
|
||||
@@ -0,0 +1,4 @@
|
||||
#Thu Apr 19 18:09:29 CEST 2012
|
||||
eclipse.preferences.version=1
|
||||
pluginProject.extensions=false
|
||||
resolve.requirebundle=false
|
||||
@@ -0,0 +1,9 @@
|
||||
Manifest-Version: 1.0
|
||||
Bundle-ManifestVersion: 2
|
||||
Bundle-Name: Server Replication Test
|
||||
Bundle-SymbolicName: com.sap.sailing.server.replication.test
|
||||
Bundle-Version: 1.0.0.qualifier
|
||||
Bundle-Vendor: SAP
|
||||
Bundle-RequiredExecutionEnvironment: JavaSE-1.7
|
||||
Import-Package: junit.framework;version="4.8.1",
|
||||
org.junit;version="4.8.1"
|
||||
@@ -0,0 +1,4 @@
|
||||
source.. = src/
|
||||
output.. = bin/
|
||||
bin.includes = META-INF/,\
|
||||
.
|
||||
@@ -0,0 +1,12 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<artifactId>root</artifactId>
|
||||
<groupId>com.sap.sailing</groupId>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
<artifactId>com.sap.sailing.server.replication.test</artifactId>
|
||||
<packaging>eclipse-test-plugin</packaging>
|
||||
</project>
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
package com.sap.sailing.server.replication.test;
|
||||
|
||||
public class ServerReplicationTest {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<classpath>
|
||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"/>
|
||||
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
|
||||
<classpathentry kind="src" path="src"/>
|
||||
<classpathentry kind="output" path="bin"/>
|
||||
</classpath>
|
||||
@@ -0,0 +1 @@
|
||||
bin/
|
||||
@@ -0,0 +1,28 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<projectDescription>
|
||||
<name>com.sap.sailing.server.replication</name>
|
||||
<comment></comment>
|
||||
<projects>
|
||||
</projects>
|
||||
<buildSpec>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.jdt.core.javabuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.pde.ManifestBuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.pde.SchemaBuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
</buildSpec>
|
||||
<natures>
|
||||
<nature>org.eclipse.pde.PluginNature</nature>
|
||||
<nature>org.eclipse.jdt.core.javanature</nature>
|
||||
</natures>
|
||||
</projectDescription>
|
||||
@@ -0,0 +1,8 @@
|
||||
#Thu Apr 19 13:33:22 CEST 2012
|
||||
eclipse.preferences.version=1
|
||||
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
|
||||
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
|
||||
org.eclipse.jdt.core.compiler.compliance=1.7
|
||||
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
|
||||
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
|
||||
org.eclipse.jdt.core.compiler.source=1.7
|
||||
@@ -0,0 +1,4 @@
|
||||
#Thu Apr 19 13:33:22 CEST 2012
|
||||
eclipse.preferences.version=1
|
||||
pluginProject.extensions=false
|
||||
resolve.requirebundle=false
|
||||
@@ -0,0 +1,15 @@
|
||||
Manifest-Version: 1.0
|
||||
Bundle-ManifestVersion: 2
|
||||
Bundle-Name: Server Replication
|
||||
Bundle-SymbolicName: com.sap.sailing.server.replication
|
||||
Bundle-Version: 1.0.0.qualifier
|
||||
Bundle-Activator: com.sap.sailing.server.replication.impl.Activator
|
||||
Bundle-Vendor: SAP
|
||||
Bundle-RequiredExecutionEnvironment: JavaSE-1.7
|
||||
Import-Package: javax.jms;version="1.1.0",
|
||||
org.apache.activemq;version="5.4.3",
|
||||
org.apache.activemq.broker;version="5.4.3",
|
||||
org.osgi.framework;version="1.3.0"
|
||||
Export-Package: com.sap.sailing.server.replication
|
||||
Require-Bundle: com.sap.sailing.operationaltransformation;bundle-version="1.0.0",
|
||||
com.sap.sailing.server;bundle-version="1.0.0"
|
||||
@@ -0,0 +1,3 @@
|
||||
output.. = bin/
|
||||
bin.includes = META-INF/,\
|
||||
broker-config.xml
|
||||
@@ -0,0 +1,12 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<artifactId>root</artifactId>
|
||||
<groupId>com.sap.sailing</groupId>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
<artifactId>com.sap.sailing.server.replication</artifactId>
|
||||
<packaging>eclipse-plugin</packaging>
|
||||
</project>
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
package com.sap.sailing.server.replication;
|
||||
|
||||
public class ReplicationMasterDescriptor {
|
||||
|
||||
}
|
||||
+37
@@ -0,0 +1,37 @@
|
||||
package com.sap.sailing.server.replication;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.UUID;
|
||||
|
||||
public class ReplicationSlaveDescriptor {
|
||||
private UUID uuid;
|
||||
|
||||
private String ipAddress;
|
||||
|
||||
private Date registrationTime;
|
||||
|
||||
public ReplicationSlaveDescriptor(UUID uuid) {
|
||||
this.uuid = uuid;
|
||||
this.registrationTime = new Date();
|
||||
}
|
||||
|
||||
public UUID getUuid() {
|
||||
return uuid;
|
||||
}
|
||||
|
||||
public String getIpAddress() {
|
||||
return ipAddress;
|
||||
}
|
||||
|
||||
public void setIpAddress(String ipAddress) {
|
||||
this.ipAddress = ipAddress;
|
||||
}
|
||||
|
||||
public Date getRegistrationTime() {
|
||||
return registrationTime;
|
||||
}
|
||||
|
||||
public void setRegistrationTime(Date registrationTime) {
|
||||
this.registrationTime = registrationTime;
|
||||
}
|
||||
}
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
package com.sap.sailing.server.replication;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
import com.sap.sailing.server.operationaltransformation.RacingEventServiceOperation;
|
||||
|
||||
public interface ServerReplicationMasterService {
|
||||
void broadcastOperation(RacingEventServiceOperation operation) throws Exception;
|
||||
|
||||
void broadcastInitialServerState(Serializable state) throws Exception;
|
||||
}
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
package com.sap.sailing.server.replication;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
public interface ServerReplicationSlaveService {
|
||||
ReplicationSlaveDescriptor registerSlave(UUID slaveId);
|
||||
|
||||
ReplicationSlaveDescriptor unregisterSlave(UUID slaveId);
|
||||
}
|
||||
+39
@@ -0,0 +1,39 @@
|
||||
package com.sap.sailing.server.replication.impl;
|
||||
|
||||
import org.osgi.framework.BundleActivator;
|
||||
import org.osgi.framework.BundleContext;
|
||||
|
||||
import com.sap.sailing.server.replication.ServerReplicationMasterService;
|
||||
import com.sap.sailing.server.replication.ServerReplicationSlaveService;
|
||||
|
||||
public class Activator implements BundleActivator {
|
||||
private MessageBrokerManager messageBrokerManager;
|
||||
|
||||
private ReplicationInstancesManager replicationInstancesManager;
|
||||
|
||||
public void start(BundleContext bundleContext) throws Exception {
|
||||
MessageBrokerConfiguration brokerConfig = new MessageBrokerConfiguration();
|
||||
brokerConfig.setBrokerUrl("tcp://localhost:61616");
|
||||
brokerConfig.setDataStoreDirectory("c:\\temp\\kahadb");
|
||||
brokerConfig.setBrokerName("SailingServerReplicationBroker");
|
||||
|
||||
messageBrokerManager = new MessageBrokerManager(brokerConfig);
|
||||
|
||||
messageBrokerManager.startMessageBroker();
|
||||
messageBrokerManager.createAndStartConnection();
|
||||
|
||||
replicationInstancesManager = new ReplicationInstancesManager();
|
||||
|
||||
ServerReplicationSlaveService serverReplicationSlaveService = new ServerReplicationSlaveServiceImpl(replicationInstancesManager);
|
||||
ServerReplicationMasterService serverReplicationMasterService = new ServerReplicationMasterServiceImpl(replicationInstancesManager, messageBrokerManager);
|
||||
|
||||
bundleContext.registerService(ServerReplicationSlaveService.class, serverReplicationSlaveService, null);
|
||||
bundleContext.registerService(ServerReplicationMasterService.class, serverReplicationMasterService, null);
|
||||
}
|
||||
|
||||
public void stop(BundleContext bundleContext) throws Exception {
|
||||
messageBrokerManager.closeSessions();
|
||||
messageBrokerManager.closeConnections();
|
||||
messageBrokerManager.stopMessageBroker();
|
||||
}
|
||||
}
|
||||
+36
@@ -0,0 +1,36 @@
|
||||
package com.sap.sailing.server.replication.impl;
|
||||
|
||||
/**
|
||||
* A simple configuration for the message broker
|
||||
*/
|
||||
public class MessageBrokerConfiguration {
|
||||
private String brokerName;
|
||||
|
||||
private String brokerUrl;
|
||||
|
||||
private String dataStoreDirectory;
|
||||
|
||||
public String getBrokerName() {
|
||||
return brokerName;
|
||||
}
|
||||
|
||||
public void setBrokerName(String brokerName) {
|
||||
this.brokerName = brokerName;
|
||||
}
|
||||
|
||||
public String getDataStoreDirectory() {
|
||||
return dataStoreDirectory;
|
||||
}
|
||||
|
||||
public void setDataStoreDirectory(String dataStoreDirectory) {
|
||||
this.dataStoreDirectory = dataStoreDirectory;
|
||||
}
|
||||
|
||||
public String getBrokerUrl() {
|
||||
return brokerUrl;
|
||||
}
|
||||
|
||||
public void setBrokerUrl(String brokerUrl) {
|
||||
this.brokerUrl = brokerUrl;
|
||||
}
|
||||
}
|
||||
+72
@@ -0,0 +1,72 @@
|
||||
package com.sap.sailing.server.replication.impl;
|
||||
|
||||
import java.net.URI;
|
||||
|
||||
import javax.jms.Connection;
|
||||
import javax.jms.JMSException;
|
||||
import javax.jms.Session;
|
||||
|
||||
import org.apache.activemq.ActiveMQConnection;
|
||||
import org.apache.activemq.ActiveMQConnectionFactory;
|
||||
import org.apache.activemq.broker.BrokerService;
|
||||
import org.apache.activemq.broker.TransportConnector;
|
||||
|
||||
public class MessageBrokerManager {
|
||||
private final MessageBrokerConfiguration configuration;
|
||||
|
||||
private ActiveMQConnectionFactory connectionFactory;
|
||||
private Connection connection;
|
||||
private Session session;
|
||||
|
||||
private BrokerService broker;
|
||||
|
||||
public MessageBrokerManager(final MessageBrokerConfiguration configuration) {
|
||||
this.configuration = configuration;
|
||||
}
|
||||
|
||||
public void startMessageBroker() throws Exception {
|
||||
broker = new BrokerService();
|
||||
|
||||
broker.setBrokerName(configuration.getBrokerName());
|
||||
broker.setDataDirectory(configuration.getDataStoreDirectory());
|
||||
|
||||
broker.setUseJmx(true);
|
||||
TransportConnector transportConnector = new TransportConnector();
|
||||
transportConnector.setUri(new URI(configuration.getBrokerUrl()));
|
||||
broker.addConnector(transportConnector);
|
||||
broker.start();
|
||||
}
|
||||
|
||||
public void stopMessageBroker() throws Exception {
|
||||
if(broker != null) {
|
||||
broker.stop();
|
||||
}
|
||||
}
|
||||
|
||||
public void createAndStartConnection() throws JMSException {
|
||||
connectionFactory = new ActiveMQConnectionFactory(ActiveMQConnection.DEFAULT_USER,
|
||||
ActiveMQConnection.DEFAULT_PASSWORD, "failover://" + configuration.getBrokerUrl());
|
||||
connection = connectionFactory.createConnection();
|
||||
connection.start();
|
||||
}
|
||||
|
||||
public void closeConnections() throws JMSException {
|
||||
if(connection != null) {
|
||||
connection.close();
|
||||
}
|
||||
}
|
||||
|
||||
public Session createSession(boolean transacted) throws JMSException {
|
||||
return connection.createSession(transacted, Session.AUTO_ACKNOWLEDGE);
|
||||
}
|
||||
|
||||
public void closeSessions() throws JMSException {
|
||||
if(session != null) {
|
||||
session.close();
|
||||
}
|
||||
}
|
||||
|
||||
public Session getSession() {
|
||||
return session;
|
||||
}
|
||||
}
|
||||
+54
@@ -0,0 +1,54 @@
|
||||
package com.sap.sailing.server.replication.impl;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Iterator;
|
||||
import java.util.Map;
|
||||
import java.util.UUID;
|
||||
|
||||
import com.sap.sailing.server.replication.ReplicationMasterDescriptor;
|
||||
import com.sap.sailing.server.replication.ReplicationSlaveDescriptor;
|
||||
|
||||
public class ReplicationInstancesManager {
|
||||
|
||||
/**
|
||||
* The list of descriptors of all registered slaves
|
||||
* All broadcast operations will send the messages to all registered slaves
|
||||
*/
|
||||
private Map<UUID, ReplicationSlaveDescriptor> replicationSlavesDescriptors;
|
||||
|
||||
/**
|
||||
* The descriptor of the replication master
|
||||
*/
|
||||
private ReplicationMasterDescriptor replicationMasterDescriptor;
|
||||
|
||||
public ReplicationInstancesManager() {
|
||||
replicationSlavesDescriptors = new HashMap<UUID, ReplicationSlaveDescriptor>();
|
||||
}
|
||||
|
||||
public Iterator<ReplicationSlaveDescriptor> getSlavesDescriptors() {
|
||||
return replicationSlavesDescriptors.values().iterator();
|
||||
}
|
||||
|
||||
public ReplicationMasterDescriptor getReplicationMasterDescriptor() {
|
||||
return replicationMasterDescriptor;
|
||||
}
|
||||
|
||||
public ReplicationSlaveDescriptor findSlaveDescriptor(UUID slaveUUID)
|
||||
{
|
||||
return replicationSlavesDescriptors.get(slaveUUID);
|
||||
}
|
||||
|
||||
public ReplicationSlaveDescriptor addSlave(UUID slaveUUID)
|
||||
{
|
||||
ReplicationSlaveDescriptor replicationSlaveDescriptor = replicationSlavesDescriptors.get(slaveUUID);
|
||||
if(replicationSlaveDescriptor == null) {
|
||||
replicationSlaveDescriptor = new ReplicationSlaveDescriptor(slaveUUID);
|
||||
}
|
||||
|
||||
return replicationSlaveDescriptor;
|
||||
}
|
||||
|
||||
public ReplicationSlaveDescriptor removeSlave(UUID slaveUUID) {
|
||||
return replicationSlavesDescriptors.remove(slaveUUID);
|
||||
}
|
||||
}
|
||||
+27
@@ -0,0 +1,27 @@
|
||||
package com.sap.sailing.server.replication.impl;
|
||||
|
||||
import javax.jms.ExceptionListener;
|
||||
import javax.jms.JMSException;
|
||||
import javax.jms.Message;
|
||||
import javax.jms.MessageListener;
|
||||
import javax.jms.TextMessage;
|
||||
|
||||
public class SampleMessageConsumer implements MessageListener, ExceptionListener {
|
||||
|
||||
synchronized public void onException(JMSException ex) {
|
||||
System.out.println("JMS Exception occured: " + ex.getMessage());
|
||||
}
|
||||
|
||||
public void onMessage(Message message) {
|
||||
if (message instanceof TextMessage) {
|
||||
TextMessage textMessage = (TextMessage) message;
|
||||
try {
|
||||
System.out.println("Received message: " + textMessage.getText());
|
||||
} catch (JMSException ex) {
|
||||
System.out.println("Error reading message: " + ex);
|
||||
}
|
||||
} else {
|
||||
System.out.println("Received: " + message);
|
||||
}
|
||||
}
|
||||
}
|
||||
+52
@@ -0,0 +1,52 @@
|
||||
package com.sap.sailing.server.replication.impl;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
import javax.jms.DeliveryMode;
|
||||
import javax.jms.JMSException;
|
||||
import javax.jms.MessageProducer;
|
||||
import javax.jms.Session;
|
||||
import javax.jms.TextMessage;
|
||||
import javax.jms.Topic;
|
||||
|
||||
import com.sap.sailing.server.operationaltransformation.RacingEventServiceOperation;
|
||||
import com.sap.sailing.server.replication.ServerReplicationMasterService;
|
||||
|
||||
public class ServerReplicationMasterServiceImpl implements ServerReplicationMasterService {
|
||||
private final ReplicationInstancesManager replicationInstancesManager;
|
||||
|
||||
private final MessageBrokerManager messageBrokerManager;
|
||||
|
||||
private Topic replicationTopic;
|
||||
|
||||
public ServerReplicationMasterServiceImpl(final ReplicationInstancesManager replicationInstancesManager, final MessageBrokerManager messageBrokerManager) {
|
||||
this.replicationInstancesManager = replicationInstancesManager;
|
||||
this.messageBrokerManager = messageBrokerManager;
|
||||
}
|
||||
|
||||
private Topic getReplicationTopic() throws JMSException{
|
||||
if(replicationTopic== null) {
|
||||
Session session = messageBrokerManager.getSession();
|
||||
if(session == null) {
|
||||
session = messageBrokerManager.createSession(true);
|
||||
}
|
||||
replicationTopic = session.createTopic("SailingServerReplicationTopic");
|
||||
}
|
||||
return replicationTopic;
|
||||
}
|
||||
|
||||
public void broadcastOperation(RacingEventServiceOperation operation) throws Exception {
|
||||
Topic topic = getReplicationTopic();
|
||||
Session session = messageBrokerManager.getSession();
|
||||
|
||||
MessageProducer producer = messageBrokerManager.getSession().createProducer(topic);
|
||||
producer.setDeliveryMode(DeliveryMode.PERSISTENT);
|
||||
TextMessage message = session.createTextMessage("Hello World!");
|
||||
System.out.println("Sending message: " + message.getText());
|
||||
producer.send(message);
|
||||
}
|
||||
|
||||
public void broadcastInitialServerState(Serializable state) throws Exception {
|
||||
return;
|
||||
}
|
||||
}
|
||||
+33
@@ -0,0 +1,33 @@
|
||||
package com.sap.sailing.server.replication.impl;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
import javax.jms.JMSException;
|
||||
import javax.jms.MessageConsumer;
|
||||
|
||||
import com.sap.sailing.server.replication.ReplicationSlaveDescriptor;
|
||||
import com.sap.sailing.server.replication.ServerReplicationSlaveService;
|
||||
|
||||
public class ServerReplicationSlaveServiceImpl implements ServerReplicationSlaveService {
|
||||
private final ReplicationInstancesManager replicationInstancesManager;
|
||||
|
||||
public ServerReplicationSlaveServiceImpl(ReplicationInstancesManager replicationInstancesManager) {
|
||||
this.replicationInstancesManager = replicationInstancesManager;
|
||||
}
|
||||
|
||||
public ReplicationSlaveDescriptor registerSlave(UUID slaveId) {
|
||||
return replicationInstancesManager.addSlave(slaveId);
|
||||
|
||||
}
|
||||
|
||||
public ReplicationSlaveDescriptor unregisterSlave(UUID slaveId) {
|
||||
return replicationInstancesManager.removeSlave(slaveId);
|
||||
}
|
||||
|
||||
// private void createMessageConsumer() throws JMSException, InterruptedException {
|
||||
// MessageConsumer consumer = session.createConsumer(destination);
|
||||
// SampleMessageConsumer messageConsumer = new SampleMessageConsumer();
|
||||
// connection.setExceptionListener(messageConsumer);
|
||||
// consumer.setMessageListener(messageConsumer);
|
||||
// }
|
||||
}
|
||||
@@ -17,12 +17,12 @@
|
||||
</listAttribute>
|
||||
<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-os ${target.os} -ws ${target.ws} -arch ${target.arch} -nl ${target.nl} -consoleLog -console -clean"/>
|
||||
<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.pde.ui.workbenchClasspathProvider"/>
|
||||
<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Declipse.ignoreApp=true -Dosgi.noShutdown=true -Dexpedition.udp.port=2010 -Xmx4096m -Djetty.home=${project_loc:com.sap.sailing.server}/../target/configuration/jetty -Djava.util.logging.config.file=${project_loc:com.sap.sailing.server}/../target/configuration/logging_debug.properties"/>
|
||||
<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Declipse.ignoreApp=true -Dosgi.noShutdown=true -Dexpedition.udp.port=2010 -Xmx1024m -Djetty.home=${project_loc:com.sap.sailing.server}/../target/configuration/jetty -Djava.util.logging.config.file=${project_loc:com.sap.sailing.server}/../target/configuration/logging_debug.properties"/>
|
||||
<stringAttribute key="pde.version" value="3.3"/>
|
||||
<booleanAttribute key="show_selected_only" value="false"/>
|
||||
<stringAttribute key="target_bundles" value="com.sap.ui5.commons@default:default,com.sap.ui5.core@default:default,com.sap.ui5.gwt.commons@default:default,com.sap.ui5.gwt.core@default:default,com.sap.ui5.resource.osgi@default:false,com.sap.ui5.resource@default:default,javax.servlet@default:default,org.eclipse.equinox.transforms.hook@default:false,org.eclipse.jetty.continuation@default:default,org.eclipse.jetty.deploy@default:default,org.eclipse.jetty.http@default:default,org.eclipse.jetty.io@default:default,org.eclipse.jetty.jmx@default:default,org.eclipse.jetty.nested@default:default,org.eclipse.jetty.osgi.boot@default:default,org.eclipse.jetty.security@default:default,org.eclipse.jetty.server@default:default,org.eclipse.jetty.servlet@default:default,org.eclipse.jetty.util@default:default,org.eclipse.jetty.webapp@default:default,org.eclipse.jetty.xml@default:default,org.eclipse.osgi.services@default:default,org.eclipse.osgi@-1:true,slf4j.api@default:default,slf4j.jdk14@default:false"/>
|
||||
<stringAttribute key="target_bundles" value="javax.servlet@default:default,jcl.over.slf4j@default:default,org.apache.activemq.activeio-core@default:default,org.apache.activemq.activemq-core@default:default,org.apache.activemq.kahadb@default:default,org.apache.geronimo.specs.geronimo-annotation_1.0_spec@default:default,org.apache.geronimo.specs.geronimo-j2ee-management_1.1_spec@default:default,org.apache.geronimo.specs.geronimo-jms_1.1_spec@default:default,org.eclipse.equinox.transforms.hook@default:false,org.eclipse.jetty.continuation@default:default,org.eclipse.jetty.deploy@default:default,org.eclipse.jetty.http@default:default,org.eclipse.jetty.io@default:default,org.eclipse.jetty.jmx@default:default,org.eclipse.jetty.nested@default:default,org.eclipse.jetty.osgi.boot@default:default,org.eclipse.jetty.security@default:default,org.eclipse.jetty.server@default:default,org.eclipse.jetty.servlet@default:default,org.eclipse.jetty.util@default:default,org.eclipse.jetty.webapp@default:default,org.eclipse.jetty.xml@default:default,org.eclipse.osgi.services@default:default,org.eclipse.osgi@-1:true,slf4j.api@default:default,slf4j.jdk14@default:false"/>
|
||||
<booleanAttribute key="tracing" value="false"/>
|
||||
<booleanAttribute key="useCustomFeatures" value="false"/>
|
||||
<booleanAttribute key="useDefaultConfigArea" value="false"/>
|
||||
<stringAttribute key="workspace_bundles" value="com.google.gwt.osgi@default:default,com.googlecode.java-diff-utils@default:default,com.mongodb.driver@default:default,com.sap.sailing.declination@default:default,com.sap.sailing.domain.common@default:default,com.sap.sailing.domain.persistence@default:default,com.sap.sailing.domain.swisstimingadapter.persistence@default:default,com.sap.sailing.domain.swisstimingadapter@default:default,com.sap.sailing.domain.tractracadapter.persistence@default:default,com.sap.sailing.domain.tractracadapter@default:default,com.sap.sailing.domain@default:default,com.sap.sailing.expeditionconnector@default:default,com.sap.sailing.geocoding@default:default,com.sap.sailing.gwt.ui@default:default,com.sap.sailing.mongodb@default:default,com.sap.sailing.operationaltransformation@default:default,com.sap.sailing.server@default:default,com.sap.sailing.udpconnector@default:default,com.sap.sailing.www.events@default:default,com.sap.sailing.www@default:default,com.sap.sailing.xcelsiusadapter@default:default,com.tractrac.clientmodule@default:default,com.tractrac.resultapi@default:default,org.json.simple@default:default,org.moxieapps.gwt.highcharts@default:default"/>
|
||||
<stringAttribute key="workspace_bundles" value="com.google.gwt.osgi@default:default,com.googlecode.java-diff-utils@default:default,com.mongodb.driver@default:default,com.sap.sailing.declination@default:default,com.sap.sailing.domain.common@default:default,com.sap.sailing.domain.persistence@default:default,com.sap.sailing.domain.swisstimingadapter.persistence@default:default,com.sap.sailing.domain.swisstimingadapter@default:default,com.sap.sailing.domain.tractracadapter.persistence@default:default,com.sap.sailing.domain.tractracadapter@default:default,com.sap.sailing.domain@default:default,com.sap.sailing.expeditionconnector@default:default,com.sap.sailing.geocoding@default:default,com.sap.sailing.gwt.ui@default:default,com.sap.sailing.mongodb@default:default,com.sap.sailing.operationaltransformation@default:default,com.sap.sailing.server.replication@default:default,com.sap.sailing.server@default:default,com.sap.sailing.udpconnector@default:default,com.sap.sailing.www.events@default:default,com.sap.sailing.www@default:default,com.sap.sailing.xcelsiusadapter@default:default,com.tractrac.clientmodule@default:default,com.tractrac.resultapi@default:default,org.json.simple@default:default,org.moxieapps.gwt.highcharts@default:default"/>
|
||||
</launchConfiguration>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<feature
|
||||
id="com.sap.sailing.target.base"
|
||||
label="base libraries"
|
||||
label="Base libraries"
|
||||
version="1.0.0">
|
||||
|
||||
<description>
|
||||
@@ -18,14 +18,14 @@
|
||||
install-size="0"
|
||||
version="2.5.0.v201103041518"
|
||||
unpack="false"/>
|
||||
|
||||
|
||||
<plugin
|
||||
id="slf4j.api"
|
||||
download-size="0"
|
||||
install-size="0"
|
||||
version="1.6.4"
|
||||
unpack="false"/>
|
||||
|
||||
|
||||
<plugin
|
||||
id="slf4j.jdk14"
|
||||
download-size="0"
|
||||
@@ -40,4 +40,11 @@
|
||||
version="1.6.4"
|
||||
unpack="false"/>
|
||||
|
||||
<plugin
|
||||
id="jcl.over.slf4j"
|
||||
download-size="0"
|
||||
install-size="0"
|
||||
version="1.6.4"
|
||||
unpack="false"/>
|
||||
|
||||
</feature>
|
||||
|
||||
@@ -0,0 +1,63 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<feature
|
||||
id="com.sap.sailing.target.jms"
|
||||
label="JMS libraries"
|
||||
version="1.0.0">
|
||||
|
||||
<description>
|
||||
JMS libraries
|
||||
</description>
|
||||
|
||||
<license url="">
|
||||
NA.
|
||||
</license>
|
||||
|
||||
<plugin
|
||||
id="activeio.core"
|
||||
download-size="0"
|
||||
install-size="0"
|
||||
version="3.1.2"
|
||||
unpack="false"/>
|
||||
|
||||
<plugin
|
||||
id="activemq.core"
|
||||
download-size="0"
|
||||
install-size="0"
|
||||
version="5.4.3"
|
||||
unpack="false"/>
|
||||
|
||||
<plugin
|
||||
id="geronimo.j2ee.management.1.1.spec"
|
||||
download-size="0"
|
||||
install-size="0"
|
||||
version="1.1.1"
|
||||
unpack="false"/>
|
||||
|
||||
<plugin
|
||||
id="geronimo.jms.1.1.spec"
|
||||
download-size="0"
|
||||
install-size="0"
|
||||
version="1.1.1"
|
||||
unpack="false"/>
|
||||
|
||||
<plugin
|
||||
id="geronimo.annotation.1.0.spec"
|
||||
download-size="0"
|
||||
install-size="0"
|
||||
version="1.1.1"
|
||||
unpack="false"/>
|
||||
|
||||
<plugin
|
||||
id="geronimo.jta.1.0.1B.spec"
|
||||
download-size="0"
|
||||
install-size="0"
|
||||
version="1.0.1"
|
||||
unpack="false"/>
|
||||
|
||||
<plugin
|
||||
id="kahadb"
|
||||
download-size="0"
|
||||
install-size="0"
|
||||
version="5.4.3"
|
||||
unpack="false"/>
|
||||
</feature>
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
Binary file not shown.
@@ -6,5 +6,8 @@
|
||||
<feature url="features/target-test/com.sap.sailing.target.test_1.0.0.jar" id="com.sap.sailing.target.test" version="1.0.0">
|
||||
<category name="RaceAnalysisTarget"/>
|
||||
</feature>
|
||||
<feature url="features/target-jms/com.sap.sailing.target.jms_1.0.0.jar" id="com.sap.sailing.target.jms" version="1.0.0">
|
||||
<category name="RaceAnalysisTarget"/>
|
||||
</feature>
|
||||
<category-def name="RaceAnalysisTarget" label="Race Analysis Target-Platform"/>
|
||||
</site>
|
||||
|
||||
-13
@@ -1,13 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<?pde version="3.6"?>
|
||||
|
||||
<target name="Race Analysis Target (IDE external) for Frank" sequenceNumber="50">
|
||||
<locations>
|
||||
<location includeAllPlatforms="false" includeMode="slicer" includeSource="true" type="InstallableUnit">
|
||||
<unit id="org.eclipse.jetty.bundles.f.feature.group" version="7.5.4"/>
|
||||
<repository location="http://download.eclipse.org/jetty/updates/jetty-bundles-7.x/7.5.4.v20111024/"/>
|
||||
</location>
|
||||
<location path="C:\Projects\sailing\dev\p2-repositories\eclipse\equinox-SDK-3.7" type="Directory"/>
|
||||
<location path="${project_loc:com.sap.sailing.targetplatform.base}/gen/p2" type="Directory"/>
|
||||
</locations>
|
||||
</target>
|
||||
+4
-8
@@ -1,20 +1,16 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<?pde version="3.6"?>
|
||||
|
||||
<target name="Race Analysis Target (IDE external)" sequenceNumber="50">
|
||||
<target name="Race Analysis Target (IDE) for the p2 Admin" sequenceNumber="50">
|
||||
<locations>
|
||||
<location includeAllPlatforms="false" includeMode="slicer" includeSource="true" type="InstallableUnit">
|
||||
<unit id="org.eclipse.equinox.core.sdk.feature.group" version="3.7.1.R37x_v20110907-7uF9LFpFFSuN6-tKJIXPMYaq7NTP"/>
|
||||
<repository location="http://download.eclipse.org/releases/indigo"/>
|
||||
</location>
|
||||
<location includeAllPlatforms="false" includeMode="slicer" includeSource="true" type="InstallableUnit">
|
||||
<unit id="org.eclipse.jetty.bundles.f.feature.group" version="7.5.4"/>
|
||||
<repository location="http://download.eclipse.org/jetty/updates/jetty-bundles-7.x/7.5.4.v20111024/"/>
|
||||
</location>
|
||||
<location includeAllPlatforms="false" includeMode="slicer" includeSource="true" type="InstallableUnit">
|
||||
<unit id="com.sap.sailing.target.base.feature.group" version="1.0.0"/>
|
||||
<unit id="com.sap.sailing.target.test.feature.group" version="1.0.0"/>
|
||||
<repository location="http://sapcoe-app01.pironet-ndh.com/p2/sailing/"/>
|
||||
<unit id="org.eclipse.equinox.core.sdk.feature.group" version="3.7.1.R37x_v20110907-7uF9LFpFFSuN6-tKJIXPMYaq7NTP"/>
|
||||
<repository location="http://download.eclipse.org/releases/indigo"/>
|
||||
</location>
|
||||
<location path="${project_loc:com.sap.sailing.targetplatform.base}/gen/p2" type="Directory"/>
|
||||
</locations>
|
||||
</target>
|
||||
-20
@@ -1,20 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<?pde version="3.6"?>
|
||||
|
||||
<target name="Race Analysis Target (Maven - local build for externals)" sequenceNumber="34">
|
||||
<locations>
|
||||
<location includeAllPlatforms="false" includeMode="slicer" includeSource="true" type="InstallableUnit">
|
||||
<unit id="org.eclipse.equinox.core.sdk.feature.group" version="3.7.0.v20110506-0800-7uF9LFp7FWmE7gTBiKg15LDD"/>
|
||||
<repository location="http://download.eclipse.org/equinox/drops/R-3.7-201106131736/"/>
|
||||
</location>
|
||||
<location includeAllPlatforms="false" includeMode="slicer" includeSource="true" type="InstallableUnit">
|
||||
<unit id="org.eclipse.jetty.bundles.f.feature.group" version="7.5.4"/>
|
||||
<repository location="http://download.eclipse.org/jetty/updates/jetty-bundles-7.x/7.5.4.v20111024/"/>
|
||||
</location>
|
||||
<location includeAllPlatforms="false" includeMode="slicer" includeSource="true" type="InstallableUnit">
|
||||
<unit id="com.sap.sailing.target.base.feature.group" version="1.0.0"/>
|
||||
<unit id="com.sap.sailing.target.test.feature.group" version="1.0.0"/>
|
||||
<repository location="http://sapcoe-app01.pironet-ndh.com/p2/sailing/"/>
|
||||
</location>
|
||||
</locations>
|
||||
</target>
|
||||
Reference in New Issue
Block a user