Skip to main content
Previous sectionNext section

Running the Object Gateway for Java and .NET

If you are using Java components or .NET components, the PEX framework requires an Object Gateway for Java or for .NET to be running when the production is running. It is recommended that you manually start the Object Gateway from the Management Portal or InterSystems Terminal. You should not add EnsLib.JavaGateway.Service to the production to automatically start the Java gateway.

You can use the Management Portal to define a Java Gateway or a .NET Gateway. Once a gateway is defined, you can use the same page to start and stop the gateway.

To start or stop a Java or .NET gateway, in the Management Portal:

  1. Select System Administration > Configiuration > Connectivity > Object Gateways

  2. Select the Java or .NET gateway.

  3. Select Start to start the gateway and Stop to stop the gateway. You can only edit the gateway settings when the gateway is stopped.

Defining the Java Gateway

To define the Java Gateway:

  1. On the Object Gateways page, select Create New Gateway.

  2. Select Object Gateway for Java.

  3. Specify a gateway name, such as JavaGateway.

  4. Specify the server name/IP address. If the Java Gateway is running locally, the default IP address is 127.0.0.1. You must specify this value you specify in the Gateway Host setting for every Java component in the production.

  5. Specify the port number that the Java Gateway will use. You must specify this port number in the Gateway Port setting for every Java component in the production.

  6. The following Jar files must be on the classpath of the Java Gateway used for the PEX production:

    • The PEX framework jar files: intersystems-jdbc-3.1.0.jar and intersystems-gateway-3.1.0.jar, which are located in the install-dir\dev\java\lib\JDK18\ directory.

    • The gson, serialization library jar file, gson-2.8.5.jar, which is located in the install-dir\dev\java\lib\gson\ directory.

    • Jar files that contain the subclasses you created for each production component. For example, if you wrote an inbound adapter in Java, you might have a jar file MyJavaAdapter.jar.

  7. You can optionally set the other fields on the page.

  8. Select Save.

If you are using a dedicated Gateway for your PEX production, it makes sense to add these jar files to the classpath when starting the Gateway. Alternatively, you can specify these jar files for individual PEX components in the Management Portal. Every PEX component in a production has a setting Gateway Extra CLASSPATH. You can add the jar file that corresponds to the PEX component in this setting rather than specifying it when you start the Gateway, but don’t forget to also add the gson jar file to the classpath.

Defining the .NET Gateway

To define the .NET Gateway:

  1. On the Object Gateways page, select Create New Gateway.

  2. Select Object Gateway for .Net.

  3. Specify a gateway name, such as DotNetGateway.

  4. Specify the server name/IP address. If the DotNet Gateway is running locally, the default IP address is 127.0.0.1. You must specify this value you specify in the Gateway Host setting for every Java component in the production.

  5. Specify the port number that the .NET Gateway will use. You must specify this port number in the Gateway Port setting for every .NET component in the production.

  6. Select the Execute as 64–bit check box.

  7. On Windows, select .NET Version 4.5.

  8. You can optionally set the other fields on the page.

  9. Select Save.