On 06/08/2015 11:01 PM, Christian GrĂ¼n wrote:
Dear Ioan,
-webapps -basex -bxapp1 -xqrepo1 -bxapp2 -xqrepo2 -bxapp3 -xqrepo3
I see.. So you would like to have a single BaseX instance and three or more web applications that only contain webapp contents (restxq, repo, maybe database directories), right?
Yes, an instance of BaseX serving multiple applications. BaseX must ensure the role of database server and XQuery processor. The applications will interact with BaseX only via restxq, rest web service is disabled (in web.xml).
And yes, these applications would be desirable to have inside them the xq modules, one or more files contained in one folder like "xqrepo".
BaseX is installed (in .war format) on Tomcat, and it no longer changes, while applications are subject to frequent changes, both in the html, template, css, javascript ... and on the restxq queries. Therefore it would be good that "xqrepo" to be deployed together with the rest of the application to which it belongs.
The databases not need to be kept in separate locations.
Is there any particuar reason why would you want to avoid having more than one BaseX instance (apart from the issues discussed on previous posts)?
I started from the idea that Tomcat is a "container" of applications, many and distinct. And that too would not make sense to multiply BaseX for n times (with all its libraries and probably some resource consumption) within it.
On the other hand, seeking functionality watched by us, we took into account the option of using BaseX not deployed on Tomcat, but installed on system with Jetty embedded. But the problem remains unresolved if we have not restxq queries (like sql query in JSP) within each application.
What do the "xqrepo" directories contain?
Just files with .xqm or .xq extensions, containing the specific restxq functions of respective application. What we can now set for only one application such:
<context-param> <param-name>org.basex.restxqpath</param-name> <param-value>../bxapp1/xqrepo1</param-value> </context-param>
I do not really understand also what and how to use repopath setting (alongside numerous other things that do not know!). Repopath could help us with something on this line?
Cheers, Christian
All the best, Ioan