WAR distribution

Monday, 3 November 2014 · 3 messages
PS
Paul Swennenhuis3 Nov 2014 13:07 #

Hi,

Last weekend I managed to deploy the BaseX WAR on the Amazon Web Services platform, as an 'Elastic Beanstalk' application. Now I want to create and manage databases and run queries via the REST interface. However, I am lost as how to do that. First, the BaseX pages tell me that the WAR distribution is 'deprecated'. (page http://docs.basex.org/wiki/Startup, remark "the WAR Application can be embedded in existing Java web servers (deprecated)." Why is the WAR distribution deprecated? Should I not use it anymore? And if so, how can I make a WAR out of the JAR distribution? Elastic Beanstalk can only deploy WAR files. Second, where to put the files? I can ssh into the application and transfer files, but where do I put database files I already created with the Windows version of BaseX? And where the .xq files?

Paul

CG
Christian Grün3 Nov 2014 14:59 #

Hi Paul,

Quoted text · Paul Swennenhuis · 1 line
> First, the BaseX pages tell me that the WAR distribution is 'deprecated'.

Sorry for the confusion. To be honest, I can't recall how this comment ended up in the documentation, as we will continue to provide the WAR file of BaseX. But it's a fact that we don't use this distribution by ourselves, so our experience with it is limited…

Quoted text · Paul Swennenhuis · 4 lines
> Second, where to put the files? I can ssh into the application and transfer > files, but where do I put database files I already created with the Windows > version of BaseX? > And where the .xq files?

…which is why I would be glad if someone else working with the WAR distribution could give feedback on this. ;)

Christian

IF
Ioan Fericel3 Nov 2014 16:26 #
Quoted text · Christian Grün · 10 lines
On 11/03/2014 03:59 PM, Christian Grün wrote: > >> Second, where to put the files? I can ssh into the application and transfer >> files, but where do I put database files I already created with the Windows >> version of BaseX? >> And where the .xq files? > …which is why I would be glad if someone else working with the WAR > distribution could give feedback on this. ;) > > Christian

In my short experience with BaseX I use it as WAR format, deployed under Tomcat or Jetty. In the same place (webapps folder) is my application.

Databases will be created under basex. For .xq files I have an folder under my application (mysqrepo).

In basex/WEB-INF/web.xml I created an context-param entry, to know basex to load queries:

  <context-param>
     <param-name>org.basex.restxqpath</param-name>
     <param-value>../myapp/mysqrepo</param-value>
   </context-param>

Do not know yet how good is this configuration, but so I can work and control queries for each my application separately. I'd like to hear other opinions too, about security, performance etc.

Glad if you help, Ioan


⚡Generated with XQuery