Hello Ioan and rest!
My understanding is that you want to achieve: * one shared BaseX with databases for all your webapps * ease of maintaining the webapps separately, e.g having all relevant code to one webapp in one place
We try to achieve something similar, but we haven't come far yet and our architecture is the "regular" one BaseX per application. The reason for it is that our apps right now don't share any data yet, they only share some of the XQuery code. But maybe we can contribute to the discussion.
Right now we have factored out the shared XQuery code into a common module, which is maintained separately and each webapp deploys it's own copy of it. So each of our webapp has its "internal" XQuery code and this "shared" module. This is ofcourse risky, but we try our best with semantic versioning of the code and close coordination between the *two* developers.
One solution that pops up in my mind would be for you to use symlinks to the xquery code from your basex app. I haven't tried it so I'm not sure symlinks are supported. Your architecture would be like this:
webapps - BaseX - symlink to xqrepo1 - symlink to xqrepo2 - symlink to xqrepo3 - bxapp1 - xqrepo1 - bxapp2 - xqrepo2 - bxapp3 - xqrepo3
Thus your BaseX would be configured with the default xqrepo, and the filesystem would do the rest of the magic. Maybe Christian can comment on this?
Best regards Kristian K
09.06.2015 19:09, Ioan Fericel kirjutas:
On 06/09/2015 03:48 PM, Christian GrĂ¼n wrote:
It would be interesting to see what other Tomcat users think about this. My experience with Tocat is rather limited, but I am not sure if your scenario could really work out.
I also look forward to the views of some other users who use multiple BaseX applications simultaneously. The problem is not just to the Tomcat, but is valid to any Java web application server, including Jetty.
In the configurations tested by us, all is well if we have one single restxqpath and a structure that looks like this:
-webapps -basex -xqrepo -xq_app1 -xq_app2 -xq_app3 -bxapp1 -bxapp2 -bxapp3
And, in web.xml:
<context-param> <param-name>org.basex.restxqpath</param-name> <param-value>../xqrepo</param-value> </context-param>
It's uncomfortable to work in this mode, but if there's no other solution, we try to go forward on this way.
Thanks again, Ioan