Hi Marco
It seems you haven't got an answer yet. As I have never tried to run BaseX with Tomcat personally, I am sorry I can't give real advice on that. Have you ben successful so far? What happens if the RESTXQ code in your second BaseX instance is buggy (..maybe it isn't parsed at all)?
Christian
On Tue, Jun 10, 2014 at 10:16 AM, Marco Lettere marco.lettere@dedalus.eu wrote:
Hello all, in one of our use cases we have two basex (7.8.1) that run as standalone servers. They act mainly as service wrappers so we mainly use restxq and http client. Only one has a very limited access to the DB functionality. The pattern is that one of the two is called from a tomcat webapp installed on the same machine. It then calls the second which in turn calls another service on a different machine. All of the calls are HTTP. Anyway we have been asked to condense the installation into the same tomcat. I've been trying that but when I install multiple basex webapps I get strange conflicts in the RESTXQ engine. I was able to reproduce the issue just by exploding two wars (named bx1.war and bx2.war) into the tomcat. Then I've altered the "hello/{$world}" annotated example in restxq.xqm to return "hello world 1" and "Hello world 2". At that point whatever context I use in the browser (either bx1 or bx2) I always get "Hello world 2" as a return. I've tried changing the namespace of the module of restxq.xqm and also changing the servlet context for RESTXQ in bx2 but nothing changes. Could you provide me some hints on this? Thanks, Marco.