diff --git a/Felix/bundle/MathHubWorker-0.0.1-SNAPSHOT.jar b/Felix/bundle-dev/MathHubWorker-0.0.1-SNAPSHOT.jar similarity index 100% rename from Felix/bundle/MathHubWorker-0.0.1-SNAPSHOT.jar rename to Felix/bundle-dev/MathHubWorker-0.0.1-SNAPSHOT.jar diff --git a/Felix/bundle/core-0.0.1-SNAPSHOT.jar b/Felix/bundle-dev/core-0.0.1-SNAPSHOT.jar similarity index 100% rename from Felix/bundle/core-0.0.1-SNAPSHOT.jar rename to Felix/bundle-dev/core-0.0.1-SNAPSHOT.jar diff --git a/Felix/bundle/docmanager-0.0.1-SNAPSHOT.jar b/Felix/bundle-dev/docmanager-0.0.1-SNAPSHOT.jar similarity index 100% rename from Felix/bundle/docmanager-0.0.1-SNAPSHOT.jar rename to Felix/bundle-dev/docmanager-0.0.1-SNAPSHOT.jar diff --git a/Felix/bundle/planetary-0.0.1-SNAPSHOT.jar b/Felix/bundle-dev/planetary-0.0.1-SNAPSHOT.jar similarity index 100% rename from Felix/bundle/planetary-0.0.1-SNAPSHOT.jar rename to Felix/bundle-dev/planetary-0.0.1-SNAPSHOT.jar diff --git a/Felix/bundle/servlet-0.0.1-SNAPSHOT.jar b/Felix/bundle-dev/servlet-0.0.1-SNAPSHOT.jar similarity index 100% rename from Felix/bundle/servlet-0.0.1-SNAPSHOT.jar rename to Felix/bundle-dev/servlet-0.0.1-SNAPSHOT.jar diff --git a/Felix/bundle/org.apache.felix.fileinstall-3.2.6.jar b/Felix/bundle/org.apache.felix.fileinstall-3.2.6.jar new file mode 100644 index 0000000000000000000000000000000000000000..70e0684826deeb24dc0b597a84c82be8f9b12559 Binary files /dev/null and b/Felix/bundle/org.apache.felix.fileinstall-3.2.6.jar differ diff --git a/Felix/conf/config.properties b/Felix/conf/config.properties index df62cf5811908275b4151521e7c61898bb632af8..c1f0de0aaed42ba6ed73b8a252bf60ceb327c6a7 100644 --- a/Felix/conf/config.properties +++ b/Felix/conf/config.properties @@ -62,7 +62,7 @@ felix.auto.deploy.action=install,start # The following property specifies the directory to use as the bundle # auto-deploy directory; the default is 'bundle' in the working directory. -#felix.auto.deploy.dir=bundle +felix.auto.deploy.dir=bundle # The following property is a space-delimited list of bundle URLs # to install when the framework starts. The ending numerical component @@ -98,3 +98,6 @@ felix.log.level=1 org.osgi.service.http.port=8080 obr.repository.url=http://felix.apache.org/obr/releases.xml + + +felix.fileinstall.dir=./bundle-dev \ No newline at end of file diff --git a/MathHubWorker/pom.xml b/MathHubWorker/pom.xml index b432b1d88a2667afc70ed7a7c47ad1efc8f531b3..5581e8d3510fc86816918f3b25f928ed8137921c 100644 --- a/MathHubWorker/pom.xml +++ b/MathHubWorker/pom.xml @@ -76,7 +76,7 @@ <plugin> <groupId>org.apache.felix</groupId> <artifactId>maven-ipojo-plugin</artifactId> - <version>1.6.0</version> + <version>1.11.2</version> <executions> <execution> <goals> diff --git a/MathHubWorker/src/main/java/info/kwarc/sally4/mathhubworker/impl/DocumentManagerRoutes.java b/MathHubWorker/src/main/java/info/kwarc/sally4/mathhubworker/impl/DocumentManagerRoutes.java index 25af85164fb82ab3f729adc9c7109d860db947ca..70576eae398fbee0db795718fe2ec3d5ea44676f 100644 --- a/MathHubWorker/src/main/java/info/kwarc/sally4/mathhubworker/impl/DocumentManagerRoutes.java +++ b/MathHubWorker/src/main/java/info/kwarc/sally4/mathhubworker/impl/DocumentManagerRoutes.java @@ -11,14 +11,6 @@ public class DocumentManagerRoutes extends RouteBuilder { public static final String directSallyRegisterQueue = "direct:/queue/sally_register"; public static final String mockSallyRegisterQueueOutput = "mock:/queue/sally_register_out"; - /* - RegisterProcessor registerProcessor; - - public SallyRegisterRoute(RegisterProcessor registerProcessor) { - this.registerProcessor = registerProcessor; - } - */ - @Override public void configure() throws Exception { DataFormat core = CommUtils.getDataFormat("core"); diff --git a/MathHubWorker/src/main/java/info/kwarc/sally4/mathhubworker/impl/MathHubWorkerImpl.java b/MathHubWorker/src/main/java/info/kwarc/sally4/mathhubworker/impl/MathHubWorkerImpl.java index 2c87ad2503885690b8b637d6e5c35bea4d50e8a8..4818fb43ef603a7eda4638ddbb16733ce54d02dd 100644 --- a/MathHubWorker/src/main/java/info/kwarc/sally4/mathhubworker/impl/MathHubWorkerImpl.java +++ b/MathHubWorker/src/main/java/info/kwarc/sally4/mathhubworker/impl/MathHubWorkerImpl.java @@ -42,15 +42,15 @@ public class MathHubWorkerImpl implements MathHubWorker { public void configure() throws Exception { from("direct:getUserForSessionID") .id("getUserFromPlanetary") - .to("planetary:select uid from sessions where sid=#") - .to("log:foo"); + .to("planetary:select uid from sessions where sid=#?outputType=SelectOne"); + + from("activemq:") } } @Validate public void start() { - log.info("--------- STARTING ----------------"); camelContext = camelContextProvider.getSallyCamelContext(); try { camelContext.addRoutes(new MyRoute()); diff --git a/MathHubWorker/src/main/java/info/kwarc/sally4/mathhubworker/impl/UserBasedRouter.java b/MathHubWorker/src/main/java/info/kwarc/sally4/mathhubworker/impl/UserBasedRouter.java new file mode 100644 index 0000000000000000000000000000000000000000..6c04d7824e8cba46afd1afb83213fff58da50186 --- /dev/null +++ b/MathHubWorker/src/main/java/info/kwarc/sally4/mathhubworker/impl/UserBasedRouter.java @@ -0,0 +1,24 @@ +package info.kwarc.sally4.mathhubworker.impl; + +import org.apache.camel.Exchange; +import org.apache.camel.Processor; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +public class UserBasedRouter implements Processor{ + + Logger log; + + public UserBasedRouter() { + log = LoggerFactory.getLogger(getClass()); + } + + public void process(Exchange exchange) throws Exception { + log.info(exchange.getIn().getBody().toString()); +// List<Map<String, Long>> uids = (List<Map<String, Long>>)exchange.getIn().getBody(); +// for (Map<String, Long> uid: uids) { +// log.info(uid.get("uid").toString()); +// } + } + +}