Learning
Community
Open Exchange
Global Masters
InterSystems IRIS Data Platform 2019.3 / System Interoperability / PEX: Developing Productions with Java / Introduction
Previous section   Next section

Introduction

The PEX framework allows you to write business hosts and adapters in Java and integrate them within a interoperability production. The PEX framework is powerful because you can integrate just one Java-based component into a production that also uses built-in components, or write the entire production in Java, depending on your use case. Once integrated, the production components written in Java are called at runtime and use the PEX framework to send messages to other components in the production. Some reasons to use the PEX framework include:
You can create the following production components using Java:
Collectively, business services, business processes, and business operations are referred to as business hosts. For an introduction to adapters and business hosts and how they fit into an interoperability production, see Introducing Interoperability Productions.
Though you are writing code in Java to create your adapters and business hosts outside of InterSystems IRIS, the Management Portal is still the place to go to create and maintain the production. For example, you’ll use the Management Portal to create the production, integrate the custom business hosts and adapters into the production, start and stop the production, and trace persistent messages running through the production.

Basic Workflow

Implementing Java components into an interoperability production consists of three basic steps:
  1. In you favorite IDE, write the business host or adapter in Java. The PEX Java library, com.intersystems.enslib.pex, includes superclasses for each type of production component. For example, com.intersystems.enslib.pex.BusinessOperation is the superclass for business operations written in Java. Implementing a business host or adapter in Java begins by creating the appropriate subclass and overriding its methods.
  2. In the Management Portal, add a built-in PEX component that points to the new Java class. To integrate a custom Java business host into a production, use the Management Portal to open the production and add a built-in PEX business host to the production that acts as a proxy between the custom business host and the rest of the production. This built-in PEX business host has a setting that specifies the Java class of the custom business host. Integrating an adapter into the production also leverages a built-in PEX class as a proxy between the business host and the adapter written in Java.
  3. From the Management Portal or InterSystems Terminal, manually start the Java Gateway with the required Jar files in the classpath. The PEX framework requires the Java Gateway be running on the port that is defined in the settings of the built-in PEX components. For more details, see Running the Java Gateway.
Previous section   Next section