Configuring the Verj.io Server

Documentation home

 

See also: Introduction to the Server, Starting and stopping the Server, Server File System

 

Verj.io Changes using Server Administration Application. 1

Installing/Changing Windows Service. 2

Change Java memory or Java parameters 2

Change Java version. 2

Change the userdata directory. 2

Windows changes when started via bat file. 3

Change Java memory or Java parameters 3

Change Java version. 3

Change the userdata directory. 3

Linux/Mac changes 4

Change Java memory or Java parameters 4

Change Java version. 4

Change the userdata directory. 4

Embedded Server changes 4

Change Java memory or Java parameters 4

Change Java version. 5

Change the userdata directory. 5

Application server configuration. 5

Change the web application name. 5

Add web resource files 6

Add additional Java jar, class or properties files 6

Add JDBC driver jar/zip files 6

Add Database Connection to Application Server 6

Change HTTP listening port 6

Customize error pages 6

Add certificate to the Java trust store. 7

Home Directory. 7

Log file locations 7

Apache Derby Configuration. 7

Apache Derby JDBC Configuration. 8

Using external tools to view/modify the Verj.io database. 8

 

Verj.io Changes using Server Administration Application

Most Verj.io related aspects of the server can be configured using the Server Administration Application. This supports configuration of:

  • Database Connections
  • All Server Properties
  • Languages
  • Web Services
  • Sequences
  • Built-in server security
  • System Texts
  • FPL Functions
  • Working Day Calendar

 

Installing/Changing Windows Service

A Windows service can optionally be created as part of the installation, or at any time after the installation. Each Windows service has a Service Name which must be unique, and a Display Name which does not have to be unique and is the name displayed in the Windows Services Dialog. The Verj.io Server service is given a unique Service Name consisting of “VerjioServer” plus a timestamp, and is given a Display Name which can be entered during the installation (the default display name is VerjioServer).

 

This service can then be started and stopped using the Windows Services dialog. 

 

verjio_service utility script

The Windows service can additionally be managed using scripts in installation_directory/Server/winservice. These scripts can be used to start, stop, install, update or remove a service. These scripts all execute the verjio_service utility script, enter “verjio_service help” for full syntax. These scripts should all be run as administrator.

 

The verjio_service script obtains the default service name from the xxx.server.inst file (VERJIO_SERVICE_NAME variable) which is in the parent directory of the installation file system.

 

Warning: The verjio_service utility has an edit option that allows you to change the service parameters using the Tomcat service properties dialog. However any changes made in this way will be lost when the Verj.io system is upgraded. Therefore it’s better to make any changes as described below to ensure that the changes are maintained across an upgrade.

 

Change Java memory or Java parameters

 

Edit file userdata/winservice/setvars.bat

 

* Set Java maximum memory

set JvmMx=2048

* Set Java initial memory

set JvmMs=1024

* Set Java –D parameters (multiple parameters are delimited by a semicolon)

set JvmArgs=-Dprop1=test;-Dprop2=test

 

After changing the setvars.bat file, update then restart the service to implement the change. Run these scripts as administrator:

update_verjio_service

restart_verjio_service

 

Change Java version

 

Edit file VerjioServer.server.inst at the root of the installation and change or set the VERJIO_SERVER_JAVA variable to point to the root of the Java installation

 

Then update and restart the service to implement the change. Run these scripts as administrator:

update_verjio_service

restart_verjio_service

 

Change the userdata directory

 

Edit file VerjioServer.server.inst at the root of the installation and change the VERJIO_SERVER_USERDATA variable

 

Then update and restart the service to implement the change. Run these scripts as administrator:

update_verjio_service

restart_verjio_service

 

Alternatively, it is possible to change the userdata directory by setting environment variable VERJIO_SERVER_USERDATA, then update and restart the service to implement the change. Run these scripts as administrator:

update_verjio_service

restart_verjio_service

.

Windows changes when started via bat file

This section describes how to make server changes when the server is started using the start_verjio_server.bat file in installation_directory/Server.

 

Change Java memory or Java parameters

 

Edit file userdata/tomcat/bin/setenv.bat

 

* -Xmx : Java maximum memory

* -Xms : Java initial memory

* -Dxx : Java –D parameters (multiple parameters are delimited by a space)

set CATALINA_OPTS=%CATALINA_OPTS% -Xmx2048m -Xms512m -Dprop1=test -Dprop2=test

 

Restart the server:

cd installation_directory/Server

stop_verjio_server.bat

start_verjio_server.bat

 

Change Java version

 

Edit file VerjioServer.server.inst at the root of the installation and change or set the VERJIO_SERVER_JAVA variable to point to the root of the Java installation

 

Restart the server:

cd installation_directory/Server

stop_verjio_server.bat

start_verjio_server.bat

 

Change the userdata directory

 

Edit file VerjioServer.server.inst at the root of the installation and change the VERJIO_SERVER_USERDATA variable

 

Restart the server:

cd installation_directory/Server

stop_verjio_server.bat

start_verjio_server.bat

 

Alternatively, it is possible to change the userdata directory by setting environment variable VERJIO_SERVER_USERDATA, then restarting the server:

 

Linux/Mac changes

 

Change Java memory or Java parameters

 

Edit file userdata/tomcat/bin/setenv.sh

 

* -Xmx : Java maximum memory

* -Xms : Java initial memory

* -Dxx : Java –D parameters (multiple parameters are delimited by a space)

set CATALINA_OPTS=%CATALINA_OPTS% -Xmx2048m -Xms512m -Dprop1=test -Dprop2=test

 

Restart the server:

cd installation_directory/Server

verjio_server.sh restart

 

Change Java version

 

Edit file VerjioServer.server.inst at the root of the installation and change or set the VERJIO_SERVER_JAVA variable to point to the root of the Java installation

 

Restart the server:

cd installation_directory/Server

verjio_server.sh restart

 

 

Change the userdata directory

 

Edit file VerjioServer.server.inst at the root of the installation and change the VERJIO_SERVER_USERDATA variable

 

Restart the server:

cd installation_directory/Server

verjio_server.sh restart

 

Alternatively, it is possible to change the userdata directory by setting environment variable VERJIO_SERVER_USERDATA, then restarting the server:

 

Embedded Server changes

This section applies to use of the Embedded Server (Studio only)

 

Change Java memory or Java parameters

 

In the Studio, select: File > Preferences > Test Server

 

 

-Xmx : sets Java maximum memory

-Xms : sets Java initial memory

-Dxx : sets Java –D parameters   

 

Change Java version

 

This is not supported as an option for just the embedded server. The Java used by the studio, including the embedded test server, can be changed – see Configuring the Studio.

 

 

Change the userdata directory

 

This is not supported as an option for just the embedded server. The userdata directory used by the studio, including the embedded test server, can be changed – see Configuring the Studio.

 

Application server configuration

This section contains information on some of the commonly performed configuration tasks for the Verj.io Server using Tomcat. In some cases, it may be helpful to refer to the Tomcat documentation for full details. For other application servers, refer to the application server documentation.

 

Change the web application name

For external servers, the default web application name is ebase. This can be changed to newname as follows:

1.      Stop the server

2.      Rename ebase.xml to newname.xml in userdata/tomcat/conf/Catalina/localhost

3.      Rename the ebase folder to newname in <userdata>/apps

4.      Check the workspace location in userdata/apps/newname/ebaseConf/workspace.properties. This may need to be changed.

5.      Restart the server

 

For the embedded test server used by the studio, the default web application name is ebasetest. This can be changed as follows:

1.      Shut down the studio

2.      Edit file <user home>/Verjio/Studio/properties/designer.properties

3.      Change parameter testServerWebAppName

4.      Restart the studio

Add web resource files

(Note that web resource files can also be added to the workspace and do not need to be added to the application server)

 

·         The root of the web application for an external server is userdata/apps/<appname>/webapp.

·         The root of the web application for the embedded server used by the studio is userdata/app/webapp

·         Web resources and folders should be added to these locations.

 

Add additional Java jar, class or properties files

For external servers:

·         Copy jar or zip files to userdata/apps/<appname>/webapp/WEB-INF/lib

·         Copy individual class or properties files to userdata/apps/<appname>/webapp/WEB-INF/classes

For the embedded server used by the studio:

·         Copy jar or zip files to userdata/app/webapp/WEB-INF/lib

·         Copy individual class or properties files to userdata/app/webapp/webapp/WEB-INF/classes

 

Add JDBC driver jar/zip files

·         Copy files to userdata/tomcat/lib

Add Database Connection to Application Server

(Note that it’s easier to add a pooled Database Connection using the Server Admin App)

·         Edit the web application context file userdata/tomcat/conf/Catalina/localhost/<webappname>.xml or userdata/tomcat/conf/<webappname>.xml for the embedded server (the default web app name for external servers is ebase, for the embedded server is ebasetest )

·         Add the new Database Connection

·         Restart the server

·         Add a Database Connection using the Server Admin App “configured as application server”

Change HTTP listening port

This defaults to 3030 for external servers and 3050 for the embedded server used by the studio.

·         For external servers this can be changed by editing file userdata/tomcat/conf/server.xml, locating the appropriate <connector> tag and changing the port attribute:

·         For the embedded server, change the port in Studio Preferences: File > Preferences > Test Server, click on Use port, then specify the port number.

Customize error pages

A number of standard error pages are provided for situations such as session timeouts, application error, signon error etc. Click here for details of how these can be customized.

Add certificate to the Java trust store

The Java trust store is where you configure trusted certificates for communicating to external servers e.g. when calling REST or SOAP web services where the service’s certificate is not signed by a recognised certification authority. If a file is found at userdata/security/truststore, its contents will be combined with the default Java trust store (jre/lib/security/cacerts).  It is expected to use the JKS keystore format.

 

The following command uses the keytool utility program to add the certificate; it will also create the trust store file if it doesn’t already exist.

 

<path-to-java>/bin/keytool -import -file <certfile> -alias <alias-name> -storetype JKS -keystore <truststore location>

 

Where alias name needs to be unique for each certificate, but can be any name of your choice. This name does not affect the functioning of the certificate, but is required to subsequently remove the certificate.

 

Then answer any prompts from the keytool utility.

 

e.g.

cd to installation/jre/bin

keytool -import -file C:\cacerts\firstCA.cert -alias firstCA -storetype JKS -keystore userdata/security/truststore

 

See the Java keytool standard documentation for more information.

 

Home Directory

The application server’s home directory (or working directory) is installation_directory/tomcat/bin and this can’t be changed. Note that this directory is within the installation file system and therefore may be overwritten by a subsequent Verj.io upgrade. For this reason, application files should not be saved or loaded using relative directories e.g. “../loc” etc. Best practice is to locate any such files in the userdata file system which can be accessed using the Javascript services.file.getUserDataApplicationPath() method.

Log file locations

For external servers:

·         The Verj.io log file is in userdata/apps/<appname>/logs

·         Tomcat log files are in userdata/tomcat/logs

For the embedded server used by the studio. System.out (which includes most of the server logging) can also be displayed using the Manage Server icon in the top right-hand corner of the studio, then selecting Show Server Log:

·         The Verj.io log file is in userdata/app/logs

·         Tomcat log files are in userdata/tomcat/logs

 

 

 

 

Apache Derby Configuration

 

The Verj.io Server is shipped with Apache Derby database. This database is an embedded database and starts up when the server is started. It is a fully relational database implemented in 100% Java. For more information about derby see http://db.apache.org/derby/

 

Apache Derby is the default database when running Verj.io out of the box. There is no additional configuration required when starting Verj.io for the first time.

 

Apache Derby JDBC Configuration

The JDBC Connection URL should be configured as follows:

 

      jdbc:derby:UFS;create=false

 

The UFS part of the JDBC URL can be changed to an absolute location of a database e.g

 

      jdbc:derby:c:/mydatabase/UFS;create=false

 

To create the database if it does not exist (useful for creating your own database separate from Verj.io) substitute the create=false with create=true

 

 

Using external tools to view/modify the Verj.io database

There are several client tools that you can use to view/modify the Verj.io data or configure a new database.

Note: you cannot connect to the database while the Verj.io Server is running as only one client can attach to the database at any one time in embedded mode.

 

  1. Apache Derby IJ – Command Line Client that comes with Apache Derby. Note: You will need the derby.jar file located in the installation_directory/Server/tomcat/common/lib directory. See http://db.apache.org/derby/papers/DerbyTut/ij_intro.html
  2. DBUtils -  A Database Client Utility developed by Apache. See http://db.apache.org/derby/integrate/db_ddlutils.html
  3. DBVisualizer – A Database Client Utility to allow many connections to many different databases.. See http://www.dbvis.com/