Macrologic ODBC access configuration
Introduction
The document describes the configuration of access by the AMAGE system to MacroLogic/MacroBase databases using the ODBC interface and jdbc drivers.
Input data
In order to properly configure access, it is required to have a configuration archive for Linux systems (here in the example). We base the example on the files provided in the jterm_2014_r2032
archive.
ODBC configuration
You need to install linuxodbc packages on the operating system and allow them to be configured on the system. This document omits the list of packages required for installation, as this depends on the distribution and package version chosen.
We start the configuration with the definition of the MacroBase driver. We enter this data into the /etc/odbcinst.ini file. Example configuration.
[MacroBase] Driver=/opt/xpertis/libmodbc.so Driver64=/opt/xpertis/libmodbc64.so Description=Sterownik ODBC dla MacroBASE Threading=0 UsageCount=1
The contents of the directory with drivers, libraries. NOTES. The MacroAppBASIC executable file is essential for the communication to work !
libmodbc64.so libmodbc.so MacroAppBASIC readme.txt
Next, we configure the /etc/odbc.ini file, where we define the data source. In this data source we specify the server address, group and other data obtained from MacroBase implementers/administrators.
Example configuration.
[xpertis] DRIVER=MacroBase UID= PWD= LDAPLOGIN=0 AS=1 UTF8X3= ASNAME=fiks ASGROUP=firma ASADDRESS=192.168.1.1 ASPORT=5582 ASCERTUSE=0 ASCERTPTH= UTF8X3=
The connection can be verified through the database communication tools from the linuxodbc package. After connecting to the database correctly using the user/password, we can move on. If we can’t connect to the database at this stage, the communication problem should be resolved.
Pay special attention to libraries and packages. The 64bit version of the system requires 64bit libraries and support programs! |
Apache Tomcat configuration
In order for applications (WebApps) running on a Tomcat (or other) servlet container to work properly, the odbc driver must be made available to the applications along with the necessary libraries. The easiest way is to make this driver available as a library for all applications running on a given server by copying the files to the shared libraries directory /var/lib/tomcat9/lib
The contents of such a catalog
ibconsnet.so libm0odbcj.so libm1odbcj.so libmodbc64.so libtermnet.so macro.lng mjdbclib.jar libm0odbcj64.so libm1odbcj64.so libmodbc64_legacy.so libmodbc.so MacroAppBASIC mjdbc.jar
After restarting Tomcat, the application can connect using a standard JDBC connection.
Configuration of native java (console) applications
To start communication for java console applications, you need to add libraries to load (ClassPath) in the startup parameters.
Example of parameters for NetBeans Platform-based applications
--cp:a /opt/assetsyncconf/libs/mjdbc/mjdbclib.jar --cp:a /opt/assetsyncconf/libs/mjdbc/mjdbc.jar
After including the above mentioned libraries in the ClassPath paths, communication is standard via the JDBC interface.
The Howto is based on system version 1.17.0.2 (03.2022) and presents features that may not be available in your system. Ask AMAGE about making this functionality available. |
Due to ongoing development of the system, some screens or configuration files may look slightly different, but will still retain the full functionality described here. This does not affect the core functionality described in this document. |