Webserverless Access Via the Tamino API for Java

The Tamino API for Java, in common with the other Tamino APIs, communicates with the Tamino XML Server via an HTTP API through a web server. With this release of Tamino XML Server 4.1, a Tamino database can now also be accessed without a web server through the Tamino API for Java. This is achieved by the plug-in architecture of the API providing access the webserverless base C API.


Usage

The distinction, whether the Tamino API for Java should access the Tamino XML Server via the web server or without the web server, is done using the protocol tag in the URL. For example, if a database can be accessed via http://localhost/tamino/mydb/, a URL such as wsl:///tamino/mydb/ would access the same database without going through the web server. When opening a connection to a Tamino database using the webserverless mode via the call TConnectionFactory.getInstance().newConnection( DB_URI ), the variable DB_URI must specify the protocol wsl instead of http, e.g. wsl:///tamino/mydb. Since all connections via WSL have to use the eXtended Transport Services (XTS) from Software AG, the hostname and the portnumber are left blank in the URL and the database is accessed through its unique database name, as in the above example mydb. This is the only change required when the webserverless mode is to be used, i.e. to replace the protocol in all DB_URIs by wsl and leave out the hostname and the portnumber.

In order to use the correct XTS server, which knows about the desired database, either set the environment variable XTSDSURL locally or adjust the entry in the file /etc/hosts. The latter is normally done automatically when the XTS package is installed.

Installation

In order to use the webserverless mode of the Tamino API for Java, the following points must be considered:

  1. Windows:

    The directory containing the library modwsl.dll must be in the path. This is usually done at installation time by adding the variable %SAG_COMMON% to the path variable.

    UNIX:

    The directory containing the library libmodwsl.so must be added to the environment variable LD_LIBRARY_PATH. This is usually done by calling the setup script /opt/sag/sagenv.new.

  2. The option -Djava.protocol.handler.pkgs=com.softwareag.tamino.db.protocols must be supplied at startup to the Java application, i.e. to the JVM.

Security Considerations

The webserverless mode requires that the Software AG product XTS is installed. It can e.g. be found on the Tamino XML Server distribution media.

In order to ensure that a particular database can only be accessed through a particular webserver (or webserverless client), one defines the webserver using the Web Server Management object in the tree-view frame of the System Management Hub. This webserver can then be assigned to a particular database via the Web Servers object in the tree-view frame.

Limitations

Since the webserverless mode does not require a web server to access Tamino, the application should not use direct HTTP calls to communicate with Tamino databases; it should only use methods provided by the Tamino API for Java.

Only databases of a Tamino XML Server with a version number of 4.1 or higher can be accessed via the webserverless mode.