Persisting Java Objects with InterSystems IRIS XEP
XEP (eXpress Event Persistence) is a lightweight Java API that provides high-performance Java persistence technology for simple to medium complexity object hierarchies. XEP projects the data in Java objects as persistent events
(database objects that store a persistent copy of the data fields), accessing the InterSystems IRIS database over a TCP/IP link. XEP is optimized for transaction processing applications that require extremely high speed data persistence and retrieval.
Installation and Configuration
This section provides specifies requirements and provides instructions for installing InterSystems IRIS and configuring your environment to use XEP.
When installing InterSystems IRIS, select the Development environment:
If InterSystems IRIS has been installed with security level 2, open the Management Portal and go to [System Administration] > [Security] > [Services]
, select %Service_CallIn
, and make sure the Service Enabled
box is checked.
If you installed InterSystems IRIS with security level 1 (minimal) it should already be checked.
Required Environment Variables
In order to run XEP applications, the following environment variables must be properly set on all platforms:
In Windows, add it to your PATH
In UNIX® and related operating systems, add it to your LD_LIBRARY_PATH
If your Path variable includes more than one <install-dir>/bin
path (for example, if you have installed more than one instance of InterSystems IRIS) only the first one will be used, and any others will be ignored.
environment variable must include the full paths to these files. Alternately, they can be specified in the Java command line classpath
Configuration for Windows
The default stack size of the Java Virtual Machine on Windows is too small for running XEP applications (running them with the default stack size causes Java to report EXCEPTION_STACK_OVERFLOW
). To optimize performance, heap size should also be increased. To temporarily modify the stack size and heap size when running an XEP application, add the following command line arguments:
Configuration for UNIX® and Related Operating Systems
Make sure that you have permissions on the Cache binaries (add the user to the cacheusr
Set the environment variable LD_PRELOAD
to the path of libjsig.so
(a library which enables Java to resolve signal handling anomalies) within your Java installation. For example (depending on which shell you are using) :
setenv LD_PRELOAD /my_jdk_path/jre/lib/amd64/libjsig.so
The path of libjsig.so
under the root of a Java installation may vary from platform to platform, or from one Java release to another. You can locate it on your system with the following command:
find $JAVA_HOME -name libjsig.so -print
is set to the root directory of your Java installation.
variable setting is important if your XEP application also uses other third party components that set up signal handlers. It enables Java to chain signal handlers set by InterSystems IRIS with its own signal handlers, so that they do not interfere with each other. Failure to set this variable may result in a system crash.
is a program that runs all of the other sample programs in sequence.
tests basic functionality such as connecting, importing a schema, storing, querying, updating and deleting XEP events. It also exercises most of the supported data types.
is the most basic XEP test program. It connects to the database, imports a simple class containing only one string field, then stores and loads a number of events corresponding to that class.
is an example that demonstrates the XEP full inheritance model. It tracks airline flight information such as times, locations, personnel, and passengers.
is a multithreaded XEP test program. It extends the Java Thread class, and uses the Basic.java
test suite to test XEP using multiple threads.
Supporting files provide test data for the sample programs. See the JavaDoc included in the sample package for detailed documentation of these programs.
Run the samples with command line argument -h
for a list of available command line options.