Thanks Christian,
if I deploy my code in two different instances of tomcat everything
works as expected. The restxq code has been stable and frozen for months
so I'm rather sure it's ok.
It looks like there is some kind of singleton behaviour that overwrites
the loading of the code of the two webapps on the same tomcat. But I'm
very busy in this moment and I won't be able to dig deeper than this
into the question.
Hope someone on the list knows about that.
Thank you again.
Marco.
On 06/16/2014 12:24 PM, Christian Grün wrote:
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
<[email protected]> 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.